]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Allow shortened 'no set large-community' and 'no set large-comm-list'
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 19 Dec 2018 12:30:01 +0000 (07:30 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 19 Dec 2018 12:30:01 +0000 (07:30 -0500)
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>
bgpd/bgp_routemap.c

index 88582336a7a96c5a6fadef177ebdac85b134aa96..30159f9023d67992c886b5ff1d038635988ea7a7 100644 (file)
@@ -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);