summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-12-19 07:30:01 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-12-19 07:30:01 -0500
commit76a20aa982ca514e15ec0400d3f8ac58b7d3c3e3 (patch)
tree463308ca59ab353dabbaeeac904856013956426b
parent4db5ee8ea31a2a567dcf3988509146a8cc323912 (diff)
bgpd: Allow shortened 'no set large-community' and 'no set large-comm-list'
These two commands previously required the whole original command but we should allow the user to shorten out this since the data at the end is not required to figure out what to delete. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--bgpd/bgp_routemap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 88582336a7..30159f9023 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -4301,6 +4301,13 @@ DEFUN (no_set_lcommunity1,
"large-community", NULL);
}
+ALIAS (no_set_lcommunity1,
+ no_set_lcommunity1_short_cmd,
+ "no set large-community",
+ NO_STR
+ SET_STR
+ "BGP large community attribute\n")
+
DEFUN (set_lcommunity_delete,
set_lcommunity_delete_cmd,
"set large-comm-list <(1-99)|(100-500)|WORD> delete",
@@ -4339,6 +4346,13 @@ DEFUN (no_set_lcommunity_delete,
"large-comm-list", NULL);
}
+ALIAS (no_set_lcommunity_delete,
+ no_set_lcommunity_delete_short_cmd,
+ "no set large-comm-list",
+ NO_STR
+ SET_STR
+ "set BGP large community list (for deletion)\n")
+
DEFUN (set_ecommunity_rt,
set_ecommunity_rt_cmd,
"set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN...",
@@ -5004,8 +5018,10 @@ void bgp_route_map_init(void)
install_element(RMAP_NODE, &set_lcommunity_none_cmd);
install_element(RMAP_NODE, &no_set_lcommunity_cmd);
install_element(RMAP_NODE, &no_set_lcommunity1_cmd);
+ install_element(RMAP_NODE, &no_set_lcommunity1_short_cmd);
install_element(RMAP_NODE, &set_lcommunity_delete_cmd);
install_element(RMAP_NODE, &no_set_lcommunity_delete_cmd);
+ install_element(RMAP_NODE, &no_set_lcommunity_delete_short_cmd);
install_element(RMAP_NODE, &set_ecommunity_rt_cmd);
install_element(RMAP_NODE, &no_set_ecommunity_rt_cmd);
install_element(RMAP_NODE, &no_set_ecommunity_rt_short_cmd);