From: Quentin Young Date: Fri, 28 Oct 2016 00:10:10 +0000 (+0000) Subject: bgpd: Vestigialize `show ip bgp`, this time for real X-Git-Tag: frr-3.0-branchpoint~129^2~61 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=bec37ba594856e0fac7fd20baa08d50d0e3fe86a;p=mirror%2Ffrr.git bgpd: Vestigialize `show ip bgp`, this time for real Missed a couple. Signed-off-by: Quentin Young --- diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index fadad3c452..493655d7fa 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -494,42 +494,22 @@ bgp_show_all_instances_nexthops_vty (struct vty *vty) DEFUN (show_ip_bgp_nexthop, show_ip_bgp_nexthop_cmd, - "show ip bgp nexthop", - SHOW_STR - IP_STR - BGP_STR - "BGP nexthop table\n") -{ - return show_ip_bgp_nexthop_table (vty, NULL, 0); -} - -DEFUN (show_ip_bgp_nexthop_detail, - show_ip_bgp_nexthop_detail_cmd, - "show ip bgp nexthop detail", - SHOW_STR - IP_STR - BGP_STR - "BGP nexthop table\n") -{ - return show_ip_bgp_nexthop_table (vty, NULL, 1); -} - -DEFUN (show_ip_bgp_instance_nexthop, - show_ip_bgp_instance_nexthop_cmd, - "show ip bgp WORD nexthop", + "show [ip] bgp [ VRFNAME] nexthop [detail]", SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR "BGP nexthop table\n") { - int idx_word = 4; - return show_ip_bgp_nexthop_table (vty, argv[idx_word]->arg, 0); + int idx = 0; + char *vrf = argv_find (argv, argc, "VRFNAME", &idx) ? argv[idx]->arg : NULL; + int detail = argv_find (argv, argc, "detail", &idx) ? 1 : 0; + return show_ip_bgp_nexthop_table (vty, vrf, detail); } DEFUN (show_ip_bgp_instance_all_nexthop, show_ip_bgp_instance_all_nexthop_cmd, - "show ip bgp all nexthop", + "show [ip] bgp all nexthop", SHOW_STR IP_STR BGP_STR @@ -540,19 +520,6 @@ DEFUN (show_ip_bgp_instance_all_nexthop, return CMD_SUCCESS; } -DEFUN (show_ip_bgp_instance_nexthop_detail, - show_ip_bgp_instance_nexthop_detail_cmd, - "show ip bgp WORD nexthop detail", - SHOW_STR - IP_STR - BGP_STR - BGP_INSTANCE_HELP_STR - "BGP nexthop table\n") -{ - int idx_word = 4; - return show_ip_bgp_nexthop_table (vty, argv[idx_word]->arg, 1); -} - void bgp_scan_init (struct bgp *bgp) { @@ -573,10 +540,7 @@ void bgp_scan_vty_init (void) { install_element (VIEW_NODE, &show_ip_bgp_nexthop_cmd); - install_element (VIEW_NODE, &show_ip_bgp_nexthop_detail_cmd); - install_element (VIEW_NODE, &show_ip_bgp_instance_nexthop_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_all_nexthop_cmd); - install_element (VIEW_NODE, &show_ip_bgp_instance_nexthop_detail_cmd); } void diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e6aa2d2de8..788eb76e78 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -8754,7 +8754,7 @@ community_show_all_iterator (struct hash_backet *backet, struct vty *vty) /* Show BGP's community internal data. */ DEFUN (show_ip_bgp_community_info, show_ip_bgp_community_info_cmd, - "show ip bgp community-info", + "show [ip] bgp community-info", SHOW_STR IP_STR BGP_STR @@ -8772,7 +8772,7 @@ DEFUN (show_ip_bgp_community_info, DEFUN (show_ip_bgp_attr_info, show_ip_bgp_attr_info_cmd, - "show ip bgp attribute-info", + "show [ip] bgp attribute-info", SHOW_STR IP_STR BGP_STR