summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-10-10 16:43:38 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-10-10 16:43:38 -0400
commitd3261fd83f921cb2defd17fd93ab5099d48c952d (patch)
tree58f8098932ca6b99b2881dc2cee87f1dc1cecb03
parent68bae363762894d6703e405d2cb1b60d7381be3a (diff)
Revert "bgpd: add show bgp link-state link-state commands"
This reverts commit f11f67033fe20f0b4aeb6c885949abb060324749.
-rw-r--r--bgpd/bgp_route.c75
-rw-r--r--bgpd/bgp_vty.c8
-rw-r--r--bgpd/bgp_vty.h8
3 files changed, 10 insertions, 81 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index dd4477beb0..c44f8123b4 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -12983,62 +12983,6 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd,
return CMD_SUCCESS;
}
-/* BGP route print out function */
-DEFPY (show_ip_bgp_link_state, show_ip_bgp_link_state_cmd,
- "show [ip] bgp [<view|vrf> VIEWVRFNAME] link-state link-state\
- [all$all]\
- [version (1-4294967295)\
- |detail-routes$detail_routes\
- ] [json$uj [detail$detail_json] | wide$wide]",
- SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR
- BGP_AF_STR
- BGP_AF_MODIFIER_STR
- "Display the entries for all address families\n"
- "Display prefixes with matching version numbers\n"
- "Version number and above\n"
- "Display detailed version of all routes\n"
- JSON_STR
- "Display detailed version of JSON output\n"
- "Increase table width for longer prefixes\n")
-{
- afi_t afi = AFI_LINKSTATE;
- safi_t safi = SAFI_LINKSTATE;
- enum bgp_show_type sh_type = bgp_show_type_normal;
- void *output_arg = NULL;
- struct bgp *bgp = NULL;
- int idx = 0;
- uint16_t show_flags = 0;
- enum rpki_states rpki_target_state = RPKI_NOT_BEING_USED;
-
- if (uj) {
- argc--;
- SET_FLAG(show_flags, BGP_SHOW_OPT_JSON);
- }
-
- if (detail_json)
- SET_FLAG(show_flags, BGP_SHOW_OPT_JSON_DETAIL);
-
- if (detail_routes)
- SET_FLAG(show_flags, BGP_SHOW_OPT_ROUTES_DETAIL);
-
- if (wide)
- SET_FLAG(show_flags, BGP_SHOW_OPT_WIDE);
-
- bgp_vty_find_and_parse_afi_safi_bgp(vty, argv, argc, &idx, &afi, &safi,
- &bgp, uj);
- if (!idx)
- return CMD_WARNING;
-
- /* Display prefixes with matching version numbers */
- if (argv_find(argv, argc, "version", &idx)) {
- sh_type = bgp_show_type_prefix_version;
- output_arg = argv[idx + 1]->arg;
- }
-
- return bgp_show(vty, bgp, afi, safi, sh_type, output_arg, show_flags,
- rpki_target_state);
-}
-
DEFUN (show_ip_bgp_route,
show_ip_bgp_route_cmd,
"show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]]<A.B.C.D|A.B.C.D/M|X:X::X:X|X:X::X:X/M> [<bestpath|multipath>] [rpki <valid|invalid|notfound>] [json]",
@@ -13119,13 +13063,13 @@ DEFUN (show_ip_bgp_route,
DEFUN (show_ip_bgp_regexp,
show_ip_bgp_regexp_cmd,
- "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_WITH_LS_CMD_STR" ["BGP_SAFI_WITH_LABEL_LS_CMD_STR"]] regexp REGEX [json]",
+ "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] regexp REGEX [json]",
SHOW_STR
IP_STR
BGP_STR
BGP_INSTANCE_HELP_STR
- BGP_AFI_WITH_LS_HELP_STR
- BGP_SAFI_WITH_LABEL_LS_HELP_STR
+ BGP_AFI_HELP_STR
+ BGP_SAFI_WITH_LABEL_HELP_STR
"Display routes matching the AS path regular expression\n"
"A regular-expression (1234567890_^|[,{}() ]$*+.?-\\) to match the BGP AS paths\n"
JSON_STR)
@@ -14666,13 +14610,13 @@ DEFPY (show_ip_bgp_instance_neighbor_bestpath_route,
DEFPY(show_ip_bgp_instance_neighbor_advertised_route,
show_ip_bgp_instance_neighbor_advertised_route_cmd,
- "show [ip] bgp [<view|vrf> VIEWVRFNAME] [" BGP_AFI_WITH_LS_CMD_STR " [" BGP_SAFI_WITH_LABEL_LS_CMD_STR "]] [all$all] neighbors <A.B.C.D|X:X::X:X|WORD> <advertised-routes|received-routes|filtered-routes> [route-map RMAP_NAME$route_map] [<A.B.C.D/M|X:X::X:X/M>$prefix | detail$detail] [json$uj | wide$wide]",
+ "show [ip] bgp [<view|vrf> VIEWVRFNAME] [" BGP_AFI_CMD_STR " [" BGP_SAFI_WITH_LABEL_CMD_STR "]] [all$all] neighbors <A.B.C.D|X:X::X:X|WORD> <advertised-routes|received-routes|filtered-routes> [route-map RMAP_NAME$route_map] [<A.B.C.D/M|X:X::X:X/M>$prefix | detail$detail] [json$uj | wide$wide]",
SHOW_STR
IP_STR
BGP_STR
BGP_INSTANCE_HELP_STR
- BGP_AFI_WITH_LS_HELP_STR
- BGP_SAFI_WITH_LABEL_LS_HELP_STR
+ BGP_AFI_HELP_STR
+ BGP_SAFI_WITH_LABEL_HELP_STR
"Display the entries for all address families\n"
"Detailed information on TCP and BGP neighbor connections\n"
"Neighbor to display information about\n"
@@ -14726,12 +14670,6 @@ DEFPY(show_ip_bgp_instance_neighbor_advertised_route,
if (!idx)
return CMD_WARNING;
- if (afi == AFI_LINKSTATE && prefix_str) {
- vty_out(vty,
- "The prefix option cannot be selected with AFI Link-State\n");
- return CMD_WARNING;
- }
-
/* neighbors <A.B.C.D|X:X::X:X|WORD> */
argv_find(argv, argc, "neighbors", &idx);
peerstr = argv[++idx]->arg;
@@ -15954,7 +15892,6 @@ void bgp_route_init(void)
install_element(VIEW_NODE, &show_ip_bgp_l2vpn_evpn_statistics_cmd);
install_element(VIEW_NODE, &show_ip_bgp_dampening_params_cmd);
install_element(VIEW_NODE, &show_ip_bgp_cmd);
- install_element(VIEW_NODE, &show_ip_bgp_link_state_cmd);
install_element(VIEW_NODE, &show_ip_bgp_route_cmd);
install_element(VIEW_NODE, &show_ip_bgp_regexp_cmd);
install_element(VIEW_NODE, &show_ip_bgp_statistics_all_cmd);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 9b4d893682..636792f6bb 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -12385,11 +12385,11 @@ int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
/* `show [ip] bgp summary' commands. */
DEFPY(show_ip_bgp_summary, show_ip_bgp_summary_cmd,
- "show [ip] bgp [<view|vrf> VIEWVRFNAME] [" BGP_AFI_WITH_LS_CMD_STR
- " [" BGP_SAFI_WITH_LABEL_LS_CMD_STR
+ "show [ip] bgp [<view|vrf> VIEWVRFNAME] [" BGP_AFI_CMD_STR
+ " [" BGP_SAFI_WITH_LABEL_CMD_STR
"]] [all$all] summary [established|failed] [<neighbor <A.B.C.D|X:X::X:X|WORD>|remote-as <ASNUM|internal|external>>] [terse] [wide] [json$uj]",
- SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR BGP_AFI_WITH_LS_HELP_STR
- BGP_SAFI_WITH_LABEL_LS_HELP_STR
+ SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR BGP_AFI_HELP_STR
+ BGP_SAFI_WITH_LABEL_HELP_STR
"Display the entries for all address families\n"
"Summary of BGP neighbor status\n"
"Show only sessions in Established state\n"
diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h
index 955752f85a..a105b6de3f 100644
--- a/bgpd/bgp_vty.h
+++ b/bgpd/bgp_vty.h
@@ -17,8 +17,6 @@ struct bgp;
#define BGP_AF_MODIFIER_STR "Address Family modifier\n"
#define BGP_AFI_CMD_STR "<ipv4|ipv6>"
#define BGP_AFI_HELP_STR BGP_AF_STR BGP_AF_STR
-#define BGP_AFI_WITH_LS_CMD_STR "<ipv4|ipv6|link-state>"
-#define BGP_AFI_WITH_LS_HELP_STR BGP_AF_STR BGP_AF_STR BGP_AF_STR
#define BGP_SAFI_CMD_STR "<unicast|multicast|vpn>"
#define BGP_SAFI_HELP_STR \
BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR
@@ -30,12 +28,6 @@ struct bgp;
BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR \
BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR
-#define BGP_SAFI_WITH_LABEL_LS_CMD_STR \
- "<unicast|multicast|vpn|labeled-unicast|flowspec|link-state>"
-#define BGP_SAFI_WITH_LABEL_LS_HELP_STR \
- BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR \
- BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR BGP_AF_MODIFIER_STR
-
#define BGP_SELF_ORIG_CMD_STR "self-originate"
#define BGP_SELF_ORIG_HELP_STR "Display only self-originated routes\n"