diff options
Diffstat (limited to 'templates/protocols')
188 files changed, 378 insertions, 396 deletions
diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def index 594d8782..cac0be3e 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def @@ -3,5 +3,4 @@ type: ipv6net help: Set a BGP IPv6 aggregate network comp_help: <h:h:h:h:h:h:h:h/x> IPv6 aggregate network - syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def index 14034a79..bd7e5909 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def @@ -3,5 +3,4 @@ type: ipv6net help: Set a BGP IPv6 network comp_help: <h:h:h:h:h:h:h:h/x> IPv6 network - syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def index 94f0b513..f122376d 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute connected: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def index 9e8181d8..e9099fe7 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute kernel: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def index a2cd8040..c822e491 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute ospfv3: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def index 97a43975..40876949 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute ripng: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def index 67b64a9b..6af666d7 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute static: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/address-family/node.def new file mode 100644 index 00000000..1b67a4a0 --- /dev/null +++ b/templates/protocols/bgp/node.tag/address-family/node.def @@ -0,0 +1 @@ +help: Set BGP address-family parameters diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def index 1d8c1946..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def index 5775dd0a..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def index 53ac8694..547a1c0b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def @@ -1,3 +1,2 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def index c05adfbe..a03cc588 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def @@ -1,2 +1 @@ help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def index f58079cc..2019178e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def @@ -1,4 +1,3 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" commit:expression: $VAR(../../../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../../../@) neighbor $VAR(../../../../../../@): you can't set capability orf prefix-list send for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def index 5d87e250..c50c2834 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def @@ -1,3 +1,2 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" commit:expression: $VAR(../../../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../../../@) neighbor $VAR(../../../../../../@): you can't set capability orf prefix-list send for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def index 235f049d..ca2c59d9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def @@ -1,3 +1,2 @@ help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def index 035d6c4a..bd0e0235 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def @@ -1,7 +1,9 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set default-originate route-map for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def index 557e0325..19496fb9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def @@ -1,3 +1,2 @@ help: Set to not send extended community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set disable-send-community extended for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def index d86b1030..ee0fa5b6 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def @@ -1,3 +1,2 @@ help: Set to not send standard community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set disable-send-community standard for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def index 883743c1..d24af594 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def @@ -4,11 +4,9 @@ comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name allowed: local -a params - params=( /opt/vyatta/config/active/policy/access-list/* - /opt/vyatta/config/active/policy/access-list6/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set distribute-list export for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def index c1d01abe..dccb1b14 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def @@ -3,8 +3,10 @@ help: Set an access-list to filter incoming route updates from this neighbor comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set distribute-list import for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def index 74a91681..523a6153 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def @@ -1,10 +1,8 @@ type: txt help: Set an as-path-list to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set filter-list export for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def index 6d6b8d65..b2b88266 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def @@ -1,10 +1,8 @@ type: txt help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set filter-list import for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def index baff6c76..de6ecf41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def @@ -2,4 +2,3 @@ type: u32 help: Set the maximum number of prefixes to accept from this neighbor comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def index 33ca0243..01f4361a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def @@ -1,2 +1 @@ help: Leave link-local nexthop unchanged for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def index b86137b1..95262bf2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def @@ -1,3 +1,2 @@ help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set nexthop-self for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/node.def new file mode 100644 index 00000000..20c0a335 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/node.def @@ -0,0 +1 @@ +help: Set BGP neighbor IPv6 parameters diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def index c98c20e9..241363e1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def @@ -1,17 +1,10 @@ type: txt - help: Set a prefix-list to filter outgoing route updates to this neighbor - -allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list6/*) - echo -n ${params[@]##*/} - comp_help: possible completions: <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" - +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) address-family ipv6-unicast prefix-list export: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def index 9ed5c7d9..26664bb8 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def @@ -1,18 +1,11 @@ type: txt - help: Set a prefix-list to filter incoming route updates from this neighbor - +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list6/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) echo -n ${params[@]##*/} - -comp_help: possible completions: - <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" - commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) address-family ipv6-unicast prefix-list import: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) address-family ipv6-unicast prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def index c25e42d2..9d8f8646 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def @@ -1,3 +1,2 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def index 0a366a1b..cd6423b1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def index 3e5920c7..02c348e2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter incoming route updates from this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def index cb87b992..2c99f906 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def @@ -1,4 +1,3 @@ help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(@) == $VAR(../../../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set route-reflector-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def index 2476a080..bc733823 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def @@ -1,3 +1,2 @@ help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set route-server-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def index b8bd724c..e3174775 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ - --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def index 2053b747..aea9c773 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def @@ -3,8 +3,7 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): route-map $VAR(@) doesn't exist" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set unsuppress-map for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def index 0e1b633b..0e6fb907 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def @@ -3,4 +3,3 @@ help: Set the minimum interval for sending routing updates comp_help: possible completions: <0-600> advertisement interval in seconds syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 600; "must be between 0 and 600" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def index 67b47667..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def index 59bbf053..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def index a23f4502..15e7eaf5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def @@ -1,3 +1,2 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def index 1ad03793..a03cc588 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def @@ -1,2 +1 @@ help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def index f228a5c3..4fcc6d3a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def @@ -1,3 +1,2 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set orf capability receive for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def index aff136ca..27247e17 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def @@ -1,3 +1,2 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def index 675adffd..0680df95 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def @@ -1,3 +1,2 @@ help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocold bgp $VAR(../../@) neighbor $VAR(../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def index f2209d3f..09d7a25c 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def @@ -1,7 +1,9 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) default-originate: route-map $VAR(@) doesn't exist" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def index f476e35e..04099bd2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def @@ -1,2 +1 @@ help: Set to not perform capability negotiation with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def index 98e3fb46..5f4fe431 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def @@ -1,2 +1 @@ help: Disable check to see if EBGP peer's address is a connected route -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def index 452e2792..53ed069a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def @@ -1,3 +1,2 @@ help: Set to not send extended community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set disable-send-community for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def index 6591deac..555abb9b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def @@ -1,3 +1,2 @@ help: Set to not send standard community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set disable-send-community for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def index cdce28d4..bd51c71d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def @@ -7,7 +7,6 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/access-list/* /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def index ad3944ac..9c88fd5e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def @@ -3,7 +3,10 @@ help: Set an access-list to filter incoming route updates from this neighbor comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def index d35d050e..2cfa6fe6 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def @@ -2,5 +2,5 @@ type: u32 help: Allow this EBGP neighbor to not be on a directly connected network comp_help: possible completions: <1-255> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 255; "ebgp-multihop must be between 1 and 255" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --not-exists \"protocols bgp $VAR(../../@) neighbor $VAR(../@) ttl-security\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) ebgp-multihop: you can't set both ebgp-multihop and ttl-security" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def index 47b1db77..c482a8a0 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def @@ -1,9 +1,8 @@ type: txt help: Set an as-path-list to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def index 23d1a8a9..270cbc83 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def @@ -1,9 +1,8 @@ type: txt help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def index a7de0ea8..54826976 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def @@ -5,4 +5,3 @@ comp_help: possible completions: <1-4294967294> local AS number syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294" commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set local-as the same as the router AS" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def index 98a1129f..de6ecf41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def @@ -2,4 +2,3 @@ type: u32 help: Set the maximum number of prefixes to accept from this neighbor comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def index ccbc5471..72a8ea1c 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def @@ -1,3 +1,2 @@ help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) next-hop-self: you can't set next-hop-self for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def index 5eec1b35..f86c2b4f 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def @@ -1,3 +1,2 @@ help: Set to ignore capability negotiation with specified neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) override-capability: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def index 46e8fc40..d73320bd 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def @@ -1,2 +1 @@ help: Set to not try initiating a session with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def index 1a5570ba..62d51de3 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def @@ -1,3 +1,2 @@ type: txt help: Set a peer group for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def index 0cb689b5..2f29d67d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def @@ -3,4 +3,3 @@ help: Set the neighbor's BGP port comp_help: \1 <1-65535>\tport number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; \ "port must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def index 23fea874..be2e5b69 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def @@ -1,17 +1,10 @@ type: txt - help: Set a prefix-list to filter outgoing route updates to this neighbor - -allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list/* ) - echo -n ${params[@]##*/} - comp_help: possible completions: <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list export: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def index 46aea90e..12e0eb8e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def @@ -1,18 +1,11 @@ type: txt - help: Set a prefix-list to filter incoming route updates from this neighbor - +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) echo -n ${params[@]##*/} - -comp_help: possible completions: - <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def index c234d2fc..067de3f2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def @@ -1,3 +1,2 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../../@): you can't set remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def index 59565211..5e99b260 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def index 30dcc8ca..ac3bc025 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter incoming route updates from this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def index 2fce607f..954e3938 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def @@ -1,4 +1,3 @@ help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-reflector-client for a neighbor in a peer-group" commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) neighbor $VAR(../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def index b1cb9e39..80041d4e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def @@ -1,3 +1,2 @@ help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-server-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def index 21863355..e3d75ed4 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def @@ -1,2 +1 @@ help: Set to administratively shut down neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def index b52799a6..e3174775 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ - --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def index f2eb3e24..0aa6af83 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def @@ -1,3 +1,2 @@ help: Enable strict capability negotiation -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../override-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) strict-capability-match: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def index 6fde9bd3..9e806ecf 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def @@ -1,5 +1,4 @@ help: Set neighbor timers -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" # TODO: fix this. Can set connect &&|| (keepalive && holdtime) commit:expression: $VAR(./keepalive/) != ""; "protocols bgp $VAR(../../@) timers: you must set a keepalive interval" commit:expression: $VAR(./holdtime/) != ""; "protocols bgp $VAR(../../@) timers: you must set a holdtime interval" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def index 468ebbb1..c5950865 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def @@ -2,5 +2,4 @@ type: u32 help: Set number of the maximum number of hops to the BGP peer comp_help: possible completions: <1-254> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 254; "ttl-security hops must be between 1 and 254" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/node.def new file mode 100644 index 00000000..05be9f5b --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/node.def @@ -0,0 +1,2 @@ +help: Set ttl security mechanism for this BGP peer +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --not-exists \"protocols bgp $VAR(../../@) neighbor $VAR(../@) ebgp-multihop\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) ttl-security: you can't set both ebgp-multihop and ttl-security" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def index 104a9509..65e37dd5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def @@ -3,8 +3,7 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set unsuppress-map for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) neighbor $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def index 63fc633c..ebfe8ee9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def @@ -4,4 +4,3 @@ comp_help: <x.x.x.x> Set IP address of route source <interface> Set interface as route source commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-source $VAR(@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def index e5da2d21..b758c97d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def @@ -2,4 +2,3 @@ type: u32 help: Set default weight for routes from this neighbor comp_help: \1 <1-65535>\tweight for routes from this neighbor syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "weight must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def index 97091ab3..740bf97b 100644 --- a/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def +++ b/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route-map to modify route attributes -comp_help: \1 <text>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) network $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def new file mode 100644 index 00000000..49039a49 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for external BGP routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for external BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def new file mode 100644 index 00000000..a7d68e2b --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for internal BGP routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for internal BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def new file mode 100644 index 00000000..ab98b327 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for local BGP routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for local BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/node.def new file mode 100644 index 00000000..ea7a99ef --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/node.def @@ -0,0 +1,4 @@ +help: Set global administratives distances for BGP routes +commit:expression: $VAR(./external/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set an external route distance" +commit:expression: $VAR(./internal/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set an internal route distance" +commit:expression: $VAR(./local/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set a local route distance" diff --git a/templates/protocols/bgp/node.tag/parameters/distance/node.def b/templates/protocols/bgp/node.tag/parameters/distance/node.def new file mode 100644 index 00000000..ef0704e2 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/node.def @@ -0,0 +1 @@ +help: Set administratives distances for BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def new file mode 100644 index 00000000..a8b0823c --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def @@ -0,0 +1,6 @@ +tag: +type: ipv4net +help: Set an administrative distance for a specific BGP prefix +comp_help: \1 <x.x.x.x/x>\tprefix +syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" +commit:expression: $VAR(./distance/) != ""; "protocols bgp $VAR(../../../@) parameters distance prefix $VAR(@): you must set a route distance for this prefix" diff --git a/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def new file mode 100644 index 00000000..37f9f625 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for prefix +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for external BGP routes diff --git a/templates/protocols/bgp/node.tag/peer-group/node.def b/templates/protocols/bgp/node.tag/peer-group/node.def index c773f6f0..74a0e5eb 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.def @@ -3,9 +3,7 @@ type: txt help: Set a BGP peer-group comp_help: <name> BGP peer-group name - syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ --check-peergroup-name $VAR(@)" -commit:expression: $VAR(./remote-as/) != ""; "protocols bgp $VAR(../@) peer-group $VAR(@): you must define a remote-as" delete:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ --check-peer-groups --peergroup $VAR(@) --as $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def index 664b70a9..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def index 4ca8b60f..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def index cb660bfc..719c0fd8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def @@ -1,3 +1 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def index c78c812c..653555ed 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def @@ -1,2 +1 @@ -help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set to advertise dynamic capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def index f83cac18..2452fc2b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def @@ -1 +1 @@ -help: Set to advertise capabilities to this neighbor +help: Set to advertise capabilities to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def index a0058566..ac420788 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def @@ -1 +1 @@ -help: Set to advertise ORF capability to this neighbor +help: Set to advertise ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def index cb911c75..d335cd56 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def @@ -1 +1 @@ -help: Set to advertise prefix-list ORF capability to this neighbor +help: Set to advertise prefix-list ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def index a917862e..c3850291 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def @@ -1,2 +1 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def index f6dae787..9e059106 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def @@ -1,2 +1 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def index a696ce4e..3335f496 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def @@ -1,2 +1 @@ -help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +help: Set to send default route to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def index 114c2142..5dd8e8dc 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def @@ -1,6 +1,8 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def index 910e9d8d..bae0ccb6 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def @@ -1,2 +1 @@ -help: Set to not send extended community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set to not send extended community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def index c77a13c4..824d3677 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def @@ -1,2 +1,2 @@ -help: Set to not send community attributes to this neighbor -commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../../../@) neighbor $(../../../@): you must specify the type of community" +help: Set to not send community attributes to this peer-group +commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../../../@) peer-group $(../../../@): you must specify the type of community" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def index dd5f389b..ee7b46bd 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def @@ -1,2 +1 @@ -help: Set to not send standard community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set to not send standard community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def index 7ab16827..8cd7aeee 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def @@ -1,13 +1,12 @@ type: txt -help: Set an access-list to filter outgoing route updates to this neighbor +help: Set an access-list to filter outgoing route updates to this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name allowed: local -a params - params=( /opt/vyatta/config/active/policy/access-list/* - /opt/vyatta/config/active/policy/access-list6/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ -"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def index a3b6c2b5..ed8084d0 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def @@ -1,9 +1,12 @@ type: txt -help: Set an access-list to filter incoming route updates from this neighbor +help: Set an access-list to filter incoming route updates from this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ -"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def index 4013725c..677b93af 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def @@ -1 +1 @@ -help: Set an access-list to filter route updates to/from this neighbor +help: Set an access-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def index 75a94dce..f98bb5b9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def @@ -1,9 +1,8 @@ type: txt -help: Set an as-path-list to filter outgoing route updates to this neighbor +help: Set an as-path-list to filter outgoing route updates to this peer-group +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def index 50f0de8b..f74b3d40 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def @@ -1,9 +1,8 @@ type: txt -help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} +help: Set an as-path-list to filter incoming route updates from this peer-group comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def index 191c561b..48d9267d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def @@ -1 +1 @@ -help: Set an as-path-list to filter route updates to/from this neighbor +help: Set an as-path-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def index 8859d66c..597e9a3b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def @@ -1,5 +1,4 @@ type: u32 -help: Set the maximum number of prefixes to accept from this neighbor +help: Set the maximum number of prefixes to accept from this peer-group comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def index f1790cb4..01f4361a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def @@ -1,2 +1 @@ help: Leave link-local nexthop unchanged for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def index 60115cbb..cec29d88 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def @@ -1,2 +1 @@ -help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +help: Set nexthop for routes sent to this peer-group to be the local router diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/node.def new file mode 100644 index 00000000..ac4d3626 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/node.def @@ -0,0 +1 @@ +help: Set BGP peer-group IPv6 parameters diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def index 61824722..a379cbc6 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def @@ -1,17 +1,10 @@ type: txt - -help: Set a prefix-list to filter outgoing route updates to this neighbor - -allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list6/*) - echo -n ${params[@]##*/} - +help: Set a prefix-list to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" - +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list export: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def index 46e3d06b..9ef4f0db 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def @@ -1,18 +1,11 @@ type: txt - -help: Set a prefix-list to filter incoming route updates from this neighbor - +help: Set a prefix-list to filter incoming route updates from this peer-group +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list6/*) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) echo -n ${params[@]##*/} - -comp_help: possible completions: - <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" - commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list import: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def index 1a6187c9..4d8960c2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def @@ -1 +1 @@ -help: Set a prefix-list to filter route updates to/from this neighbor +help: Set a prefix-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def index 4126e7b7..c045c88b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def @@ -1,2 +1 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def index 4dbca6be..6e7a49db 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def @@ -1,9 +1,8 @@ type: txt -help: Set a route-map to filter outgoing route updates to this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) - echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def index b0c0278d..0646123f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def @@ -1,9 +1,8 @@ type: txt -help: Set a route-map to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) - echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter incoming route updates from this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def index 7d581eb7..e444dc70 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def @@ -1 +1 @@ -help: Set a route-map to filter route updates to/from this neighbor +help: Set a route-map to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def index 9f95ebd7..e3ecb9dd 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def @@ -1,3 +1,2 @@ -help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" +help: Set peer-group as a route reflector client +commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def index d5378742..590ad079 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def @@ -1,2 +1 @@ -help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +help: Set peer-group as route server client diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def index 5ab933c5..f3a5369b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ -help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as \ - --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set inbound soft reconfiguration for this peer-group [REQUIRED] diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def index c17d82f9..93440825 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def @@ -1,2 +1,2 @@ -help: Set soft reconfiguration for neighbor -commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" +help: Set soft reconfiguration for peer-group +commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def index dbdf0c3f..a57c9e07 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def @@ -3,7 +3,6 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): route-map $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/node.def new file mode 100644 index 00000000..4c25aaf9 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/node.def @@ -0,0 +1 @@ +help: Set BGP peer-group address-family parameters diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def index 026dee4e..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def index 4677e1bc..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def index 9268c97a..719c0fd8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def @@ -1,3 +1 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def index 9867ed5f..653555ed 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def @@ -1,2 +1 @@ -help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +help: Set to advertise dynamic capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def index f83cac18..2452fc2b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def @@ -1 +1 @@ -help: Set to advertise capabilities to this neighbor +help: Set to advertise capabilities to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def index a0058566..ac420788 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def @@ -1 +1 @@ -help: Set to advertise ORF capability to this neighbor +help: Set to advertise ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def index cb911c75..d335cd56 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def @@ -1 +1 @@ -help: Set to advertise prefix-list ORF capability to this neighbor +help: Set to advertise prefix-list ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def index a20df446..c3850291 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def @@ -1,3 +1 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set orf capability receive for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def index 7cc2ff83..9e059106 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def @@ -1,3 +1 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def index 65e90e97..3335f496 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def @@ -1,3 +1 @@ -help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocold bgp $VAR(../../@) neighbor $VAR(../@): you can't set default-originate for a neighbor in a peer-group" +help: Set to send default route to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def index f2209d3f..e1825d4d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def @@ -1,7 +1,8 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) default-originate: route-map $VAR(@) doesn't exist" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set default-originate for a neighbor in a peer-group" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) default-originate: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def index 9b8fe210..3c817484 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Set a description for this neighbor +help: Set a description for this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def index 9f1b61a1..d237af93 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def @@ -1,2 +1 @@ -help: Set to not perform capability negotiation with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set to not perform capability negotiation with this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def index 649d95ff..5f4fe431 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def @@ -1,2 +1 @@ help: Disable check to see if EBGP peer's address is a connected route -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/extended/node.def new file mode 100644 index 00000000..bae0ccb6 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/extended/node.def @@ -0,0 +1 @@ +help: Set to not send extended community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def new file mode 100644 index 00000000..7dbad897 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def @@ -0,0 +1,2 @@ +help: Set to not send community attributes to this peer-group +commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../@) peer-group $(../@): you must specify the type of community" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/standard/node.def new file mode 100644 index 00000000..ee7b46bd --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/standard/node.def @@ -0,0 +1 @@ +help: Set to not send standard community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def index c71cfc9a..8aa19846 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def @@ -1,14 +1,12 @@ type: txt -help: Set an access-list to filter outgoing route updates to this neighbor +help: Set an access-list to filter outgoing route updates to this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name allowed: local -a params - params=( /opt/vyatta/config/active/policy/access-list/* + params=( /opt/vyatta/config/active/policy/access-list/* /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ -"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) export: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def index a8b94680..6b809d4a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def @@ -1,10 +1,12 @@ type: txt -help: Set an access-list to filter incoming route updates from this neighbor +help: Set an access-list to filter incoming route updates from this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" +allowed: local -a params + params=( /opt/vyatta/config/active/policy/access-list/* + /opt/vyatta/config/active/policy/access-list6/* ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ -"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) import: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def index 4013725c..677b93af 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def @@ -1 +1 @@ -help: Set an access-list to filter route updates to/from this neighbor +help: Set an access-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def index d9189858..f3606389 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def @@ -1,6 +1,6 @@ type: u32 -help: Allow this EBGP neighbor to not be on a directly connected network +help: Allow this EBGP peer-group to not be on a directly connected network comp_help: possible completions: <1-255> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 255; "ebgp-multihop must be between 1 and 255" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --not-exists \"protocols bgp $VAR(../../@) neighbor $VAR(../@) ttl-security\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) ebgp-multihop: you can't set both ebgp-multihop and ttl-security" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def index 252733c2..7463045d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def @@ -1,10 +1,8 @@ type: txt -help: Set an as-path-list to filter outgoing route updates to this neighbor +help: Set an as-path-list to filter outgoing route updates to this peer-group +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def index 27d545f2..940d10c9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def @@ -1,10 +1,8 @@ type: txt -help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} +help: Set an as-path-list to filter incoming route updates from this peer-group comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def index 191c561b..48d9267d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def @@ -1 +1 @@ -help: Set an as-path-list to filter route updates to/from this neighbor +help: Set an as-path-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def index d114b437..f0324871 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def @@ -4,5 +4,4 @@ help: Set the local AS number [REQUIRED] comp_help: possible completions: <1-4294967294> local AS number syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294" -commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set local-as the same as the router AS" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) peer-group $VAR(../@): you can't set local-as the same as the router AS" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def index 3dbf37c7..597e9a3b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def @@ -1,5 +1,4 @@ type: u32 -help: Set the maximum number of prefixes to accept from this neighbor +help: Set the maximum number of prefixes to accept from this peer-group comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def index b49d0b36..cec29d88 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def @@ -1,3 +1 @@ -help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) next-hop-self: you can't set next-hop-self for a neighbor in a peer-group" +help: Set nexthop for routes sent to this peer-group to be the local router diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def index 2abf4417..5229901a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def @@ -1,3 +1,2 @@ -help: Set to ignore capability negotiation with specified neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) override-capability: you can't set both strict-capability and override-capability" +help: Set to ignore capability negotiation with specified peer-group +commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) peer-group $VAR(../@) override-capability: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def index 773c3679..b14c84a8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def @@ -1,2 +1 @@ -help: Set to not try initiating a session with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set to not try initiating a session with this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def index 242f0590..7aa3b0a1 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def @@ -5,5 +5,4 @@ syntax:expression: exec " \ echo Password must be 80 characters or less;\ exit 1 ; \ fi ; " -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def index 02760aa4..7b525a6f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def @@ -1,19 +1,11 @@ type: txt - -help: Set a prefix-list to filter outgoing route updates to this neighbor - -allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list/* ) - echo -n ${params[@]##*/} - +help: Set a prefix-list to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list export: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def index a4ad0a7d..4cc48f27 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def @@ -1,20 +1,11 @@ type: txt - -help: Set a prefix-list to filter incoming route updates from this neighbor - +help: Set a prefix-list to filter incoming route updates from this peer-group +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) echo -n ${params[@]##*/} - -comp_help: possible completions: - <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" - commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def index 1a6187c9..4d8960c2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def @@ -1 +1 @@ -help: Set a prefix-list to filter route updates to/from this neighbor +help: Set a prefix-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def index a91de5a7..ea0d414f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set neighbor BGP AS number [REQUIRED] +help: Set peer-group BGP AS number [REQUIRED] comp_help: possible completions: <1-4294967294> AS number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; \ diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def index b03cfcf7..c045c88b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def @@ -1,3 +1 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../../@): you can't set remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def index acf73430..919fd488 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def @@ -1,10 +1,8 @@ type: txt -help: Set a route-map to filter outgoing route updates to this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) - echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-map for a neighbor in a peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) export: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def index 1240c80d..e9557c5b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def @@ -1,10 +1,8 @@ type: txt -help: Set a route-map to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) - echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-map for a neighbor in a peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter incoming route updates from this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) import: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def index 7d581eb7..e444dc70 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def @@ -1 +1 @@ -help: Set a route-map to filter route updates to/from this neighbor +help: Set a route-map to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def index 9409fdf5..201b31ff 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def @@ -1,4 +1,2 @@ -help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-reflector-client for a neighbor in a peer-group" -commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) neighbor $VAR(../@) route-reflector-client: remote-as must equal local-as" +help: Set peer-group as a route reflector client +commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) peer-group $VAR(../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def index 50345ba6..590ad079 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def @@ -1,3 +1 @@ -help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-server-client for a neighbor in a peer-group" +help: Set peer-group as route server client diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def index 758a08b5..1594cee8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def @@ -1,2 +1 @@ -help: Set to administratively shut down neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set to administratively shut down peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def index dee71305..f3a5369b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ -help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as \ - --as $VAR(../../../@) --neighbor $VAR(../../@)" +help: Set inbound soft reconfiguration for this peer-group [REQUIRED] diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def index 4c7f5706..4cf650b5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def @@ -1,2 +1,2 @@ -help: Set soft reconfiguration for neighbor -commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" +help: Set soft reconfiguration for peer-group +commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../@) peer-group $VAR(../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def index 3e00ec99..e236028f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the BGP connect timer for this neighbor +help: Set the BGP connect timer for this peer-group comp_help: \1 <1-65535>\tconnect timer in seconds 0\t\tdisable connect timer syntax:expression: $VAR(@) >=0 && $VAR(@) <= 65535; "BGP connect timer must be between 0 and 65535" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def index 3fcce7e2..ec308e9b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the BGP hold timer for this neighbor +help: Set the BGP hold timer for this peer-group comp_help: \1 <1-65535>\thold timer in seconds 0\t\tdisable hold timer syntax:expression: $VAR(@) == 0 || ($VAR(@) >= 4 && $VAR(@) <= 65535); "Holdtime interval must be 0 or between 4 and 65535" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def index cb47e1ce..b812e099 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def @@ -1,4 +1,4 @@ type: u32 -help: Set the BGP keepalive interval for this neighbor +help: Set the BGP keepalive interval for this peer-group comp_help: \1 <1-65535>\tkeepalive interval in seconds syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Keepalive interval must be between 1 and 65535" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def index 3265a524..8950a4b2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def @@ -1,5 +1,4 @@ -help: Set neighbor timers -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set peer-group timers # TODO: fix this. Can set connect &&|| (keepalive && holdtime) commit:expression: $VAR(./keepalive/) != ""; "protocols bgp $VAR(../../@) timers: you must set a keepalive interval" commit:expression: $VAR(./holdtime/) != ""; "protocols bgp $VAR(../../@) timers: you must set a holdtime interval" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def index 6e7c70a1..07c76466 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def @@ -3,7 +3,6 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) neighbor $VAR(../@): route-map $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) peer-group $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def index cf7fbd30..ebfe8ee9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def @@ -4,4 +4,3 @@ comp_help: <x.x.x.x> Set IP address of route source <interface> Set interface as route source commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-source $VAR(@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def index bfcd14aa..61e18254 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def @@ -1,5 +1,4 @@ type: u32 -help: Set default weight for routes from this neighbor -comp_help: \1 <1-65535>\tweight for routes from this neighbor +help: Set default weight for routes from this peer-group +comp_help: \1 <1-65535>\tweight for routes from this peer-group syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "weight must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def index 026de05a..b0da440f 100644 --- a/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute connected: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def index e513130e..ba345828 100644 --- a/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute kernel: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def index e2b5c019..82d9992b 100644 --- a/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute ospf: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def index b8461b4c..09dd58af 100644 --- a/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute rip: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def index 61352932..c1deb5a3 100644 --- a/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute static: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/bgp/node.def b/templates/protocols/ospfv3/redistribute/bgp/node.def new file mode 100644 index 00000000..72ea520e --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/bgp/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute bgp routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute bgp"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute bgp $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def b/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def new file mode 100644 index 00000000..cf70580f --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" + diff --git a/templates/protocols/ospfv3/redistribute/connected/node.def b/templates/protocols/ospfv3/redistribute/connected/node.def new file mode 100644 index 00000000..ee7cd585 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/connected/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute connected routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute connected"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute connected $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/connected/route-map/node.def b/templates/protocols/ospfv3/redistribute/connected/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/connected/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/kernel/node.def b/templates/protocols/ospfv3/redistribute/kernel/node.def new file mode 100644 index 00000000..f61cb564 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/kernel/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute kernel routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute kernel"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute kernel $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def b/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/node.def b/templates/protocols/ospfv3/redistribute/node.def index c33bd557..0f60ac58 100644 --- a/templates/protocols/ospfv3/redistribute/node.def +++ b/templates/protocols/ospfv3/redistribute/node.def @@ -1,10 +1 @@ -multi: -type: txt -help: Set route type to redistribute -allowed: echo "static kernel connected ripng bgp" -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"redistribute $VAR(@) \"; " -delete:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"no redistribute $VAR(@) \"; " +help: Set to redistribute information from another routing protocol diff --git a/templates/protocols/ospfv3/redistribute/ripng/node.def b/templates/protocols/ospfv3/redistribute/ripng/node.def new file mode 100644 index 00000000..6732c9da --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/ripng/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute RIPNG routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute ripng"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute ripng $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def b/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/static/node.def b/templates/protocols/ospfv3/redistribute/static/node.def new file mode 100644 index 00000000..df31b1b1 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/static/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute static routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute static"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute static $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/static/route-map/node.def b/templates/protocols/ospfv3/redistribute/static/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/static/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" |