From ee851c8c771c475706b4b4980cad314c40291581 Mon Sep 17 00:00:00 2001 From: Mitesh Kanjariya Date: Mon, 19 Feb 2018 00:57:54 -0800 Subject: [PATCH] bgpd: add show bgp vrf all l2vpn evpn summary as an option Ticket: CM-19738 Review: CCR-7194 Testing: Manual Signed-off-by: Mitesh Kanjariya --- bgpd/bgp_evpn_vty.c | 11 +++++++++-- bgpd/bgp_vty.c | 3 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 1373afec4e..131bb82276 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -2967,16 +2967,23 @@ DEFUN(show_bgp_l2vpn_evpn_vni, */ DEFUN(show_bgp_l2vpn_evpn_summary, show_bgp_l2vpn_evpn_summary_cmd, - "show bgp l2vpn evpn summary [json]", + "show bgp [vrf VRFNAME] l2vpn evpn summary [json]", SHOW_STR BGP_STR + "bgp vrf\n" + "vrf name\n" L2VPN_HELP_STR EVPN_HELP_STR "Summary of BGP neighbor status\n" JSON_STR) { + int idx_vrf = 0; u_char uj = use_json(argc, argv); - return bgp_show_summary_vty(vty, NULL, AFI_L2VPN, SAFI_EVPN, uj); + char *vrf = NULL; + + if (argv_find(argv, argc, "vrf", &idx_vrf)) + vrf = argv[++idx_vrf]->arg; + return bgp_show_summary_vty(vty, vrf, AFI_L2VPN, SAFI_EVPN, uj); } /* diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index c7140b2f1f..15cc5673ac 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -7278,8 +7278,7 @@ static void bgp_show_summary_afi_safi(struct vty *vty, struct bgp *bgp, int afi, safi = SAFI_MAX; } afi++; - if (!afi_wildcard - || afi == AFI_L2VPN) /* special case, not handled yet */ + if (!afi_wildcard) afi = AFI_MAX; } -- 2.39.5