diff options
author | Robert Bays <rbays@roatan.(none)> | 2010-04-04 23:59:31 -0700 |
---|---|---|
committer | Robert Bays <rbays@roatan.(none)> | 2010-04-04 23:59:31 -0700 |
commit | 491d6af23d38f91dc87d310457db7d40f3226e16 (patch) | |
tree | 5cc9fb4cf579bd035e39edce52a6c0d33408cb9f /templates/protocols | |
parent | 66a55c460bfccd9ce99d2babb7366886a5af5469 (diff) | |
download | vyatta-cfg-quagga-491d6af23d38f91dc87d310457db7d40f3226e16.tar.gz vyatta-cfg-quagga-491d6af23d38f91dc87d310457db7d40f3226e16.zip |
initial update to migrate bgp to transaction library
Diffstat (limited to 'templates/protocols')
85 files changed, 16 insertions, 1525 deletions
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index 6ceb8c63..8184995e 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -5,7 +5,4 @@ help: Configure Border Gateway Protocol (BGP) parameters comp_help: \1 <1-4294967294>\tAS number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \ "AS number must be between 1 and 4294967294" -create: vtysh -c "configure terminal" -c "router bgp $VAR(@)" -delete: vtysh -c "configure terminal" -c "no router bgp $VAR(@)" - - +end: /opt/vyatta/sbin/vyatta-bgp.pl --main diff --git a/templates/protocols/bgp/node.tag/aggregate-address/node.def b/templates/protocols/bgp/node.tag/aggregate-address/node.def index 1fa743c4..70a6c6b9 100644 --- a/templates/protocols/bgp/node.tag/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/aggregate-address/node.def @@ -3,21 +3,3 @@ type: ipv4net help: Set a BGP aggregate network comp_help: \1 <x.x.x.x/x>\taggregate network syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" -delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID -end: vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../@)" \ - -c "no aggregate-address $VAR(@)"; - if [ -f "/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" ]; then - rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; - else - if ${vyatta_sbindir}/vyatta_quagga_utils.pl --exists 'protocols bgp $VAR(../@) aggregate-address $VAR(@) as-set' ; then - cond="as-set"; - fi; - if ${vyatta_sbindir}/vyatta_quagga_utils.pl --exists 'protocols bgp $VAR(../@) aggregate-address $VAR(@) summary-only' ; then - cond="$cond summary-only"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../@)" \ - -c "aggregate-address $VAR(@) $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.def b/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.def index 37b76fe8..594d8782 100644 --- a/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/aggregate-address/node.def @@ -5,19 +5,3 @@ comp_help: <h:h:h:h:h:h:h:h/x> IPv6 aggregate network syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" - -delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID - -end: vtysh -n -c "configure terminal" \ - -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; - else - if [ -n "$VAR(./summary-only)" ]; then - cond="$cond summary-only"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "ipv6 bgp aggregate-address $VAR(@) $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/network/node.def b/templates/protocols/bgp/node.tag/ipv6/network/node.def index 81052ea2..14034a79 100644 --- a/templates/protocols/bgp/node.tag/ipv6/network/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/network/node.def @@ -5,11 +5,3 @@ comp_help: <h:h:h:h:h:h:h:h/x> IPv6 network syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" - -create: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "ipv6 bgp network $VAR(@)"; - -delete: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no ipv6 bgp network $VAR(@)"; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def index 2af59605..acdef3a3 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def @@ -1,22 +1 @@ help: Set to redistribute connected routes into BGP - -delete: touch /tmp/bgp-redist-connected.$PPID - -end: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no redistribute connected"; - if [ -f "/tmp/bgp-redist-connected.$PPID" ]; then - rm -rf /tmp/bgp-redist-connected.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "redistribute connected $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def index 0b83aee9..5f0bfb51 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def @@ -1,22 +1,2 @@ help: Set to redistribute kernel routes into BGP -delete: touch /tmp/bgp-redist-kernel.$PPID - -end: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no redistribute kernel "; - if [ -f "/tmp/bgp-redist-kernel.$PPID" ]; then - rm -rf /tmp/bgp-redist-kernel.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "redistribute kernel $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def index d9a08db7..76cf1808 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def @@ -1,22 +1 @@ help: Set to redistribute OSPFv3 routes into BGP - -delete: touch /tmp/bgp-redist-ospf.$PPID - -end: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no redistribute ospf6"; - if [ -f "/tmp/bgp-redist-ospf.$PPID" ]; then - rm -rf /tmp/bgp-redist-ospf.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "redistribute ospf6 $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def index dd24ef27..55ac8b58 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def @@ -1,22 +1 @@ help: Set to redistribute RIPng routes into BGP - -delete: touch /tmp/bgp-redist-rip.$PPID - -end: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no redistribute ripng"; - if [ -f "/tmp/bgp-redist-rip.$PPID" ]; then - rm -rf /tmp/bgp-redist-rip.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "redistribute ripng $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def index b59edfc4..c196a54b 100644 --- a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def @@ -1,22 +1 @@ help: Set to redistribute static routes into BGP - -delete: touch /tmp/bgp-redist-static.$PPID - -end: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no redistribute static"; - if [ -f "/tmp/bgp-redist-static.$PPID" ]; then - rm -rf /tmp/bgp-redist-static.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "redistribute static $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/neighbor/node.def b/templates/protocols/bgp/node.tag/neighbor/node.def index 333ee1a0..af7f1b5c 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.def @@ -1,5 +1,4 @@ tag: -priority: 720 type: txt help: Set a BGP neighbor comp_help: @@ -8,17 +7,3 @@ comp_help: syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ --check-peer-name $VAR(@)" - - -create: if /opt/vyatta/sbin/vyatta-bgp.pl --check-if-peer-group \ - --peergroup $VAR(@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../@)" \ - -c "neighbor $VAR(@) peer-group"; - fi; - -delete: /opt/vyatta/sbin/vyatta-bgp.pl --check-peer-groups \ - --peergroup $VAR(@) --as $VAR(../@) || exit 1 - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../@)" \ - -c "no neighbor $VAR(@)" 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 90432838..0e1b633b 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 @@ -1,25 +1,6 @@ type: u32 - 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(../@)" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) advertisement-interval $VAR(@)" - -delete: vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) advertisement-interval" 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 70c98e74..67b47667 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,34 +1,2 @@ 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(../@)" - -end: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) allowas-in "; - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) allowas-in "; - fi; - - if [ ${COMMIT_ACTION} = 'SET' -o ${COMMIT_ACTION} = 'ACTIVE' ]; then - if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) allowas-in $VAR(./number/@)"; - else - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) allowas-in $VAR(./number/@)"; - fi - fi; 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 e9f02cc6..a23f4502 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,52 +1,3 @@ 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" - -end: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) activate" \ - -c "no neighbor $VAR(../@) attribute-unchanged "; - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) attribute-unchanged "; - fi - - if [ ${COMMIT_ACTION} = 'SET' -o ${COMMIT_ACTION} = 'ACTIVE' ]; then - ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) attribute-unchanged as-path" - if [ $? -eq 0 ]; then - cond="as-path "; - fi; - ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) attribute-unchanged med" - if [ $? -eq 0 ]; then - cond="$cond med "; - fi; - ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) attribute-unchanged next-hop" - if [ $? -eq 0 ]; then - cond="$cond next-hop "; - fi; - if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) attribute-unchanged $cond"; - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) attribute-unchanged $cond"; - fi - fi 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 64848769..1ad03793 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,39 +1,2 @@ help: Set to advertise dynamic capability to this neighbor - commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - -update: if [ -n "$VAR(../../remote-as/@)" ]; - then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) capability dynamic" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) capability dynamic" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) capability dynamic" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) capability dynamic" - fi - 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 33067593..f228a5c3 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,38 +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/) == ""; "You can't set orf capability receive for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" - -update: if [ -n "$VAR(../../../../remote-as/@)" ]; then - peer="remote-as $VAR(../../../../remote-as/@)"; - else - peer="peer-group $VAR(../../../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "neighbor $VAR(../../../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../../../@) capability orf prefix-list receive" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "neighbor $VAR(../../../../@) $peer" \ - -c "neighbor $VAR(../../../../@) capability orf prefix-list receive" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../../../@) capability orf prefix-list receive" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "no neighbor $VAR(../../../../@) capability orf prefix-list receive" - fi 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 a3334d78..aff136ca 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,41 +1,3 @@ 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/@)" - -update: if [ -n "$VAR(../../../../remote-as/@)" ] - then - peer="remote-as $VAR(../../../../remote-as/@)" - else - peer="peer-group $VAR(../../../../peer-group/@)" - fi - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "neighbor $VAR(../../../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../../../@) capability orf prefix-list send" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "neighbor $VAR(../../../../@) $peer" \ - -c "neighbor $VAR(../../../../@) capability orf prefix-list send" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../../../@) capability orf prefix-list send" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../../../@)" \ - -c "no neighbor $VAR(../../../../@) capability orf prefix-list send" - fi - 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 26c28b52..675adffd 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,42 +1,3 @@ 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" - -end: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) default-originate "; - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) default-originate "; - fi; - - if [ ${COMMIT_ACTION} = 'SET' -o ${COMMIT_ACTION} = 'ACTIVE' ]; then - if [ -n "$VAR(./route-map/@)" ]; then - cond="route-map $VAR(./route-map/@) " ; - fi ; - if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) default-originate $cond"; - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) default-originate $cond"; - fi; - fi; 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 923364b6..f2209d3f 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,10 +1,7 @@ type: txt help: Set the route-map to specify criteria of the default - allowed: local -a params params=( /opt/vyatta/config/active/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 a15d36ea..f476e35e 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,13 +1,2 @@ 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(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) dont-capability-negotiate " -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) dont-capability-negotiate" - 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 bf96e198..98e3fb46 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,13 +1,2 @@ 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(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) disable-connected-check" -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) disable-connected-check" - 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 71083ca8..452e2792 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,41 +1,3 @@ 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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) send-community extended" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "no neighbor $VAR(../../@) send-community extended" - fi - - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) send-community extended" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) send-community extended" - - fi 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 d6cc6e17..6591deac 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,39 +1,3 @@ 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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) send-community standard" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "no neighbor $VAR(../../@) send-community standard" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) send-community standard" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) send-community standard" - fi 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 af7f92c8..9d6f2f12 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 @@ -1,57 +1,14 @@ type: txt help: Set an access-list to filter outgoing route updates to this neighbor - 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/* ) 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 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(@)\" || /opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) activate" \ - -c "neighbor $VAR(../../@) distribute-list $VAR(@) out" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) distribute-list $VAR(@) out" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) distribute-list $VAR(@) out" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) distribute-list $VAR(@) out" - fi - - 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 4db868fe..76d48c47 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 @@ -1,50 +1,10 @@ type: txt 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(../../@)" - 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(@)\" || /opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";\ +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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) distribute-list $VAR(@) in" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) distribute-list $VAR(@) in" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) distribute-list $VAR(@) in" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) distribute-list $VAR(@) in" - fi - diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/node.def index 30392e79..4013725c 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/node.def @@ -1,2 +1 @@ -priority: 718 help: Set an access-list to filter route updates to/from this neighbor 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 4186dfbd..d35d050e 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 @@ -1,26 +1,6 @@ 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" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) ebgp-multihop $VAR(@)" - -delete: vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) ebgp-multihop" - 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 d5567d22..f510d1b7 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,49 +1,10 @@ type: txt help: Set an as-path-list to filter outgoing route updates to 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(../../@)" - 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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) filter-list $VAR(@) out" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) filter-list $VAR(@) out" - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "address-family ipv6" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) filter-list $VAR(@) out" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) filter-list $VAR(@) out" - fi - 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 daee397b..573ae57f 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,49 +1,10 @@ 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(../../@)" - 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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) filter-list $VAR(@) in" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) filter-list $VAR(@) in" - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "address-family ipv6" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) filter-list $VAR(@) in" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) filter-list $VAR(@) in" - fi - diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/node.def index 3f86399e..191c561b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/node.def @@ -1,2 +1 @@ -priority: 716 help: Set an as-path-list to filter route updates to/from this neighbor diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def deleted file mode 100644 index 46bdc386..00000000 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def +++ /dev/null @@ -1,14 +0,0 @@ -type: u32 - -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-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set local-as for a neighbor in a peer-group" 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 1334cd2c..a7de0ea8 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 @@ -1,40 +1,8 @@ -help: Set a different AS number to use with this neighbor - -syntax:expression: $VAR(./local-as/@) >= 1 && $VAR(./local-as/@) <= 4294967294; "AS number must be between 1 and 4294967294" - +tag: +type: u32 +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-as --as $VAR(../../@) --neighbor $VAR(../@)" - -commit:expression: $VAR(./local-as/@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@) local-as: you can't set a different local-as for iBGP neighbors" - -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) local-as: you can't set local-as for a neighbor in a peer-group" - -end: vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) local-as "; - - if [ ${COMMIT_ACTION} = 'SET' -o ${COMMIT_ACTION} = 'ACTIVE' ]; then - if [ -z "$VAR(./local-as/@)" ]; then - echo protocols bgp $VAR(../../@) neighbor $VAR(../@) local-as: you must specify local-as local-as ; - exit 1 ; - fi ; - ## uncomment when 2525 is fixed - #if [ -n "$VAR(./no-prepend/@)" ]; then - # cond="no-prepend " ; - #fi ; - ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) local-as no-prepend"; - if [ $? -eq 0 ]; then - cond="no-prepend "; - fi; - - if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) local-as $VAR(./local-as/@) $cond "; - fi; diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/no-prepend/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.tag/no-prepend/node.def index 299e92e9..299e92e9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/no-prepend/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.tag/no-prepend/node.def 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 344504fb..98a1129f 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 @@ -1,42 +1,5 @@ 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(../@)" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) maximum-prefix $VAR(@)" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) maximum-prefix $VAR(@)" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) maximum-prefix" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) maximum-prefix" - fi 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 f7ec8e1f..ccbc5471 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,39 +1,3 @@ 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" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) next-hop-self" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) next-hop-self" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) next-hop-self " - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) next-hop-self " - fi 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 b403b38b..5eec1b35 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,14 +1,3 @@ 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" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) override-capability" -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) 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 812def6a..46e8fc40 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,13 +1,2 @@ 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(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) passive" -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) passive" - diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def index 04a34027..3a2f318d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def @@ -5,15 +5,3 @@ syntax:expression: exec " \ echo Password must be 80 characters or less;\ exit 1 ; \ fi ; " -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c 'neighbor $VAR(../@) password $VAR(@)' -delete: vtysh \ - -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) password" 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 deleted file mode 100644 index 66d80b69..00000000 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def +++ /dev/null @@ -1,12 +0,0 @@ -type: txt -help: Set to add this neighbor to a peer-group -comp_help: \1 <txt>\tpeer-group name -syntax:expression: exec "if [ -n \"`echo $VAR(../@) | sed 's/[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}//'`\" ]; then \ - exit 1; \ - fi; "; "peer-group token may not be specified for a peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --peergroup=$VAR(@) --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols bgp $VAR(../../@) neighbor $VAR(@)\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) peer-group: peer-group $VAR(@) doesn't exist" -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) peer-group $VAR(@)" -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) peer-group $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 edf597a0..0cb689b5 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 @@ -4,15 +4,3 @@ 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(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) port $VAR(@)" -delete: vtysh --noerror \ - -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) port" 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 fde7d4f9..6341cde4 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,52 +1,13 @@ 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: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $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(@)\" || /opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $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/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) prefix-list $VAR(@) out" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) prefix-list $VAR(@) out" - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "address-family ipv6" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) prefix-list $VAR(@) out" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) prefix-list $VAR(@) out" - fi 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 f27abd95..8c7e99a7 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,52 +1,14 @@ type: txt help: Set a prefix-list to filter incoming route updates from 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: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $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(@)\" || /opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $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" -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) prefix-list $VAR(@) in" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) prefix-list $VAR(@) in" - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "address-family ipv6" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) prefix-list $VAR(@) in" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) prefix-list $VAR(@) in" - fi diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/node.def index 7472c88f..1a6187c9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/node.def @@ -1,2 +1 @@ -priority: 717 help: Set a prefix-list to filter route updates to/from this neighbor diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def index ed00b1f5..a91de5a7 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def @@ -1,46 +1,6 @@ type: u32 help: Set neighbor BGP AS number [REQUIRED] - comp_help: possible completions: <1-4294967294> AS number - syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; \ "remote-as must be between 1 and 4294967294" - -# Create action so this leaf is done before others -create: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) remote-as $VAR(@)" || exit 1; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) activate" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) activate"; - fi - -update: vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) remote-as $VAR(@)" || exit 1; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) activate" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) activate"; - fi - -#remote-as needs to be set 1st & deleted last - comment out for now -#delete: vtysh -c "configure terminal" \ -# -c "router bgp $VAR(../../@)" \ -# -c "no neighbor $VAR(../@) remote-as $VAR(@)"; -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) activate" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) activate"; - fi 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 a2b7b553..c234d2fc 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,39 +1,3 @@ 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" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) remove-private-AS" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) remove-private-AS" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) remove-private-AS" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) remove-private-AS" - fi 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 c73162c6..66e09b24 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,47 +1,10 @@ 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-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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) activate" \ - -c "neighbor $VAR(../../@) route-map $VAR(@) out" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) route-map $VAR(@) out" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) route-map $VAR(@) out" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) route-map $VAR(@) out" - fi - 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 86d50f79..3163940a 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,49 +1,10 @@ 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-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" - -update: if [ -n "$VAR(../../remote-as/@)" ]; - then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) activate" \ - -c "neighbor $VAR(../../@) route-map $VAR(@) in" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) route-map $VAR(@) in" - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) route-map $VAR(@) in" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) route-map $VAR(@) in" - fi; - comp_help: possible completions: <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/node.def index cf400f91..7d581eb7 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/node.def @@ -1,2 +1 @@ -priority: 715 help: Set a route-map to filter route updates to/from this neighbor 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 167d7718..2fce607f 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,41 +1,4 @@ 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" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) route-reflector-client" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) route-reflector-client" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) route-reflector-client" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) route-reflector-client" - fi 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 a82b7247..b1cb9e39 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,39 +1,3 @@ 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" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) route-server-client" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) route-server-client" - fi - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); - then - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) route-server-client" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) route-server-client" - fi 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 4ea19509..21863355 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,13 +1,2 @@ help: Set to administratively shut down neighbor -priority: 705 commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) shutdown" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) shutdown" 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 ff70de01..b52799a6 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,34 +1,3 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ --as $VAR(../../../@) --neighbor $VAR(../../@)" - -update: if [ -n "$VAR(../../remote-as/@)" ]; then - peer="remote-as $VAR(../../remote-as/@)"; - else - peer="peer-group $VAR(../../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) - then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../../@) soft-reconfiguration inbound"; - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) soft-reconfiguration inbound"; - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) - then - vtysh -n -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../../@) soft-reconfiguration inbound"; - else - vtysh -n -c "configure terminal" \ - -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) soft-reconfiguration inbound"; - fi; 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 45aab6e8..f2eb3e24 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,13 +1,3 @@ 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" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) strict-capability-match" -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) strict-capability-match " 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 2b8d75e8..6fde9bd3 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,27 +1,6 @@ help: Set neighbor timers 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 timers for a neighbor in a peer-group" -delete: touch /tmp/bgp-neighbor-$VAR(../@)-timers.$PPID -end: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) timers"; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) timers connect"; - if [ -f "/tmp/bgp-neighbor-$VAR(../@)-timers.$PPID" ]; then - rm -rf /tmp/bgp-neighbor-$VAR(../@)-timers.$PPID; - else - if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - if [ -n "$VAR(./connect/@)" ]; then - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) timers connect $VAR(./connect/@)"; - fi; - if [ -n "$VAR(./keepalive/@)" ] || [ -n "$VAR(./holdtime/@)" ]; then - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) timers $VAR(./keepalive/@) $VAR(./holdtime/@)"; - fi; - fi; +# 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/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def index 3bc83999..ae2478a5 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 @@ -1,50 +1,9 @@ type: txt -priority: 719 - 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/* ) 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" - -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) $peer" \ - -c "address-family ipv6" \ - -c "neighbor $VAR(../@) unsuppress-map $VAR(@)" - else - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) unsuppress-map $VAR(@)" - fi; - -delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then - vtysh --noerror \ - -c "configure terminal" \ - -c "address-family ipv6" \ - -c "router bgp $VAR(../../@)" \ - -c "address-family ipv6" \ - -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)" - else - vtysh --noerror \ - -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)" - fi; 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 28239414..63fc633c 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 @@ -5,14 +5,3 @@ comp_help: <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(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) update-source $VAR(@)" -delete: vtysh --noerror -c "configure terminal" \ - -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) update-source" 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 75ac0190..e5da2d21 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 @@ -3,13 +3,3 @@ 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(../@)" -update: if [ -n "$VAR(../remote-as/@)" ]; then - peer="remote-as $VAR(../remote-as/@)"; - else - peer="peer-group $VAR(../peer-group/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) weight $VAR(@)" -delete: vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) weight $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/network/node.def b/templates/protocols/bgp/node.tag/network/node.def index e8262d1b..109312ae 100644 --- a/templates/protocols/bgp/node.tag/network/node.def +++ b/templates/protocols/bgp/node.tag/network/node.def @@ -2,27 +2,6 @@ tag: type: ipv4net help: Set a BGP network comp_help: \1 <x.x.x.x/x>\tnetwork - syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" - commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != ""); "protocols bgp $VAR(../@) network $VAR(@): May specify route-map or backdoor but not both" - -delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID - -end: vtysh -n -c "configure terminal" \ - -c "router bgp $VAR(../@)" \ - -c "no network $VAR(@)"; - if [ -f "/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" ]; then - rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; - else - if [ -n "$VAR(./backdoor/)" ]; then - cond="backdoor"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router bgp $VAR(../@)" \ - -c "network $VAR(@) $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/parameters/always-compare-med/node.def b/templates/protocols/bgp/node.tag/parameters/always-compare-med/node.def index f91e5743..70c8284a 100644 --- a/templates/protocols/bgp/node.tag/parameters/always-compare-med/node.def +++ b/templates/protocols/bgp/node.tag/parameters/always-compare-med/node.def @@ -1,5 +1 @@ help: Set to compare MEDs from different neighbors -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp always-compare-med" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp always-compare-med" diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/confed/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/confed/node.def index c5cf317b..194741e6 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/confed/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/confed/node.def @@ -1,6 +1 @@ help: Set to compare AS-path lengths including confederation sets & sequences -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "bgp bestpath as-path confed" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "no bgp bestpath as-path confed " - diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/ignore/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/ignore/node.def index bc364db1..07aa6178 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/ignore/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/ignore/node.def @@ -1,5 +1 @@ help: Set to ignore AS-path length in selecting a route -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "bgp bestpath as-path ignore" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "no bgp bestpath as-path ignore" diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/compare-routerid/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/compare-routerid/node.def index cd6da257..6781575e 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/compare-routerid/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/compare-routerid/node.def @@ -1,6 +1 @@ help: Set to compare the router-id for identical EBGP paths -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "bgp bestpath compare-routerid" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no bgp bestpath compare-routerid" - diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/med/confed/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/med/confed/node.def index a2e56c64..d65231d3 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/med/confed/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/med/confed/node.def @@ -1,6 +1 @@ help: Set to compare MEDs among confederation paths -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "bgp bestpath med confed" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "no bgp bestpath med confed" - diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/med/missing-as-worst/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/med/missing-as-worst/node.def index 89ffa368..7c5e2b04 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/med/missing-as-worst/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/med/missing-as-worst/node.def @@ -1,6 +1 @@ help: Set to treat a route missing a MED as the least preferred one -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "bgp bestpath med missing-as-worst" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../../@)" \ - -c "no bgp bestpath med missing-as-worst" - diff --git a/templates/protocols/bgp/node.tag/parameters/cluster-id/node.def b/templates/protocols/bgp/node.tag/parameters/cluster-id/node.def index 7a413785..a855eb00 100644 --- a/templates/protocols/bgp/node.tag/parameters/cluster-id/node.def +++ b/templates/protocols/bgp/node.tag/parameters/cluster-id/node.def @@ -1,7 +1,3 @@ type: ipv4 help: Set the route-reflector cluster-id comp_help: \1 <x.x.x.x>\tcluster-id IP -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp cluster-id $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp cluster-id" diff --git a/templates/protocols/bgp/node.tag/parameters/confederation/identifier/node.def b/templates/protocols/bgp/node.tag/parameters/confederation/identifier/node.def index 1cc994b9..2678b08c 100644 --- a/templates/protocols/bgp/node.tag/parameters/confederation/identifier/node.def +++ b/templates/protocols/bgp/node.tag/parameters/confederation/identifier/node.def @@ -2,7 +2,3 @@ type: u32 help: Set confederation AS identifier [REQUIRED] comp_help: \1 <1-4294967294>\tconfederation AS id syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294" -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "bgp confederation identifier $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no bgp confederation identifier" diff --git a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def index 899d696d..184e1584 100644 --- a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def +++ b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def @@ -3,7 +3,3 @@ type: u32 help: Set the peer ASs in the BGP confederation comp_help: \1 <1-4294967294>\tpeer AS number numbers (ex: "435 234") syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294" -create: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "bgp confederation peers $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no bgp confederation peers $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/node.def index e9513221..6d5f09fe 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/node.def @@ -2,11 +2,3 @@ help: Enable route-flap dampening delete:expression: "touch /tmp/bgp-dampening.$PPID" # Note that there is a bug in quagga here. If bgpd gets two 'no bgp dampening' # commands in a row it will crash -end: if [ -f "/tmp/bgp-dampening.$PPID" ]; then - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp dampening" ; - rm -f "/tmp/bgp-dampening.$PPID" ; - else - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp dampening $VAR(./half-life/@) $VAR(./re-use/@) $VAR(./start-suppress-time/@) $VAR(./max-suppress-time/@)" ; - fi ; diff --git a/templates/protocols/bgp/node.tag/parameters/default/local-pref/node.def b/templates/protocols/bgp/node.tag/parameters/default/local-pref/node.def index 7915bf52..2435e3c2 100644 --- a/templates/protocols/bgp/node.tag/parameters/default/local-pref/node.def +++ b/templates/protocols/bgp/node.tag/parameters/default/local-pref/node.def @@ -1,7 +1,3 @@ type: u32 help: Set the default local preference (higher=more preferred) comp_help: \1 <0-4294967295>\tlocal preference -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "bgp default local-preference $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no bgp default local-preference" diff --git a/templates/protocols/bgp/node.tag/parameters/default/no-ipv4-unicast/node.def b/templates/protocols/bgp/node.tag/parameters/default/no-ipv4-unicast/node.def index b65bacf3..2f2019c2 100644 --- a/templates/protocols/bgp/node.tag/parameters/default/no-ipv4-unicast/node.def +++ b/templates/protocols/bgp/node.tag/parameters/default/no-ipv4-unicast/node.def @@ -1,5 +1 @@ help: Set to deactivate IPv4 unicast for a peer by default -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no bgp default ipv4-unicast" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "bgp default ipv4-unicast " diff --git a/templates/protocols/bgp/node.tag/parameters/deterministic-med/node.def b/templates/protocols/bgp/node.tag/parameters/deterministic-med/node.def index d15fc5ba..ba74d93a 100644 --- a/templates/protocols/bgp/node.tag/parameters/deterministic-med/node.def +++ b/templates/protocols/bgp/node.tag/parameters/deterministic-med/node.def @@ -1,5 +1 @@ help: Set to compare MEDs between different peers in the same AS -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp deterministic-med" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp deterministic-med" diff --git a/templates/protocols/bgp/node.tag/parameters/disable-network-import-check/node.def b/templates/protocols/bgp/node.tag/parameters/disable-network-import-check/node.def index 62adaf91..f4a670a3 100644 --- a/templates/protocols/bgp/node.tag/parameters/disable-network-import-check/node.def +++ b/templates/protocols/bgp/node.tag/parameters/disable-network-import-check/node.def @@ -1,5 +1 @@ help: Set to disable IGP route check for network statements -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp network import-check" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp network import-check" diff --git a/templates/protocols/bgp/node.tag/parameters/enforce-first-as/node.def b/templates/protocols/bgp/node.tag/parameters/enforce-first-as/node.def index 269ec92f..c7f8814f 100644 --- a/templates/protocols/bgp/node.tag/parameters/enforce-first-as/node.def +++ b/templates/protocols/bgp/node.tag/parameters/enforce-first-as/node.def @@ -1,5 +1 @@ help: Set to require first AS in the path to match peer's AS -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp enforce-first-as " -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp enforce-first-as " diff --git a/templates/protocols/bgp/node.tag/parameters/graceful-restart/stalepath-time/node.def b/templates/protocols/bgp/node.tag/parameters/graceful-restart/stalepath-time/node.def index 73cc18c5..df75d416 100644 --- a/templates/protocols/bgp/node.tag/parameters/graceful-restart/stalepath-time/node.def +++ b/templates/protocols/bgp/node.tag/parameters/graceful-restart/stalepath-time/node.def @@ -2,7 +2,3 @@ type: u32 help: Set the maximum time to hold onto restarting peer's stale paths comp_help: \1 <1-3600>\thold time in seconds syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 3600; "stalepath-time must be between 1 and 3600" -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "bgp graceful-restart stalepath-time $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no bgp graceful-restart stalepath-time" diff --git a/templates/protocols/bgp/node.tag/parameters/log-neighbor-changes/node.def b/templates/protocols/bgp/node.tag/parameters/log-neighbor-changes/node.def index b27054f2..f231010f 100644 --- a/templates/protocols/bgp/node.tag/parameters/log-neighbor-changes/node.def +++ b/templates/protocols/bgp/node.tag/parameters/log-neighbor-changes/node.def @@ -1,5 +1 @@ help: Set to log neighbor up/down changes and reset reason -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp log-neighbor-changes" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp log-neighbor-changes" diff --git a/templates/protocols/bgp/node.tag/parameters/no-client-to-client-reflection/node.def b/templates/protocols/bgp/node.tag/parameters/no-client-to-client-reflection/node.def index a0dd5246..30d2de78 100644 --- a/templates/protocols/bgp/node.tag/parameters/no-client-to-client-reflection/node.def +++ b/templates/protocols/bgp/node.tag/parameters/no-client-to-client-reflection/node.def @@ -1,5 +1 @@ help: Set to disable client to client route reflection -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp client-to-client reflection" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp client-to-client reflection" diff --git a/templates/protocols/bgp/node.tag/parameters/no-fast-external-failover/node.def b/templates/protocols/bgp/node.tag/parameters/no-fast-external-failover/node.def index 3c0a8254..37c4a0af 100644 --- a/templates/protocols/bgp/node.tag/parameters/no-fast-external-failover/node.def +++ b/templates/protocols/bgp/node.tag/parameters/no-fast-external-failover/node.def @@ -1,5 +1 @@ help: Set to disable immediate sesison reset if peer's connected link goes down -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp fast-external-failover" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp fast-external-failover" diff --git a/templates/protocols/bgp/node.tag/parameters/node.def b/templates/protocols/bgp/node.tag/parameters/node.def index e99114be..6bb752b5 100644 --- a/templates/protocols/bgp/node.tag/parameters/node.def +++ b/templates/protocols/bgp/node.tag/parameters/node.def @@ -1,2 +1 @@ -priority: 700 help: Set BGP parameters diff --git a/templates/protocols/bgp/node.tag/parameters/router-id/node.def b/templates/protocols/bgp/node.tag/parameters/router-id/node.def index e80d5f19..05beb6cc 100644 --- a/templates/protocols/bgp/node.tag/parameters/router-id/node.def +++ b/templates/protocols/bgp/node.tag/parameters/router-id/node.def @@ -1,7 +1,3 @@ type: ipv4 help: Set BGP router id comp_help: \1 <x.x.x.x>\tBGP router-id IP -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp router-id $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp router-id" diff --git a/templates/protocols/bgp/node.tag/parameters/scan-time/node.def b/templates/protocols/bgp/node.tag/parameters/scan-time/node.def index 057832f7..9e19626a 100644 --- a/templates/protocols/bgp/node.tag/parameters/scan-time/node.def +++ b/templates/protocols/bgp/node.tag/parameters/scan-time/node.def @@ -2,7 +2,3 @@ type: u32 help: Set BGP route scanner interval comp_help: \1 <5-60>\tscan interval in seconds syntax:expression: $VAR(@) >= 5 && $VAR(@) <= 60; "scan-time must be between 5 and 60 seconds" -update: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "bgp scan-time $VAR(@)" -delete: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no bgp scan-time" diff --git a/templates/protocols/bgp/node.tag/redistribute/connected/node.def b/templates/protocols/bgp/node.tag/redistribute/connected/node.def index a85348f9..acdef3a3 100644 --- a/templates/protocols/bgp/node.tag/redistribute/connected/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/connected/node.def @@ -1,16 +1 @@ help: Set to redistribute connected routes into BGP -delete: touch /tmp/bgp-redist-connected.$PPID -end: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no redistribute connected"; - if [ -f "/tmp/bgp-redist-connected.$PPID" ]; then - rm -rf /tmp/bgp-redist-connected.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "redistribute connected $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/redistribute/kernel/node.def b/templates/protocols/bgp/node.tag/redistribute/kernel/node.def index 3f2d4147..45c82dda 100644 --- a/templates/protocols/bgp/node.tag/redistribute/kernel/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/kernel/node.def @@ -1,16 +1 @@ help: Set to redistribute kernel routes into BGP -delete: touch /tmp/bgp-redist-kernel.$PPID -end: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no redistribute kernel "; - if [ -f "/tmp/bgp-redist-kernel.$PPID" ]; then - rm -rf /tmp/bgp-redist-kernel.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "redistribute kernel $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/redistribute/ospf/node.def b/templates/protocols/bgp/node.tag/redistribute/ospf/node.def index 8570d8d3..f0f6e8de 100644 --- a/templates/protocols/bgp/node.tag/redistribute/ospf/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/ospf/node.def @@ -1,16 +1 @@ help: Set to redistribute OSPF routes into BGP -delete: touch /tmp/bgp-redist-ospf.$PPID -end: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no redistribute ospf"; - if [ -f "/tmp/bgp-redist-ospf.$PPID" ]; then - rm -rf /tmp/bgp-redist-ospf.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "redistribute ospf $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/redistribute/rip/node.def b/templates/protocols/bgp/node.tag/redistribute/rip/node.def index 2695f58e..577b17e9 100644 --- a/templates/protocols/bgp/node.tag/redistribute/rip/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/rip/node.def @@ -1,16 +1 @@ help: Set to redistribute RIP routes into BGP -delete: touch /tmp/bgp-redist-rip.$PPID -end: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no redistribute rip "; - if [ -f "/tmp/bgp-redist-rip.$PPID" ]; then - rm -rf /tmp/bgp-redist-rip.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "redistribute rip $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/redistribute/static/node.def b/templates/protocols/bgp/node.tag/redistribute/static/node.def index c2517d07..c196a54b 100644 --- a/templates/protocols/bgp/node.tag/redistribute/static/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/static/node.def @@ -1,16 +1 @@ help: Set to redistribute static routes into BGP -delete: touch /tmp/bgp-redist-static.$PPID -end: vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no redistribute static"; - if [ -f "/tmp/bgp-redist-static.$PPID" ]; then - rm -rf /tmp/bgp-redist-static.$PPID; - else - if [ -n "$VAR(./metric/@)" ]; then - cond="metric $VAR(./metric/@)"; - fi; - if [ -n "$VAR(./route-map/@)" ]; then - cond="$cond route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "redistribute static $cond"; - fi; diff --git a/templates/protocols/bgp/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/timers/node.def index 97e3a31f..f25de2a5 100644 --- a/templates/protocols/bgp/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/timers/node.def @@ -1,12 +1,3 @@ help: Set BGP protocol timers 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" -delete: touch /tmp/bgp-timers.$PPID -end: vtysh -c "configure terminal" -c "router bgp $VAR(../@)" \ - -c "no timers bgp"; - if [ -f "/tmp/bgp-timers.$PPID" ]; then - rm -rf /tmp/bgp-timers.$PPID; - else - vtysh -c "configure terminal" -c "router bgp $VAR(../@)" \ - -c "timers bgp $VAR(./keepalive/@) $VAR(./holdtime/@)"; - fi; |