bgpd: vty commands added for EVPN address family

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>
This commit is contained in:
Philippe Guibert 2016-09-28 18:54:17 +02:00
parent dc49391e36
commit 4c63a661e3
3 changed files with 27 additions and 5 deletions

View 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

View 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 */

View 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);