]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Vestigialize `show ip bgp`, this time for real
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 28 Oct 2016 00:10:10 +0000 (00:10 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 28 Oct 2016 00:10:10 +0000 (00:10 +0000)
Missed a couple.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_nexthop.c
bgpd/bgp_vty.c

index fadad3c452c58e86fabd5795e03ca9f8be9e3aa8..493655d7fa10d32023e0ad9df03bd214cc7cb59b 100644 (file)
@@ -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 <view|vrf> WORD nexthop",
+       "show [ip] bgp [<view|vrf> 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 <view|vrf> all nexthop",
+       "show [ip] bgp <view|vrf> 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 <view|vrf> 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
index e6aa2d2de8be3405c729b7637eb468a3806c4854..788eb76e78b0c8738c27d46e646051e921f83f5f 100644 (file)
@@ -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