mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 18:42:23 +00:00
*: use af-specific autocompletion for prefix-lists when possible
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
7ef83dcf0c
commit
c1b4976786
40
lib/plist.c
40
lib/plist.c
@ -1229,7 +1229,7 @@ static int vty_clear_prefix_list(struct vty *vty, afi_t afi, const char *name,
|
||||
|
||||
DEFPY (show_ip_prefix_list,
|
||||
show_ip_prefix_list_cmd,
|
||||
"show ip prefix-list [WORD [seq$dseq (1-4294967295)$arg]] [json$uj]",
|
||||
"show ip prefix-list [PREFIXLIST4_NAME$name [seq$dseq (1-4294967295)$arg]] [json$uj]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1242,13 +1242,13 @@ DEFPY (show_ip_prefix_list,
|
||||
if (dseq)
|
||||
dtype = sequential_display;
|
||||
|
||||
return vty_show_prefix_list(vty, AFI_IP, prefix_list, arg_str, dtype,
|
||||
return vty_show_prefix_list(vty, AFI_IP, name, arg_str, dtype,
|
||||
!!uj);
|
||||
}
|
||||
|
||||
DEFPY (show_ip_prefix_list_prefix,
|
||||
show_ip_prefix_list_prefix_cmd,
|
||||
"show ip prefix-list WORD A.B.C.D/M$prefix [longer$dl|first-match$dfm]",
|
||||
"show ip prefix-list PREFIXLIST4_NAME$name A.B.C.D/M$prefix [longer$dl|first-match$dfm]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1263,13 +1263,13 @@ DEFPY (show_ip_prefix_list_prefix,
|
||||
else if (dfm)
|
||||
dtype = first_match_display;
|
||||
|
||||
return vty_show_prefix_list_prefix(vty, AFI_IP, prefix_list, prefix_str,
|
||||
return vty_show_prefix_list_prefix(vty, AFI_IP, name, prefix_str,
|
||||
dtype);
|
||||
}
|
||||
|
||||
DEFPY (show_ip_prefix_list_summary,
|
||||
show_ip_prefix_list_summary_cmd,
|
||||
"show ip prefix-list summary [WORD$prefix_list] [json$uj]",
|
||||
"show ip prefix-list summary [PREFIXLIST4_NAME$name] [json$uj]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1277,13 +1277,13 @@ DEFPY (show_ip_prefix_list_summary,
|
||||
"Name of a prefix list\n"
|
||||
JSON_STR)
|
||||
{
|
||||
return vty_show_prefix_list(vty, AFI_IP, prefix_list, NULL,
|
||||
return vty_show_prefix_list(vty, AFI_IP, name, NULL,
|
||||
summary_display, !!uj);
|
||||
}
|
||||
|
||||
DEFPY (show_ip_prefix_list_detail,
|
||||
show_ip_prefix_list_detail_cmd,
|
||||
"show ip prefix-list detail [WORD$prefix_list] [json$uj]",
|
||||
"show ip prefix-list detail [PREFIXLIST4_NAME$name] [json$uj]",
|
||||
SHOW_STR
|
||||
IP_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1291,25 +1291,25 @@ DEFPY (show_ip_prefix_list_detail,
|
||||
"Name of a prefix list\n"
|
||||
JSON_STR)
|
||||
{
|
||||
return vty_show_prefix_list(vty, AFI_IP, prefix_list, NULL,
|
||||
return vty_show_prefix_list(vty, AFI_IP, name, NULL,
|
||||
detail_display, !!uj);
|
||||
}
|
||||
|
||||
DEFPY (clear_ip_prefix_list,
|
||||
clear_ip_prefix_list_cmd,
|
||||
"clear ip prefix-list [WORD [A.B.C.D/M$prefix]]",
|
||||
"clear ip prefix-list [PREFIXLIST4_NAME$name [A.B.C.D/M$prefix]]",
|
||||
CLEAR_STR
|
||||
IP_STR
|
||||
PREFIX_LIST_STR
|
||||
"Name of a prefix list\n"
|
||||
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n")
|
||||
{
|
||||
return vty_clear_prefix_list(vty, AFI_IP, prefix_list, prefix_str);
|
||||
return vty_clear_prefix_list(vty, AFI_IP, name, prefix_str);
|
||||
}
|
||||
|
||||
DEFPY (show_ipv6_prefix_list,
|
||||
show_ipv6_prefix_list_cmd,
|
||||
"show ipv6 prefix-list [WORD [seq$dseq (1-4294967295)$arg]] [json$uj]",
|
||||
"show ipv6 prefix-list [PREFIXLIST6_NAME$name [seq$dseq (1-4294967295)$arg]] [json$uj]",
|
||||
SHOW_STR
|
||||
IPV6_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1322,13 +1322,13 @@ DEFPY (show_ipv6_prefix_list,
|
||||
if (dseq)
|
||||
dtype = sequential_display;
|
||||
|
||||
return vty_show_prefix_list(vty, AFI_IP6, prefix_list, arg_str, dtype,
|
||||
return vty_show_prefix_list(vty, AFI_IP6, name, arg_str, dtype,
|
||||
!!uj);
|
||||
}
|
||||
|
||||
DEFPY (show_ipv6_prefix_list_prefix,
|
||||
show_ipv6_prefix_list_prefix_cmd,
|
||||
"show ipv6 prefix-list WORD X:X::X:X/M$prefix [longer$dl|first-match$dfm]",
|
||||
"show ipv6 prefix-list PREFIXLIST6_NAME$name X:X::X:X/M$prefix [longer$dl|first-match$dfm]",
|
||||
SHOW_STR
|
||||
IPV6_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1343,13 +1343,13 @@ DEFPY (show_ipv6_prefix_list_prefix,
|
||||
else if (dfm)
|
||||
dtype = first_match_display;
|
||||
|
||||
return vty_show_prefix_list_prefix(vty, AFI_IP6, prefix_list,
|
||||
return vty_show_prefix_list_prefix(vty, AFI_IP6, name,
|
||||
prefix_str, dtype);
|
||||
}
|
||||
|
||||
DEFPY (show_ipv6_prefix_list_summary,
|
||||
show_ipv6_prefix_list_summary_cmd,
|
||||
"show ipv6 prefix-list summary [WORD$prefix-list] [json$uj]",
|
||||
"show ipv6 prefix-list summary [PREFIXLIST6_NAME$name] [json$uj]",
|
||||
SHOW_STR
|
||||
IPV6_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1357,13 +1357,13 @@ DEFPY (show_ipv6_prefix_list_summary,
|
||||
"Name of a prefix list\n"
|
||||
JSON_STR)
|
||||
{
|
||||
return vty_show_prefix_list(vty, AFI_IP6, prefix_list, NULL,
|
||||
return vty_show_prefix_list(vty, AFI_IP6, name, NULL,
|
||||
summary_display, !!uj);
|
||||
}
|
||||
|
||||
DEFPY (show_ipv6_prefix_list_detail,
|
||||
show_ipv6_prefix_list_detail_cmd,
|
||||
"show ipv6 prefix-list detail [WORD$prefix-list] [json$uj]",
|
||||
"show ipv6 prefix-list detail [PREFIXLIST6_NAME$name] [json$uj]",
|
||||
SHOW_STR
|
||||
IPV6_STR
|
||||
PREFIX_LIST_STR
|
||||
@ -1371,20 +1371,20 @@ DEFPY (show_ipv6_prefix_list_detail,
|
||||
"Name of a prefix list\n"
|
||||
JSON_STR)
|
||||
{
|
||||
return vty_show_prefix_list(vty, AFI_IP6, prefix_list, NULL,
|
||||
return vty_show_prefix_list(vty, AFI_IP6, name, NULL,
|
||||
detail_display, !!uj);
|
||||
}
|
||||
|
||||
DEFPY (clear_ipv6_prefix_list,
|
||||
clear_ipv6_prefix_list_cmd,
|
||||
"clear ipv6 prefix-list [WORD [X:X::X:X/M$prefix]]",
|
||||
"clear ipv6 prefix-list [PREFIXLIST6_NAME$name [X:X::X:X/M$prefix]]",
|
||||
CLEAR_STR
|
||||
IPV6_STR
|
||||
PREFIX_LIST_STR
|
||||
"Name of a prefix list\n"
|
||||
"IPv6 prefix <network>/<length>, e.g., 3ffe::/16\n")
|
||||
{
|
||||
return vty_clear_prefix_list(vty, AFI_IP6, prefix_list, prefix_str);
|
||||
return vty_clear_prefix_list(vty, AFI_IP6, name, prefix_str);
|
||||
}
|
||||
|
||||
DEFPY (debug_prefix_list_match,
|
||||
|
@ -188,7 +188,7 @@ DEFPY_YANG(
|
||||
DEFPY_YANG(
|
||||
match_ip_address_prefix_list,
|
||||
match_ip_address_prefix_list_cmd,
|
||||
"match ip address prefix-list PREFIXLIST_NAME$name",
|
||||
"match ip address prefix-list PREFIXLIST4_NAME$name",
|
||||
MATCH_STR
|
||||
IP_STR
|
||||
"Match address of route\n"
|
||||
@ -209,7 +209,7 @@ DEFPY_YANG(
|
||||
|
||||
DEFPY_YANG(
|
||||
no_match_ip_address_prefix_list, no_match_ip_address_prefix_list_cmd,
|
||||
"no match ip address prefix-list [PREFIXLIST_NAME]",
|
||||
"no match ip address prefix-list [PREFIXLIST4_NAME]",
|
||||
NO_STR
|
||||
MATCH_STR
|
||||
IP_STR
|
||||
@ -265,7 +265,7 @@ DEFPY_YANG(
|
||||
DEFPY_YANG(
|
||||
match_ip_next_hop_prefix_list,
|
||||
match_ip_next_hop_prefix_list_cmd,
|
||||
"match ip next-hop prefix-list PREFIXLIST_NAME$name",
|
||||
"match ip next-hop prefix-list PREFIXLIST4_NAME$name",
|
||||
MATCH_STR
|
||||
IP_STR
|
||||
"Match next-hop address of route\n"
|
||||
@ -287,7 +287,7 @@ DEFPY_YANG(
|
||||
DEFPY_YANG(
|
||||
no_match_ip_next_hop_prefix_list,
|
||||
no_match_ip_next_hop_prefix_list_cmd,
|
||||
"no match ip next-hop prefix-list [PREFIXLIST_NAME]",
|
||||
"no match ip next-hop prefix-list [PREFIXLIST4_NAME]",
|
||||
NO_STR
|
||||
MATCH_STR
|
||||
IP_STR
|
||||
@ -379,7 +379,7 @@ DEFPY_YANG(
|
||||
|
||||
DEFPY_YANG(
|
||||
match_ipv6_address_prefix_list, match_ipv6_address_prefix_list_cmd,
|
||||
"match ipv6 address prefix-list PREFIXLIST_NAME$name",
|
||||
"match ipv6 address prefix-list PREFIXLIST6_NAME$name",
|
||||
MATCH_STR
|
||||
IPV6_STR
|
||||
"Match address of route\n"
|
||||
@ -401,7 +401,7 @@ DEFPY_YANG(
|
||||
DEFPY_YANG(
|
||||
no_match_ipv6_address_prefix_list,
|
||||
no_match_ipv6_address_prefix_list_cmd,
|
||||
"no match ipv6 address prefix-list [PREFIXLIST_NAME]",
|
||||
"no match ipv6 address prefix-list [PREFIXLIST6_NAME]",
|
||||
NO_STR
|
||||
MATCH_STR
|
||||
IPV6_STR
|
||||
|
@ -731,7 +731,7 @@ void ospf6_area_config_write(struct vty *vty, struct ospf6 *ospf6)
|
||||
|
||||
DEFUN (area_filter_list,
|
||||
area_filter_list_cmd,
|
||||
"area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST_NAME <in|out>",
|
||||
"area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST6_NAME <in|out>",
|
||||
"OSPF6 area parameters\n"
|
||||
"OSPF6 area ID in IP address format\n"
|
||||
"OSPF6 area ID as a decimal value\n"
|
||||
@ -774,7 +774,7 @@ DEFUN (area_filter_list,
|
||||
|
||||
DEFUN (no_area_filter_list,
|
||||
no_area_filter_list_cmd,
|
||||
"no area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST_NAME <in|out>",
|
||||
"no area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST6_NAME <in|out>",
|
||||
NO_STR
|
||||
"OSPF6 area parameters\n"
|
||||
"OSPF6 area ID in IP address format\n"
|
||||
|
@ -2396,7 +2396,7 @@ DEFUN(no_ipv6_ospf6_mtu_ignore, no_ipv6_ospf6_mtu_ignore_cmd,
|
||||
}
|
||||
|
||||
DEFUN(ipv6_ospf6_advertise_prefix_list, ipv6_ospf6_advertise_prefix_list_cmd,
|
||||
"ipv6 ospf6 advertise prefix-list WORD",
|
||||
"ipv6 ospf6 advertise prefix-list PREFIXLIST6_NAME",
|
||||
IP6_STR OSPF6_STR "Advertising options\n"
|
||||
"Filter prefix using prefix-list\n"
|
||||
"Prefix list name\n")
|
||||
@ -2431,7 +2431,7 @@ DEFUN(ipv6_ospf6_advertise_prefix_list, ipv6_ospf6_advertise_prefix_list_cmd,
|
||||
|
||||
DEFUN(no_ipv6_ospf6_advertise_prefix_list,
|
||||
no_ipv6_ospf6_advertise_prefix_list_cmd,
|
||||
"no ipv6 ospf6 advertise prefix-list [WORD]",
|
||||
"no ipv6 ospf6 advertise prefix-list [PREFIXLIST6_NAME]",
|
||||
NO_STR IP6_STR OSPF6_STR "Advertising options\n"
|
||||
"Filter prefix using prefix-list\n"
|
||||
"Prefix list name\n")
|
||||
|
@ -1872,7 +1872,7 @@ DEFUN (no_ospf_area_import_list,
|
||||
|
||||
DEFUN (ospf_area_filter_list,
|
||||
ospf_area_filter_list_cmd,
|
||||
"area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST_NAME <in|out>",
|
||||
"area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST4_NAME <in|out>",
|
||||
"OSPF area parameters\n"
|
||||
"OSPF area ID in IP address format\n"
|
||||
"OSPF area ID as a decimal value\n"
|
||||
@ -1917,7 +1917,7 @@ DEFUN (ospf_area_filter_list,
|
||||
|
||||
DEFUN (no_ospf_area_filter_list,
|
||||
no_ospf_area_filter_list_cmd,
|
||||
"no area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST_NAME <in|out>",
|
||||
"no area <A.B.C.D|(0-4294967295)> filter-list prefix PREFIXLIST4_NAME <in|out>",
|
||||
NO_STR
|
||||
"OSPF area parameters\n"
|
||||
"OSPF area ID in IP address format\n"
|
||||
|
@ -77,7 +77,7 @@ DEFPY (ipv6_pim_spt_switchover_infinity,
|
||||
|
||||
DEFPY (ipv6_pim_spt_switchover_infinity_plist,
|
||||
ipv6_pim_spt_switchover_infinity_plist_cmd,
|
||||
"ipv6 pim spt-switchover infinity-and-beyond prefix-list WORD$plist",
|
||||
"ipv6 pim spt-switchover infinity-and-beyond prefix-list PREFIXLIST6_NAME$plist",
|
||||
IPV6_STR
|
||||
PIM_STR
|
||||
"SPT-Switchover\n"
|
||||
@ -102,7 +102,7 @@ DEFPY (no_ipv6_pim_spt_switchover_infinity,
|
||||
|
||||
DEFPY (no_ipv6_pim_spt_switchover_infinity_plist,
|
||||
no_ipv6_pim_spt_switchover_infinity_plist_cmd,
|
||||
"no ipv6 pim spt-switchover infinity-and-beyond prefix-list WORD",
|
||||
"no ipv6 pim spt-switchover infinity-and-beyond prefix-list PREFIXLIST6_NAME",
|
||||
NO_STR
|
||||
IPV6_STR
|
||||
PIM_STR
|
||||
@ -436,7 +436,7 @@ DEFPY (no_ipv6_pim_rp,
|
||||
|
||||
DEFPY (ipv6_pim_rp_prefix_list,
|
||||
ipv6_pim_rp_prefix_list_cmd,
|
||||
"ipv6 pim rp X:X::X:X$rp prefix-list WORD$plist",
|
||||
"ipv6 pim rp X:X::X:X$rp prefix-list PREFIXLIST6_NAME$plist",
|
||||
IPV6_STR
|
||||
PIM_STR
|
||||
"Rendezvous Point\n"
|
||||
@ -449,7 +449,7 @@ DEFPY (ipv6_pim_rp_prefix_list,
|
||||
|
||||
DEFPY (no_ipv6_pim_rp_prefix_list,
|
||||
no_ipv6_pim_rp_prefix_list_cmd,
|
||||
"no ipv6 pim rp X:X::X:X$rp prefix-list WORD$plist",
|
||||
"no ipv6 pim rp X:X::X:X$rp prefix-list PREFIXLIST6_NAME$plist",
|
||||
NO_STR
|
||||
IPV6_STR
|
||||
PIM_STR
|
||||
|
@ -2999,7 +2999,7 @@ DEFUN (ip_pim_spt_switchover_infinity,
|
||||
|
||||
DEFPY (ip_pim_spt_switchover_infinity_plist,
|
||||
ip_pim_spt_switchover_infinity_plist_cmd,
|
||||
"ip pim spt-switchover infinity-and-beyond prefix-list WORD$plist",
|
||||
"ip pim spt-switchover infinity-and-beyond prefix-list PREFIXLIST4_NAME$plist",
|
||||
IP_STR
|
||||
PIM_STR
|
||||
"SPT-Switchover\n"
|
||||
@ -3024,7 +3024,7 @@ DEFUN (no_ip_pim_spt_switchover_infinity,
|
||||
|
||||
DEFUN (no_ip_pim_spt_switchover_infinity_plist,
|
||||
no_ip_pim_spt_switchover_infinity_plist_cmd,
|
||||
"no ip pim spt-switchover infinity-and-beyond prefix-list WORD",
|
||||
"no ip pim spt-switchover infinity-and-beyond prefix-list PREFIXLIST4_NAME",
|
||||
NO_STR
|
||||
IP_STR
|
||||
PIM_STR
|
||||
@ -3038,7 +3038,7 @@ DEFUN (no_ip_pim_spt_switchover_infinity_plist,
|
||||
|
||||
DEFPY (pim_register_accept_list,
|
||||
pim_register_accept_list_cmd,
|
||||
"[no] ip pim register-accept-list WORD$word",
|
||||
"[no] ip pim register-accept-list PREFIXLIST4_NAME$word",
|
||||
NO_STR
|
||||
IP_STR
|
||||
PIM_STR
|
||||
@ -3283,7 +3283,7 @@ DEFPY (ip_pim_rp,
|
||||
|
||||
DEFPY (ip_pim_rp_prefix_list,
|
||||
ip_pim_rp_prefix_list_cmd,
|
||||
"ip pim rp A.B.C.D$rp prefix-list WORD$plist",
|
||||
"ip pim rp A.B.C.D$rp prefix-list PREFIXLIST4_NAME$plist",
|
||||
IP_STR
|
||||
"pim multicast routing\n"
|
||||
"Rendezvous Point\n"
|
||||
@ -3311,7 +3311,7 @@ DEFPY (no_ip_pim_rp,
|
||||
|
||||
DEFPY (no_ip_pim_rp_prefix_list,
|
||||
no_ip_pim_rp_prefix_list_cmd,
|
||||
"no ip pim rp A.B.C.D$rp prefix-list WORD$plist",
|
||||
"no ip pim rp A.B.C.D$rp prefix-list PREFIXLIST4_NAME$plist",
|
||||
NO_STR
|
||||
IP_STR
|
||||
"pim multicast routing\n"
|
||||
@ -3325,7 +3325,7 @@ DEFPY (no_ip_pim_rp_prefix_list,
|
||||
|
||||
DEFUN (ip_pim_ssm_prefix_list,
|
||||
ip_pim_ssm_prefix_list_cmd,
|
||||
"ip pim ssm prefix-list WORD",
|
||||
"ip pim ssm prefix-list PREFIXLIST4_NAME",
|
||||
IP_STR
|
||||
"pim multicast routing\n"
|
||||
"Source Specific Multicast\n"
|
||||
@ -3376,7 +3376,7 @@ DEFUN (no_ip_pim_ssm_prefix_list,
|
||||
|
||||
DEFUN (no_ip_pim_ssm_prefix_list_name,
|
||||
no_ip_pim_ssm_prefix_list_name_cmd,
|
||||
"no ip pim ssm prefix-list WORD",
|
||||
"no ip pim ssm prefix-list PREFIXLIST4_NAME",
|
||||
NO_STR
|
||||
IP_STR
|
||||
"pim multicast routing\n"
|
||||
|
Loading…
Reference in New Issue
Block a user