int style = EXTCOMMUNITY_LIST_STANDARD;
int direct = 0;
char *cl_number_or_name = NULL;
+ char *str = NULL;
int idx = 0;
if (argv_find(argv, argc, "ip", &idx)) {
vty_out(vty, "'no bgp extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>'\n");
zlog_warn("Deprecated option: ‘no ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' being used");
}
+
+ idx = 0;
+ argv_find(argv, argc, "permit", &idx);
+ argv_find(argv, argc, "deny", &idx);
+
+ if (idx) {
+ direct = argv_find(argv, argc, "permit", &idx)
+ ? COMMUNITY_PERMIT
+ : COMMUNITY_DENY;
+
+ idx = 0;
+ argv_find(argv, argc, "AA:NN", &idx);
+ str = argv_concat(argv, argc, idx);
+ }
+
+ idx = 0;
argv_find(argv, argc, "(1-99)", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_number_or_name = argv[idx]->arg;
- direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
- : COMMUNITY_DENY;
- argv_find(argv, argc, "AA:NN", &idx);
- char *str = argv_concat(argv, argc, idx);
int ret = extcommunity_list_unset(bgp_clist, cl_number_or_name, str,
direct, style);
"Specify community to accept\n"
EXTCOMMUNITY_VAL_STR)
+ALIAS(no_extcommunity_list_standard_all,
+ no_bgp_extcommunity_list_standard_all_list_cmd,
+ "no bgp extcommunity-list <(1-99)|standard WORD>",
+ NO_STR IP_STR EXTCOMMUNITY_LIST_STR
+ "Extended Community list number (standard)\n"
+ "Specify standard extcommunity-list\n"
+ "Community list name\n")
+
+ALIAS(no_extcommunity_list_standard_all,
+ no_ip_extcommunity_list_standard_all_list_cmd,
+ "no ip extcommunity-list <(1-99)|standard WORD>",
+ NO_STR IP_STR EXTCOMMUNITY_LIST_STR
+ "Extended Community list number (standard)\n"
+ "Specify standard extcommunity-list\n"
+ "Community list name\n")
+
DEFUN (no_extcommunity_list_expanded_all,
no_bgp_extcommunity_list_expanded_all_cmd,
"no bgp extcommunity-list <(100-500)|expanded WORD> <deny|permit> LINE...",
int style = EXTCOMMUNITY_LIST_EXPANDED;
int direct = 0;
char *cl_number_or_name = NULL;
+ char *str = NULL;
int idx = 0;
if (argv_find(argv, argc, "ip", &idx)) {
vty_out(vty, "'no bgp extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>'\n");
zlog_warn("Deprecated option: ‘no ip extcommunity-list <(1-99)|(100-500)|standard|expanded> <deny|permit> <LINE|AA:NN>' being used");
}
+
+ idx = 0;
+ argv_find(argv, argc, "permit", &idx);
+ argv_find(argv, argc, "deny", &idx);
+
+ if (idx) {
+ direct = argv_find(argv, argc, "permit", &idx)
+ ? COMMUNITY_PERMIT
+ : COMMUNITY_DENY;
+
+ idx = 0;
+ argv_find(argv, argc, "LINE", &idx);
+ str = argv_concat(argv, argc, idx);
+ }
+
+ idx = 0;
argv_find(argv, argc, "(100-500)", &idx);
argv_find(argv, argc, "WORD", &idx);
cl_number_or_name = argv[idx]->arg;
- direct = argv_find(argv, argc, "permit", &idx) ? COMMUNITY_PERMIT
- : COMMUNITY_DENY;
- argv_find(argv, argc, "LINE", &idx);
- char *str = argv_concat(argv, argc, idx);
int ret = extcommunity_list_unset(bgp_clist, cl_number_or_name, str,
direct, style);
"Specify community to accept\n"
"An ordered list as a regular-expression\n")
+ALIAS(no_extcommunity_list_expanded_all,
+ no_ip_extcommunity_list_expanded_all_list_cmd,
+ "no ip extcommunity-list <(100-500)|expanded WORD>",
+ NO_STR IP_STR EXTCOMMUNITY_LIST_STR
+ "Extended Community list number (expanded)\n"
+ "Specify expanded extcommunity-list\n"
+ "Extended Community list name\n")
+
+ALIAS(no_extcommunity_list_expanded_all,
+ no_bgp_extcommunity_list_expanded_all_list_cmd,
+ "no bgp extcommunity-list <(100-500)|expanded WORD>",
+ NO_STR IP_STR EXTCOMMUNITY_LIST_STR
+ "Extended Community list number (expanded)\n"
+ "Specify expanded extcommunity-list\n"
+ "Extended Community list name\n")
+
static void extcommunity_list_show(struct vty *vty, struct community_list *list)
{
struct community_entry *entry;
install_element(CONFIG_NODE, &bgp_extcommunity_list_standard_cmd);
install_element(CONFIG_NODE, &bgp_extcommunity_list_name_expanded_cmd);
install_element(CONFIG_NODE, &no_bgp_extcommunity_list_standard_all_cmd);
+ install_element(CONFIG_NODE,
+ &no_bgp_extcommunity_list_standard_all_list_cmd);
install_element(CONFIG_NODE, &no_bgp_extcommunity_list_expanded_all_cmd);
+ install_element(CONFIG_NODE,
+ &no_bgp_extcommunity_list_expanded_all_list_cmd);
install_element(VIEW_NODE, &show_bgp_extcommunity_list_cmd);
install_element(VIEW_NODE, &show_bgp_extcommunity_list_arg_cmd);
install_element(CONFIG_NODE, &ip_extcommunity_list_standard_cmd);
install_element(CONFIG_NODE, &ip_extcommunity_list_name_expanded_cmd);
install_element(CONFIG_NODE, &no_ip_extcommunity_list_standard_all_cmd);
+ install_element(CONFIG_NODE, &no_ip_extcommunity_list_standard_all_list_cmd);
install_element(CONFIG_NODE, &no_ip_extcommunity_list_expanded_all_cmd);
+ install_element(CONFIG_NODE, &no_ip_extcommunity_list_expanded_all_list_cmd);
install_element(VIEW_NODE, &show_ip_extcommunity_list_cmd);
install_element(VIEW_NODE, &show_ip_extcommunity_list_arg_cmd);