]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: vty commands added for EVPN address family
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 28 Sep 2016 16:54:17 +0000 (18:54 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 14 Feb 2017 12:58:59 +0000 (13:58 +0100)
Enhancement of the following show vty evpn commands:

show bgp l2vpn evpn all A.B.C.D

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_evpn_vty.c
bgpd/bgp_evpn_vty.h
bgpd/bgp_route.c

index 9016f530bc943b8222779d0cfc598d63fc99d2c5..862d0ff92b7386d15850b0046031a15737f9e68b 100644 (file)
@@ -31,9 +31,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 #include "bgpd/bgp_vpn.h"
 #include "bgpd/bgp_evpn_vty.h"
 
-#define L2VPN_HELP_STR        "Layer 2 Virtual Private Network\n"
-#define EVPN_HELP_STR        "Ethernet Virtual Private Network\n"
-
 #define SHOW_DISPLAY_STANDARD 0
 #define SHOW_DISPLAY_TAGS 1
 #define SHOW_DISPLAY_OVERLAY 2
index 367a4bd20da3ed720c00a208991eec2f317d9aea..ed654d90b2354a59a74d4b6297f7586fd71d3ddb 100644 (file)
@@ -24,4 +24,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 extern void
 bgp_ethernetvpn_init (void);
 
+#define L2VPN_HELP_STR        "Layer 2 Virtual Private Network\n"
+#define EVPN_HELP_STR        "Ethernet Virtual Private Network\n"
+
+
 #endif /* _QUAGGA_BGP_EVPN_VTY_H */
index 9145a9af7323609c671fa1bda45c781ef1f41d8a..d5d5546a8d60277283c3e964e8e1d993ce3abb89 100644 (file)
@@ -9269,7 +9269,27 @@ DEFUN (show_ip_bgp_vpn_all_route_prefix,
 }
 #endif /* KEEP_OLD_VPN_COMMANDS */
 
-static void
+DEFUN (show_ip_bgp_l2vpn_evpn_all_route_prefix,
+       show_ip_bgp_l2vpn_evpn_all_route_prefix_cmd,
+       "show [ip] bgp l2vpn evpn all <A.B.C.D|A.B.C.D/M> [json]",
+       SHOW_STR
+       IP_STR
+       BGP_STR
+       L2VPN_HELP_STR
+       EVPN_HELP_STR
+       "Display information about all EVPN NLRIs\n"
+       "Network in the BGP routing table to display\n"
+       "Network in the BGP routing table to display\n"
+       JSON_STR)
+{
+  int idx = 0;
+  char *network = NULL;
+  network = argv_find (argv, argc, "A.B.C.D", &idx) ? argv[idx]->arg : NULL;
+  network = argv_find (argv, argc, "A.B.C.D/M", &idx) ? argv[idx]->arg : NULL;
+  return bgp_show_route (vty, NULL, network, AFI_L2VPN, SAFI_EVPN, NULL, 0, BGP_PATH_ALL, use_json(argc, argv));
+}
+
+ static void
 show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
                 int in, const char *rmap_name, u_char use_json, json_object *json)
 {
@@ -10624,7 +10644,8 @@ bgp_route_init (void)
   install_element (VIEW_NODE, &show_ip_bgp_vpn_all_route_prefix_cmd);
 #endif /* KEEP_OLD_VPN_COMMANDS */
   install_element (VIEW_NODE, &show_bgp_afi_vpn_rd_route_cmd);
-
+  install_element (VIEW_NODE, &show_ip_bgp_l2vpn_evpn_all_route_prefix_cmd);
+  
  /* BGP dampening clear commands */
   install_element (ENABLE_NODE, &clear_ip_bgp_dampening_cmd);
   install_element (ENABLE_NODE, &clear_ip_bgp_dampening_prefix_cmd);