diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-03-16 17:34:16 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-03-16 17:34:16 -0700 |
commit | d258cefa22e39b1c8f5ce7faee2d0e33d9a9e3cf (patch) | |
tree | b795402d26644b3cfa0e61fa09afc035a43973f5 | |
parent | 203c14ba022e9b177b27b1e55c333d3b7b7ca2cb (diff) | |
download | vyatta-cfg-quagga-d258cefa22e39b1c8f5ce7faee2d0e33d9a9e3cf.tar.gz vyatta-cfg-quagga-d258cefa22e39b1c8f5ce7faee2d0e33d9a9e3cf.zip |
Bugfix 5462: Re-organize configuration parameters for IPv6.
29 files changed, 198 insertions, 23 deletions
diff --git a/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def index cb260727..84a1e5f0 100644 --- a/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def @@ -9,7 +9,7 @@ syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID end: vyatta-vtysh -n -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ + -c "router bgp $VAR(../../../@)" \ -c "no ipv6 bgp aggregate-address $VAR(@)"; if [ -f "/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" ]; then rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; @@ -18,6 +18,6 @@ end: vyatta-vtysh -n -c "configure terminal" \ cond="$cond summary-only"; fi; vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ + -c "router bgp $VAR(../../../@)" \ -c "ipv6 bgp aggregate-address $VAR(@) $cond"; fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.tag/summary-only/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.tag/summary-only/node.def index 7aaf0620..7aaf0620 100644 --- a/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.tag/summary-only/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.tag/summary-only/node.def diff --git a/templates/protocols/bgp/node.tag/ipv6/network/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def index cfe2d8a7..6ede47d9 100644 --- a/templates/protocols/bgp/node.tag/ipv6/network/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def @@ -7,9 +7,9 @@ comp_help: syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" create: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ + -c "router bgp $VAR(../../../@)" \ -c "ipv6 bgp network $VAR(@)"; delete: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ + -c "router bgp $VAR(../../../@)" \ -c "no ipv6 bgp network $VAR(@)"; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/metric/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/metric/node.def index 8ac30200..8ac30200 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/metric/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/metric/node.def diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/node.def index 34ef9014..6ecdc4ed 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/node.def @@ -3,7 +3,7 @@ help: Set to redistribute connected routes into BGP delete: touch /tmp/bgp-redist-connected.$PPID end: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "no redistribute connected"; if [ -f "/tmp/bgp-redist-connected.$PPID" ]; then @@ -16,7 +16,7 @@ end: vyatta-vtysh -c "configure terminal" \ cond="$cond route-map $VAR(./route-map/@)"; fi; vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "redistribute connected $cond"; fi; 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 new file mode 100644 index 00000000..d7c994b9 --- /dev/null +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def @@ -0,0 +1,7 @@ +type: txt + +help: Set a route map to filter redistributed routes + +comp_help: \1 <txt>\t\troute-map name + +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/ipv6/redistribute/kernel/metric/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/metric/node.def index 8ac30200..8ac30200 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/metric/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/metric/node.def diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/node.def index a3915423..09b4db85 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/node.def @@ -3,7 +3,7 @@ help: Set to redistribute kernel routes into BGP delete: touch /tmp/bgp-redist-kernel.$PPID end: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "no redistribute kernel "; if [ -f "/tmp/bgp-redist-kernel.$PPID" ]; then @@ -16,7 +16,7 @@ end: vyatta-vtysh -c "configure terminal" \ cond="$cond route-map $VAR(./route-map/@)"; fi; vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "redistribute kernel $cond"; fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def index b636e5f7..a8252d7d 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def @@ -1,4 +1,7 @@ type: txt + help: Set a route map to filter redistributed routes + comp_help: \1 <txt>\t\troute-map name -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" + +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/ipv6/redistribute/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/node.def index 105e22db..105e22db 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/node.def diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/metric/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/metric/node.def index 8ac30200..8ac30200 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/metric/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/metric/node.def diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/node.def index ae44b906..e916c6dc 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/node.def @@ -3,7 +3,7 @@ help: Set to redistribute OSPFv3 routes into BGP delete: touch /tmp/bgp-redist-ospf.$PPID end: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "no redistribute ospf6"; if [ -f "/tmp/bgp-redist-ospf.$PPID" ]; then @@ -16,7 +16,7 @@ end: vyatta-vtysh -c "configure terminal" \ cond="$cond route-map $VAR(./route-map/@)"; fi; vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "redistribute ospf6 $cond"; fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def index 202a548e..95a053a9 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def @@ -1,4 +1,7 @@ type: txt + help: Set a route map to filter redistributed routes + comp_help: \1 <txt>\t\troute-map name -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" + +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/ipv6/redistribute/static/metric/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/metric/node.def index 8ac30200..4855c88d 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/metric/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/metric/node.def @@ -1,3 +1,5 @@ type: u32 + help: Set the metric for redistributed routes + comp_help: \1 <0-4294967295>\tmetric diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/node.def index 4ba7c3a1..4fc05398 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/node.def @@ -3,7 +3,7 @@ help: Set to redistribute RIPng routes into BGP delete: touch /tmp/bgp-redist-rip.$PPID end: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "no redistribute ripng"; if [ -f "/tmp/bgp-redist-rip.$PPID" ]; then @@ -16,7 +16,7 @@ end: vyatta-vtysh -c "configure terminal" \ cond="$cond route-map $VAR(./route-map/@)"; fi; vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "redistribute ripng $cond"; fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def index 828652aa..75b39269 100644 --- a/templates/protocols/bgp/node.tag/ipv6/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,7 @@ type: txt + help: Set a route map to filter redistributed routes + comp_help: \1 <txt>\t\troute-map name -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" + +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/ipv6/redistribute/ripng/metric/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/metric/node.def index 8ac30200..8ac30200 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/metric/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/metric/node.def diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/node.def index 23f40710..a2b3133a 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/node.def @@ -3,7 +3,7 @@ help: Set to redistribute static routes into BGP delete: touch /tmp/bgp-redist-static.$PPID end: vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "no redistribute static"; if [ -f "/tmp/bgp-redist-static.$PPID" ]; then @@ -16,7 +16,7 @@ end: vyatta-vtysh -c "configure terminal" \ cond="$cond route-map $VAR(./route-map/@)"; fi; vyatta-vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ + -c "router bgp $VAR(../../../../@)" \ -c "address-family ipv6" \ -c "redistribute static $cond"; fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def index abb61fa7..5bcc69fb 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def @@ -1,4 +1,7 @@ type: txt + help: Set a route map to filter redistributed routes + comp_help: \1 <txt>\t\troute-map name -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" + +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..68213b4e --- /dev/null +++ b/templates/protocols/bgp/node.tag/address-family/node.def @@ -0,0 +1,4 @@ +help: Generic parameters for IPv4 or IPv6 + + + diff --git a/templates/protocols/bgp/node.tag/ipv6/node.def b/templates/protocols/bgp/node.tag/ipv6/node.def deleted file mode 100644 index 1a8f732e..00000000 --- a/templates/protocols/bgp/node.tag/ipv6/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Set a BGP IPv6 settings diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/route-map/node.def deleted file mode 100644 index 90e59e5a..00000000 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/route-map/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: txt -help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name -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/neighbor/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def new file mode 100644 index 00000000..42ed93b0 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def @@ -0,0 +1,16 @@ +tag: + +type: txt + +help: Neighbor specific parameters for IPv4 or IPv6 + +comp_help: Possible completions: + ipv6-unicast Neighbor specific parameters for IPv6 unicast routes + +allowed: echo -n "ipv6-unicast" + +sytax:expression: $VAR(@) in "ipv6-unicast"; "Must be ipv6-unicast" + + + + diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/export/node.def new file mode 100644 index 00000000..5fb887f7 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/export/node.def @@ -0,0 +1,32 @@ +type: txt + +help: Set an access-list to filter outgoing route updates to this neighbor + +comp_help: possible completions: + <txt> access-list name + +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(../../../@) address-family $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-list6 $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) address-family $VAR(../../@) export: access-list6 $VAR(@) doesn't exist" + +commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) ) address-family $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" + +update: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "neighbor $VAR(../../../@) activate" \ + -c "neighbor $VAR(../../../@) distribute-list $VAR(@) out" + +delete: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh --noerror -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "no neighbor $VAR(../../../@) distribute-list $VAR(@) out" + diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/import/node.def new file mode 100644 index 00000000..e4c8d77a --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/import/node.def @@ -0,0 +1,31 @@ +type: txt + +help: Set an access-list to filter outgoing route updates to this neighbor + +comp_help: possible completions: + <txt> access-list name + +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(../../../@) address-family $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-list6 $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) address-family $VAR(../../@) import: access-list6 $VAR(@) doesn't exist" + +commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) ) address-family $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" + +update: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "neighbor $VAR(../../../@) activate" \ + -c "neighbor $VAR(../../../@) distribute-list $VAR(@) in" + +delete: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh --noerror -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "no neighbor $VAR(../../../@) distribute-list $VAR(@) in" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/node.def new file mode 100644 index 00000000..4013725c --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/distribute-list/node.def @@ -0,0 +1 @@ +help: Set an access-list to filter route updates to/from this neighbor diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/export/node.def new file mode 100644 index 00000000..f0320bcb --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/export/node.def @@ -0,0 +1,37 @@ +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/* + /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(../../../@)" + +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" || /opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\""; \ +"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) address-family $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" + +commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) address-family $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list" + +update: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh \ + -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "neighbor $VAR(../../../@) activate" \ + -c "neighbor $VAR(../../../@) prefix-list $VAR(@) out" + +delete: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh --noerror \ + -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "no neighbor $VAR(../../../@) prefix-list $VAR(@) out" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/import/node.def new file mode 100644 index 00000000..c375630f --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/import/node.def @@ -0,0 +1,37 @@ +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/* + /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(../../../@)" + +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" || /opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\""; \ +"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) address-family $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" + +commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) address-family $VAR(../../@) prefix-list import: you can't set both a prefix-list and a distribute list" + +update: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh \ + -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "neighbor $VAR(../../../@) activate" \ + -c "neighbor $VAR(../../../@) prefix-list $VAR(@) in" + +delete: + af=$VAR(../../@) + af=${af%-*} + vyatta-vtysh --noerror \ + -c "configure terminal" \ + -c "router bgp $VAR(../../../../@)" \ + -c "address-family $af" \ + -c "no neighbor $VAR(../../../@) prefix-list $VAR(@) in" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/node.def new file mode 100644 index 00000000..1a6187c9 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.tag/prefix-list/node.def @@ -0,0 +1 @@ +help: Set a prefix-list to filter route updates to/from this neighbor |