Merge pull request #9715 from idryzhov/cleanup-number-named-acl

*: cleanup number-named access-lists in CLI
This commit is contained in:
Donatas Abraitis 2021-10-13 10:00:43 +03:00 committed by GitHub
commit 314479e114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 41 additions and 90 deletions

View File

@ -4576,13 +4576,11 @@ DEFUN_YANG (no_match_probability,
DEFPY_YANG (match_ip_route_source,
match_ip_route_source_cmd,
"match ip route-source <(1-199)|(1300-2699)|WORD>",
"match ip route-source WORD",
MATCH_STR
IP_STR
"Match advertising source address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP standard access-list name\n")
"IP Access-list name\n")
{
const char *xpath =
"./match-condition[condition='frr-bgp-route-map:ip-route-source']";
@ -4602,14 +4600,12 @@ DEFPY_YANG (match_ip_route_source,
DEFUN_YANG (no_match_ip_route_source,
no_match_ip_route_source_cmd,
"no match ip route-source [<(1-199)|(1300-2699)|WORD>]",
"no match ip route-source [WORD]",
NO_STR
MATCH_STR
IP_STR
"Match advertising source address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP standard access-list name\n")
"IP Access-list name\n")
{
const char *xpath =
"./match-condition[condition='frr-bgp-route-map:ip-route-source']";

View File

@ -7018,12 +7018,10 @@ DEFUN (no_neighbor_interface,
DEFUN (neighbor_distribute_list,
neighbor_distribute_list_cmd,
"neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list <(1-199)|(1300-2699)|WORD> <in|out>",
"neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list WORD <in|out>",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Filter updates to/from this neighbor\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n"
"Filter incoming updates\n"
"Filter outgoing updates\n")
@ -7051,24 +7049,20 @@ DEFUN (neighbor_distribute_list,
ALIAS_HIDDEN(
neighbor_distribute_list, neighbor_distribute_list_hidden_cmd,
"neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list <(1-199)|(1300-2699)|WORD> <in|out>",
"neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list WORD <in|out>",
NEIGHBOR_STR NEIGHBOR_ADDR_STR2
"Filter updates to/from this neighbor\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n"
"Filter incoming updates\n"
"Filter outgoing updates\n")
DEFUN (no_neighbor_distribute_list,
no_neighbor_distribute_list_cmd,
"no neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list <(1-199)|(1300-2699)|WORD> <in|out>",
"no neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list WORD <in|out>",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Filter updates to/from this neighbor\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n"
"Filter incoming updates\n"
"Filter outgoing updates\n")
@ -7094,11 +7088,9 @@ DEFUN (no_neighbor_distribute_list,
ALIAS_HIDDEN(
no_neighbor_distribute_list, no_neighbor_distribute_list_hidden_cmd,
"no neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list <(1-199)|(1300-2699)|WORD> <in|out>",
"no neighbor <A.B.C.D|X:X::X:X|WORD> distribute-list WORD <in|out>",
NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
"Filter updates to/from this neighbor\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n"
"Filter incoming updates\n"
"Filter outgoing updates\n")

View File

@ -858,12 +858,10 @@ ALIAS(no_match_interface, no_match_interface_val_cmd, "no match interface WORD",
DEFUN (match_ip_next_hop,
match_ip_next_hop_cmd,
"match ip next-hop ((1-199)|(1300-2699)|WORD)",
"match ip next-hop WORD",
MATCH_STR
IP_STR
"Match next-hop address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
return eigrp_route_match_add(vty, vty->index, "ip next-hop", argv[0]);
@ -886,10 +884,8 @@ DEFUN (no_match_ip_next_hop,
}
ALIAS(no_match_ip_next_hop, no_match_ip_next_hop_val_cmd,
"no match ip next-hop ((1-199)|(1300-2699)|WORD)", NO_STR MATCH_STR IP_STR
"no match ip next-hop WORD", NO_STR MATCH_STR IP_STR
"Match next-hop address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
DEFUN (match_ip_next_hop_prefix_list,
@ -931,12 +927,10 @@ ALIAS(no_match_ip_next_hop_prefix_list,
DEFUN (match_ip_address,
match_ip_address_cmd,
"match ip address ((1-199)|(1300-2699)|WORD)",
"match ip address WORD",
MATCH_STR
IP_STR
"Match address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
return eigrp_route_match_add(vty, vty->index, "ip address", argv[0]);
@ -958,10 +952,8 @@ DEFUN (no_match_ip_address,
}
ALIAS(no_match_ip_address, no_match_ip_address_val_cmd,
"no match ip address ((1-199)|(1300-2699)|WORD)", NO_STR MATCH_STR IP_STR
"no match ip address WORD", NO_STR MATCH_STR IP_STR
"Match address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
DEFUN (match_ip_address_prefix_list,

View File

@ -253,14 +253,12 @@ DEFPY (ldp_allow_broken_lsps,
DEFPY (ldp_discovery_targeted_hello_accept,
ldp_discovery_targeted_hello_accept_cmd,
"[no] discovery targeted-hello accept [from <(1-199)|(1300-2699)|WORD>$from_acl]",
"[no] discovery targeted-hello accept [from WORD$from_acl]",
NO_STR
"Configure discovery parameters\n"
"LDP Targeted Hellos\n"
"Accept and respond to targeted hellos\n"
"Access list to specify acceptable targeted hello source\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n")
{
return (ldp_vty_targeted_hello_accept(vty, no, from_acl));
@ -290,18 +288,14 @@ DEFPY (ldp_discovery_transport_address_ipv6,
DEFPY (ldp_label_local_advertise,
ldp_label_local_advertise_cmd,
"[no] label local advertise [{to <(1-199)|(1300-2699)|WORD>$to_acl|for <(1-199)|(1300-2699)|WORD>$for_acl}]",
"[no] label local advertise [{to WORD$to_acl|for WORD$for_acl}]",
NO_STR
"Configure label control and policies\n"
"Configure local label control and policies\n"
"Configure outbound label advertisement control\n"
"IP Access-list specifying controls on LDP Peers\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n"
"IP access-list for destination prefixes\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n")
{
return (ldp_vty_label_advertise(vty, no, to_acl, for_acl));
@ -309,15 +303,13 @@ DEFPY (ldp_label_local_advertise,
DEFPY (ldp_label_local_advertise_explicit_null,
ldp_label_local_advertise_explicit_null_cmd,
"[no] label local advertise explicit-null [for <(1-199)|(1300-2699)|WORD>$for_acl]",
"[no] label local advertise explicit-null [for WORD$for_acl]",
NO_STR
"Configure label control and policies\n"
"Configure local label control and policies\n"
"Configure outbound label advertisement control\n"
"Configure explicit-null advertisement\n"
"IP access-list for destination prefixes\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n")
{
return (ldp_vty_label_expnull(vty, no, for_acl));
@ -325,15 +317,13 @@ DEFPY (ldp_label_local_advertise_explicit_null,
DEFPY (ldp_label_local_allocate,
ldp_label_local_allocate_cmd,
"[no] label local allocate <host-routes$host_routes|for <(1-199)|(1300-2699)|WORD>$for_acl>",
"[no] label local allocate <host-routes$host_routes|for WORD$for_acl>",
NO_STR
"Configure label control and policies\n"
"Configure local label control and policies\n"
"Configure label allocation control\n"
"allocate local label for host routes only\n"
"IP access-list\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n")
{
return (ldp_vty_label_allocate(vty, no, host_routes, for_acl));
@ -341,18 +331,14 @@ DEFPY (ldp_label_local_allocate,
DEFPY (ldp_label_remote_accept,
ldp_label_remote_accept_cmd,
"[no] label remote accept {from <(1-199)|(1300-2699)|WORD>$from_acl|for <(1-199)|(1300-2699)|WORD>$for_acl}",
"[no] label remote accept {from WORD$from_acl|for WORD$for_acl}",
NO_STR
"Configure label control and policies\n"
"Configure remote/peer label control and policies\n"
"Configure inbound label acceptance control\n"
"Neighbor from whom to accept label advertisement\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n"
"IP access-list for destination prefixes\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP access-list name\n")
{
return (ldp_vty_label_accept(vty, no, from_acl, for_acl));

View File

@ -635,15 +635,11 @@ DEFUN (show_ip_access_list,
DEFUN (show_ip_access_list_name,
show_ip_access_list_name_cmd,
"show ip access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD> [json]",
"show ip access-list WORD [json]",
SHOW_STR
IP_STR
"List IP access lists\n"
"IP standard access list\n"
"IP extended access list\n"
"IP standard access list (expanded range)\n"
"IP extended access list (expanded range)\n"
"IP zebra access-list\n"
"IP access-list name\n"
JSON_STR)
{
bool uj = use_json(argc, argv);
@ -669,7 +665,7 @@ DEFUN (show_ipv6_access_list_name,
SHOW_STR
IPV6_STR
"List IPv6 access lists\n"
"IPv6 zebra access-list\n"
"IPv6 access-list name\n"
JSON_STR)
{
bool uj = use_json(argc, argv);

View File

@ -36,10 +36,7 @@
#endif /* VTYSH_EXTRACT_PL */
#define ACCESS_LIST_STR "Access list entry\n"
#define ACCESS_LIST_LEG_STR "IP standard access list\n"
#define ACCESS_LIST_ELEG_STR "IP extended access list\n"
#define ACCESS_LIST_ELEG_EXT_STR "IP extended access list (expanded range)\n"
#define ACCESS_LIST_ZEBRA_STR "Access list entry\n"
#define ACCESS_LIST_ZEBRA_STR "Access list name\n"
#define ACCESS_LIST_SEQ_STR \
"Sequence number of an entry\n" \
"Sequence number\n"
@ -137,7 +134,7 @@ DEFPY_YANG(
access_list_std, access_list_std_cmd,
"access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <[host] A.B.C.D$host|A.B.C.D$host A.B.C.D$mask>",
ACCESS_LIST_STR
ACCESS_LIST_LEG_STR
ACCESS_LIST_ZEBRA_STR
ACCESS_LIST_SEQ_STR
ACCESS_LIST_ACTION_STR
"A single host address\n"
@ -214,7 +211,7 @@ DEFPY_YANG(
"no access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action <[host] A.B.C.D$host|A.B.C.D$host A.B.C.D$mask>",
NO_STR
ACCESS_LIST_STR
ACCESS_LIST_LEG_STR
ACCESS_LIST_ZEBRA_STR
ACCESS_LIST_SEQ_STR
ACCESS_LIST_ACTION_STR
"A single host address\n"
@ -258,7 +255,7 @@ DEFPY_YANG(
access_list_ext, access_list_ext_cmd,
"access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action ip <A.B.C.D$src A.B.C.D$src_mask|host A.B.C.D$src|any> <A.B.C.D$dst A.B.C.D$dst_mask|host A.B.C.D$dst|any>",
ACCESS_LIST_STR
ACCESS_LIST_ELEG_STR
ACCESS_LIST_ZEBRA_STR
ACCESS_LIST_SEQ_STR
ACCESS_LIST_ACTION_STR
"IPv4 address\n"
@ -377,7 +374,7 @@ DEFPY_YANG(
"no access-list WORD$name [seq (1-4294967295)$seq] <deny|permit>$action ip <A.B.C.D$src A.B.C.D$src_mask|host A.B.C.D$src|any> <A.B.C.D$dst A.B.C.D$dst_mask|host A.B.C.D$dst|any>",
NO_STR
ACCESS_LIST_STR
ACCESS_LIST_ELEG_STR
ACCESS_LIST_ZEBRA_STR
ACCESS_LIST_SEQ_STR
ACCESS_LIST_ACTION_STR
"Any Internet Protocol\n"

View File

@ -165,12 +165,10 @@ DEFPY_YANG(
DEFPY_YANG(
match_ip_address, match_ip_address_cmd,
"match ip address <(1-199)|(1300-2699)|WORD>$name",
"match ip address WORD$name",
MATCH_STR
IP_STR
"Match address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
const char *xpath =
@ -187,13 +185,11 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ip_address, no_match_ip_address_cmd,
"no match ip address [<(1-199)|(1300-2699)|WORD>]",
"no match ip address [WORD]",
NO_STR
MATCH_STR
IP_STR
"Match address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
const char *xpath =
@ -246,12 +242,10 @@ DEFPY_YANG(
DEFPY_YANG(
match_ip_next_hop, match_ip_next_hop_cmd,
"match ip next-hop <(1-199)|(1300-2699)|WORD>$name",
"match ip next-hop WORD$name",
MATCH_STR
IP_STR
"Match next-hop address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
const char *xpath =
@ -268,13 +262,11 @@ DEFPY_YANG(
DEFPY_YANG(
no_match_ip_next_hop, no_match_ip_next_hop_cmd,
"no match ip next-hop [<(1-199)|(1300-2699)|WORD>]",
"no match ip next-hop [WORD]",
NO_STR
MATCH_STR
IP_STR
"Match address of route\n"
"IP access-list number\n"
"IP access-list number (expanded range)\n"
"IP Access-list name\n")
{
const char *xpath =

View File

@ -191,38 +191,38 @@ execute strict 'no ipv6 nd mtu 1'@11: rv==0, 'no ipv6 nd mtu <1-65535>': '1'
complete 'no ipv6 nd mtu 1'@11: rv==2
describe 'no ipv6 nd mtu 1'@11: rv==0
'<1-65535>' 'MTU in bytes'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@17: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@17: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@17: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@17: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
complete 'no neighbor 1.2.3.4 distribute-list 1 in'@17: rv==7
'in'
describe 'no neighbor 1.2.3.4 distribute-list 1 in'@17: rv==0
'in' 'Filter incoming updates'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@18: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@18: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@18: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@18: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
complete 'no neighbor 1.2.3.4 distribute-list 1 in'@18: rv==7
'in'
describe 'no neighbor 1.2.3.4 distribute-list 1 in'@18: rv==0
'in' 'Filter incoming updates'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@19: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@19: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@19: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@19: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
complete 'no neighbor 1.2.3.4 distribute-list 1 in'@19: rv==7
'in'
describe 'no neighbor 1.2.3.4 distribute-list 1 in'@19: rv==0
'in' 'Filter incoming updates'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@20: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@20: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@20: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@20: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
complete 'no neighbor 1.2.3.4 distribute-list 1 in'@20: rv==7
'in'
describe 'no neighbor 1.2.3.4 distribute-list 1 in'@20: rv==0
'in' 'Filter incoming updates'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@21: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@21: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@21: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@21: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
complete 'no neighbor 1.2.3.4 distribute-list 1 in'@21: rv==7
'in'
describe 'no neighbor 1.2.3.4 distribute-list 1 in'@21: rv==0
'in' 'Filter incoming updates'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@22: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@22: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list (<1-199>|<1300-2699>|WORD) (in|out)': '1.2.3.4', '1', 'in'
execute relaxed 'no neighbor 1.2.3.4 distribute-list 1 in'@22: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
execute strict 'no neighbor 1.2.3.4 distribute-list 1 in'@22: rv==0, 'no neighbor (A.B.C.D|X:X::X:X|WORD) distribute-list WORD (in|out)': '1.2.3.4', '1', 'in'
complete 'no neighbor 1.2.3.4 distribute-list 1 in'@22: rv==7
'in'
describe 'no neighbor 1.2.3.4 distribute-list 1 in'@22: rv==0