diff options
| author | Trey Aspelund <taspelund@nvidia.com> | 2021-03-09 04:28:04 +0000 |
|---|---|---|
| committer | Trey Aspelund <taspelund@nvidia.com> | 2021-03-19 15:24:50 +0000 |
| commit | 093d16a23c42d08b83c16e78bcc94fdaaa0b13e9 (patch) | |
| tree | a2205fe010b610709d813823543ac0aa9bc91a9c /bgpd/bgp_route.c | |
| parent | 44544f191cffd8817f3bc945daec499191cffa01 (diff) | |
bgpd: Add 'rd all' keyword to EVPN/L3VPN show cmds
Adds support for 'rd all' matching for EVPN and L3VPN show commands.
Introduces evpn_show_route_rd_all_macip().
Cleanup some show commands to use SHOW_DISPLAY string constants.
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
Diffstat (limited to 'bgpd/bgp_route.c')
| -rw-r--r-- | bgpd/bgp_route.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 87fd5f28ca..b3c6fbff8f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -13824,13 +13824,14 @@ struct bgp_distance { DEFUN (show_bgp_afi_vpn_rd_route, show_bgp_afi_vpn_rd_route_cmd, - "show bgp "BGP_AFI_CMD_STR" vpn rd ASN:NN_OR_IP-ADDRESS:NN <A.B.C.D/M|X:X::X:X/M> [json]", + "show bgp "BGP_AFI_CMD_STR" vpn rd <ASN:NN_OR_IP-ADDRESS:NN|all> <A.B.C.D/M|X:X::X:X/M> [json]", SHOW_STR BGP_STR BGP_AFI_HELP_STR "Address Family modifier\n" "Display information for a route distinguisher\n" "Route Distinguisher\n" + "All Route Distinguishers\n" "Network in the BGP routing table to display\n" "Network in the BGP routing table to display\n" JSON_STR) @@ -13845,6 +13846,11 @@ DEFUN (show_bgp_afi_vpn_rd_route, return CMD_WARNING; } + if (!strcmp(argv[5]->arg, "all")) + return bgp_show_route(vty, NULL, argv[6]->arg, afi, + SAFI_MPLS_VPN, NULL, 0, BGP_PATH_SHOW_ALL, + use_json(argc, argv)); + ret = str2prefix_rd(argv[5]->arg, &prd); if (!ret) { vty_out(vty, "%% Malformed Route Distinguisher\n"); |
