From 76a20aa982ca514e15ec0400d3f8ac58b7d3c3e3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 19 Dec 2018 07:30:01 -0500 Subject: [PATCH] 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 --- bgpd/bgp_routemap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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); -- 2.39.5