bgpd: filter for prefix route in route rd commands

Ticket: CM-19000
Review: crr-7008
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
Mitesh Kanjariya 2017-12-02 16:53:59 -08:00 committed by mitesh
parent 47b7136955
commit aa9db9e6e2

View file

@ -2941,7 +2941,7 @@ DEFUN(show_bgp_l2vpn_evpn_route,
"Specify Route type\n" "Specify Route type\n"
"MAC-IP (Type-2) route\n" "MAC-IP (Type-2) route\n"
"Multicast (Type-3) route\n" "Multicast (Type-3) route\n"
"Prefix route" "Prefix route\n"
JSON_STR) JSON_STR)
{ {
struct bgp *bgp; struct bgp *bgp;
@ -2987,7 +2987,7 @@ DEFUN(show_bgp_l2vpn_evpn_route,
*/ */
DEFUN(show_bgp_l2vpn_evpn_route_rd, DEFUN(show_bgp_l2vpn_evpn_route_rd,
show_bgp_l2vpn_evpn_route_rd_cmd, show_bgp_l2vpn_evpn_route_rd_cmd,
"show bgp l2vpn evpn route rd ASN:NN_OR_IP-ADDRESS:NN [type <macip|multicast>] [json]", "show bgp l2vpn evpn route rd ASN:NN_OR_IP-ADDRESS:NN [type <macip|multicast|prefix>] [json]",
SHOW_STR SHOW_STR
BGP_STR BGP_STR
L2VPN_HELP_STR L2VPN_HELP_STR
@ -2998,6 +2998,7 @@ DEFUN(show_bgp_l2vpn_evpn_route_rd,
"Specify Route type\n" "Specify Route type\n"
"MAC-IP (Type-2) route\n" "MAC-IP (Type-2) route\n"
"Multicast (Type-3) route\n" "Multicast (Type-3) route\n"
"Prefix route\n"
JSON_STR) JSON_STR)
{ {
struct bgp *bgp; struct bgp *bgp;
@ -3035,6 +3036,8 @@ DEFUN(show_bgp_l2vpn_evpn_route_rd,
type = BGP_EVPN_MAC_IP_ROUTE; type = BGP_EVPN_MAC_IP_ROUTE;
else if (strncmp(argv[type_idx + 1]->arg, "mu", 2) == 0) else if (strncmp(argv[type_idx + 1]->arg, "mu", 2) == 0)
type = BGP_EVPN_IMET_ROUTE; type = BGP_EVPN_IMET_ROUTE;
else if (strncmp(argv[type_idx + 1]->arg, "pr", 2) == 0)
type = BGP_EVPN_IP_PREFIX_ROUTE;
else else
return CMD_WARNING; return CMD_WARNING;
} }