diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:58:38 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:58:38 -0800 |
commit | cd50a751d1480424cdf103fd748b514330029c24 (patch) | |
tree | f70096ded03ce07e56f42c0660c2cf97d63ba83b /templates/protocols/bgp | |
parent | c51dae6826ea505169fca5b0cb0a580bf99c18cf (diff) | |
download | vyatta-cfg-quagga-cd50a751d1480424cdf103fd748b514330029c24.tar.gz vyatta-cfg-quagga-cd50a751d1480424cdf103fd748b514330029c24.zip |
convert templates to new syntax
Diffstat (limited to 'templates/protocols/bgp')
121 files changed, 746 insertions, 746 deletions
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index 63fc0f03..5e89d91a 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -1,7 +1,7 @@ tag: type: u32 -help: "Configure a BGP Autonomous System on this router" +help: Configure a BGP Autonomous System on this router # TODO: non-multinode parent -syntax: $(@) >= 1 && $(@) <= 4294967294; "AS number must be between 1 and 4294967294" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no router bgp $(@)\" " +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "AS number must be between 1 and 4294967294" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no router bgp $VAR(@)\" " diff --git a/templates/protocols/bgp/node.tag/aggregate-address/node.def b/templates/protocols/bgp/node.tag/aggregate-address/node.def index 71d96db6..bcfffa66 100644 --- a/templates/protocols/bgp/node.tag/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/aggregate-address/node.def @@ -1,19 +1,19 @@ tag: type: ipv4net -help: "Configure BGP aggregate entries" -syntax: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $(@)" -delete: "touch /tmp/`echo $(@) | sed 's!/!!'`.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../@)\" \ - -c \"no aggregate-address $(@)\"; \ - if [ -f \"/tmp/`echo $(@) | sed 's!/!!'`.\\$PPID\" ]; then \ - rm -rf /tmp/`echo $(@) | sed 's!/!!'`.\\$PPID; \ +help: Configure BGP aggregate entries +syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" +delete:expression: "touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 [ -n \"$(./as-set/@)\" ]; then \ + if [ -n \"$VAR(./as-set/@)\" ]; then \ COND=\"as-set\"; fi; \ - if [ -n \"$(./summary-only/@)\" ]; then \ - COND=\"\\$COND summary-only\"; \ + if [ -n \"$VAR(./summary-only/@)\" ]; then \ + COND=\"$COND summary-only\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../@)\" \ - -c \"aggregate-address $(@) \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../@)\" \ + -c \"aggregate-address $VAR(@) $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/aggregate-address/node.tag/as-set/node.def b/templates/protocols/bgp/node.tag/aggregate-address/node.tag/as-set/node.def index 90c088a1..d4d7945f 100644 --- a/templates/protocols/bgp/node.tag/aggregate-address/node.tag/as-set/node.def +++ b/templates/protocols/bgp/node.tag/aggregate-address/node.tag/as-set/node.def @@ -1 +1 @@ -help: "Generate AS set path information" +help: Generate AS set path information diff --git a/templates/protocols/bgp/node.tag/aggregate-address/node.tag/summary-only/node.def b/templates/protocols/bgp/node.tag/aggregate-address/node.tag/summary-only/node.def index ccfbd0fa..4d8a96b2 100644 --- a/templates/protocols/bgp/node.tag/aggregate-address/node.tag/summary-only/node.def +++ b/templates/protocols/bgp/node.tag/aggregate-address/node.tag/summary-only/node.def @@ -1 +1 @@ -help: "Filter more specific routes from updates" +help: Filter more specific routes from updates diff --git a/templates/protocols/bgp/node.tag/neighbor/node.def b/templates/protocols/bgp/node.tag/neighbor/node.def index 18abf799..4950c664 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.def @@ -1,9 +1,9 @@ tag: type: txt -help: "Specify neighbor router" -syntax: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peer-name $(@)" -update: "if [ -n \"`echo $(@) | sed 's/[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}//'`\" ]; then \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../@)\" -c \"neighbor $(@) peer-group\" ; \ +help: Specify neighbor router +syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peer-name $VAR(@)" +update:expression: "if [ -n \"`echo $VAR(@) | sed 's/[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}//'`\" ]; then \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../@)\" -c \"neighbor $VAR(@) peer-group\" ; \ fi ; " -delete: "/opt/vyatta/sbin/vyatta-bgp.pl --check-peer-groups --peergroup $(@) --as $(../@); \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../@)\" -c \"no neighbor $(@) \" " +delete:expression: "/opt/vyatta/sbin/vyatta-bgp.pl --check-peer-groups --peergroup $VAR(@) --as $VAR(../@); \ + ${vyatta_sbindir}/vyatta-vtysh.pl -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 b789b194..fdce27db 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,14 +1,14 @@ type: u32 -help: "Minimum interval between sending BGP routing updates" -syntax: $(@) >= 0 && $(@) <= 600; "must be between 0 and 600" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Minimum interval between sending BGP routing updates +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:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) advertisement-interval $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) advertisement-interval\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) advertisement-interval $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 2536d745..6c1ab4a5 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,17 +1,17 @@ -help: "Accept as-path with my AS present in it." -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -delete: "touch /tmp/bgp-neighbor-$(../@)-allowas-in.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) allowas-in \"; \ - if [ -f \"/tmp/bgp-neighbor-$(../@)-allowas-in.\\$PPID\" ]; then \ - rm -rf /tmp/bgp-neighbor-$(../@)-allowas-in.\\$PPID; \ +help: Accept as-path with my AS present in it. +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +delete:expression: "touch /tmp/bgp-neighbor-$VAR(../@)-allowas-in.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) allowas-in \"; \ + if [ -f \"/tmp/bgp-neighbor-$VAR(../@)-allowas-in.$PPID\" ]; then \ + rm -rf /tmp/bgp-neighbor-$VAR(../@)-allowas-in.$PPID; \ else \ - if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ + if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) allowas-in $(./number/@)\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) allowas-in $VAR(./number/@)\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def index 468dfa3c..4efe3d54 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def @@ -1,4 +1,4 @@ type: u32 -help: "Number of occurrences of AS number" -syntax: $(@) >= 1 && $(@) <= 10; "allowas-in number must be between 1 and 10" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" +help: Number of occurrences of AS number +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/as-path/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/as-path/node.def index a004417e..19e19fcf 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/as-path/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/as-path/node.def @@ -1 +1 @@ -help: "AS path attribute" +help: AS path attribute diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/med/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/med/node.def index ad1fd4f3..a5a7ae78 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/med/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/med/node.def @@ -1 +1 @@ -help: "Multi-exit discriminator attribute" +help: Multi-exit discriminator attribute diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/next-hop/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/next-hop/node.def index 13cba663..7c6aa538 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/next-hop/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/next-hop/node.def @@ -1 +1 @@ -help: "Nexthop attribute" +help: Nexthop attribute 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 e9114f68..936286c5 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,27 +1,27 @@ -help: "BGP attribute is propagated unchanged to this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set attribute-unchanged for neighbor $(../@) in peer-group $(../peer-group/@)" -delete: "touch /tmp/bgp-neighbor-$(../@)-attribute-unchanged.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) attribute-unchanged \"; \ - if [ -f \"/tmp/bgp-neighbor-$(../@)-attribute-unchanged.\\$PPID\" ]; then \ - rm -rf /tmp/bgp-neighbor-$(../@)-attribute-unchanged.\\$PPID; \ +help: BGP attribute is propagated unchanged to this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set attribute-unchanged for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +delete:expression: "touch /tmp/bgp-neighbor-$VAR(../@)-attribute-unchanged.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) attribute-unchanged \"; \ + if [ -f \"/tmp/bgp-neighbor-$VAR(../@)-attribute-unchanged.$PPID\" ]; then \ + rm -rf /tmp/bgp-neighbor-$VAR(../@)-attribute-unchanged.$PPID; \ else \ - if [ -n \"$(./as-path/@)\" ]; then \ + if [ -n \"$VAR(./as-path/@)\" ]; then \ cond=\"as-path \" ; \ fi ; \ - if [ -n \"$(./med/@)\" ]; then \ - cond=\"\\$cond med \" ; \ + if [ -n \"$VAR(./med/@)\" ]; then \ + cond=\"$cond med \" ; \ fi ; \ - if [ -n \"$(./next-hop/@)\" ]; then \ - cond=\"\\$cond next-hop \" ; \ + if [ -n \"$VAR(./next-hop/@)\" ]; then \ + cond=\"$cond next-hop \" ; \ fi ; \ - if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ + if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) attribute-unchanged \\$cond\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) attribute-unchanged $cond\"; \ 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 ad6926ca..8c285c3d 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,13 +1,13 @@ -help: "Advertise dynamic capability to this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Advertise dynamic capability to this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) capability dynamic\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) capability dynamic\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) capability dynamic\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) capability dynamic\" " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/node.def index 78cab42b..9fb78194 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/node.def @@ -1 +1 @@ -help: "Advertise ORF capability to the peer" +help: Advertise ORF capability to the peer diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/node.def index 06be1587..257b2bc1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/node.def @@ -1 +1 @@ -help: "Advertise prefix-list ORF capability to this neighbor" +help: Advertise prefix-list ORF capability to this neighbor 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 88e30e65..70f13129 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,14 +1,14 @@ -help: "Capability to RECEIVE the ORF to this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../../../@) --neighbor $(../../../../@)" -commit: $(../../../../peer-group/) == ""; "You can't set orf capability receive for neighbor $(../../../../@) in peer-group $(../../../../peer-group/@)" -update: "if [ -n \"$(../../../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../../../remote-as/@)\"; \ +help: Capability to RECEIVE the ORF to this neighbor +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:expression: "if [ -n \"$VAR(../../../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../../@)\" \ - -c \"neighbor $(../../../../@) \\$peer\" \ - -c \"neighbor $(../../../../@) capability orf prefix-list receive\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../../../@)\" \ - -c \"no neighbor $(../../../../@) capability orf prefix-list receive\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \ + -c \"neighbor $VAR(../../../../@) $peer\" \ + -c \"neighbor $VAR(../../../../@) capability orf prefix-list receive\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \ + -c \"no neighbor $VAR(../../../../@) capability orf prefix-list receive\" " 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 625045b0..13b1cf40 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,14 +1,14 @@ -help: "Capability to SEND the ORF to this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../../../@) --neighbor $(../../../../@)" -commit: $(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $(../../../../@) in peer-group $(../../../../peer-group/@)" -update: "if [ -n \"$(../../../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../../../remote-as/@)\"; \ +help: Capability to SEND the ORF to this neighbor +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:expression: "if [ -n \"$VAR(../../../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../../@)\" \ - -c \"neighbor $(../../../../@) \\$peer\" \ - -c \"neighbor $(../../../../@) capability orf prefix-list send\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../../../@)\" \ - -c \"no neighbor $(../../../../@) capability orf prefix-list send\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \ + -c \"neighbor $VAR(../../../../@) $peer\" \ + -c \"neighbor $VAR(../../../../@) capability orf prefix-list send\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../../../@)\" \ + -c \"no neighbor $VAR(../../../../@) capability orf prefix-list send\" " 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 28e4916d..8ea71208 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,22 +1,22 @@ -help: "Originate default route to this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set default-originate for neighbor $(../@) in peer-group $(../peer-group/@)" -delete: "touch /tmp/bgp-neighbor-$(../@)-default-originate.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) default-originate \"; \ - if [ -f \"/tmp/bgp-neighbor-$(../@)-default-originate.\\$PPID\" ]; then \ - rm -rf /tmp/bgp-neighbor-$(../@)-default-originate.\\$PPID; \ +help: Originate 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/) == ""; "You can't set default-originate for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +delete:expression: "touch /tmp/bgp-neighbor-$VAR(../@)-default-originate.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) default-originate \"; \ + if [ -f \"/tmp/bgp-neighbor-$VAR(../@)-default-originate.$PPID\" ]; then \ + rm -rf /tmp/bgp-neighbor-$VAR(../@)-default-originate.$PPID; \ else \ - if [ -n \"$(./route-map/@)\" ]; then \ - cond=\"route-map $(./route-map/@) \" ; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + cond=\"route-map $VAR(./route-map/@) \" ; \ fi ; \ - if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ + if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) default-originate \\$cond\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) default-originate $cond\"; \ 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 3c067e5b..dd3cc34e 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,4 +1,4 @@ type: txt -help: "Route-map to specify criteria to originate default" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" " ; "route-map $(@) doesn't exist" -commit: $(../../peer-group/) == ""; "You can't set a default-originate route-map for neighbor $(../../@) in peer-group $(../../peer-group/@)" +help: Route-map to specify criteria to originate default +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "route-map $VAR(@) doesn't exist" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a default-originate route-map for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/description/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/description/node.def index f5ba94f0..7111130e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/description/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Neighbor specific description" +help: Neighbor specific description 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 f7099306..9f90c59e 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,13 @@ -help: "Do not perform capability negotiation" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Do not perform capability negotiation +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) dont-capability-negotiate \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) dont-capability-negotiate \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) dont-capability-negotiate \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 4d5e6243..a0df6de1 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,13 @@ -help: "One hop distant EBGP peer using loopback address" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: One hop distant EBGP peer using loopback address +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) disable-connected-check\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) disable-connected-check \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) disable-connected-check\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 bc4877c3..02414ea2 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,14 +1,14 @@ -help: "Do not send extended community attributes" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set no-send-community for neighbor $(../../@) in peer-group $(../../peer-group/@)" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Do not send extended community attributes +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set no-send-community for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"no neighbor $(../../@) send-community extended\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) send-community extended\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"no neighbor $VAR(../../@) send-community extended\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) send-community extended\" " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def index 6251cb84..563f3494 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def @@ -1,2 +1,2 @@ -help: "Do not send community attributes to this neighbor" -commit: ($(./extended/) != "") || ($(./standard/) != ""); "You must specify the type of community." +help: Do not send community attributes to this neighbor +commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "You must specify the type of community." 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 c4f3e2f8..8d2c491b 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,13 +1,13 @@ -help: "Do not send standard community attributes" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Do not send standard community attributes +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"no neighbor $(../../@) send-community standard\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) send-community standard\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"no neighbor $VAR(../../@) send-community standard\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) send-community standard\" " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def index f29ecde9..673af92f 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def @@ -1,12 +1,12 @@ -help: "Disable the Address Family for this Neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Disable the Address Family for this Neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"no neighbor $(../@) activate \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) activate \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"no neighbor $VAR(../@) activate \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) activate \" " 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 e6e33c87..af849ee4 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,16 +1,16 @@ type: u32 -help: "Filter outgoing updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a distribute-list for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Filter outgoing updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a distribute-list for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";"access-list $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) distribute-list $(@) out\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) distribute-list $(@) out\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) distribute-list $VAR(@) out\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) distribute-list $VAR(@) out\" " 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 528c16c6..497830f6 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,16 +1,16 @@ type: u32 -help: "Filter incoming updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a distribute-list for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Filter incoming updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a distribute-list for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";"access-list $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) distribute-list $(@) in\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) distribute-list $(@) in\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) distribute-list $VAR(@) in\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) distribute-list $VAR(@) in\" " 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 8e96b2b5..60273382 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 +1 @@ -help: "Filter updates to/from this neighbor" +help: Filter 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 7c2a8478..74478188 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,15 +1,15 @@ type: u32 -help: "Allow EBGP neighbors not on directly connected networks" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -syntax: $(@) >=1 && $(@) <= 255; "ebgp-multihop must be between 1 and 255" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Allow EBGP neighbors not on directly connected networks +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:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) ebgp-multihop $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) ebgp-multihop \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) ebgp-multihop $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) ebgp-multihop \" " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/enforce-multihop/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/enforce-multihop/node.def index caae31f3..63365ab1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/enforce-multihop/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/enforce-multihop/node.def @@ -1,13 +1,13 @@ -help: "Enforce EBGP neighbors perform multihop" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Enforce EBGP neighbors perform multihop +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) enforce-multihop \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) enforce-multihop \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) enforce-multihop \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) enforce-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 620c59a1..1848b34c 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,16 +1,16 @@ type: txt -help: "Filter outgoing updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a filter-list for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $(@)\" ";"as-path-list $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Filter outgoing updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a filter-list for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"as-path-list $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) filter-list $(@) out\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) filter-list $(@) out\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) filter-list $VAR(@) out\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) filter-list $VAR(@) out\" " 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 75a56c59..10f09440 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,16 +1,16 @@ type: txt -help: "Filter incoming updates based on AS path" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a filter-list for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $(@)\" ";"as-path-list $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Filter incoming updates based on AS path +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a filter-list for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"as-path-list $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) filter-list $(@) in\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) filter-list $(@) in\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) filter-list $VAR(@) in\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) filter-list $VAR(@) in\" " 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 648a1783..b0f70316 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 +1 @@ -help: "Establish BGP filters" +help: Establish BGP filters diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/node.def index c53cb58c..af446b72 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/node.def @@ -1,18 +1,18 @@ type: txt -help: "Interface name" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -syntax: exec " \ - if [ -z \"`ip addr | grep $(@) `\" ]; then \ - echo $(@) doesn\\'t exist on this system ; \ +help: Interface name +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +syntax:expression: exec " \ + if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ + echo $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) interface $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) interface $(@)\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) interface $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) interface $VAR(@)\" " 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 index 7003828b..ce97c629 100644 --- 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 @@ -1,6 +1,6 @@ type: u32 -help: "Local AS number" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../peer-group/) == ""; "You can't set a local-as for neighbor $(../@) in peer-group $(../peer-group/@)" -syntax: $(@) >=1 && $(@) <= 4294967294; "local-as must be between 1 and 4294967294" -syntax: $(@) != $(../../../@); "Cannot have local-as same as BGP AS number" +help: Local AS number +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set a local-as for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294" +syntax:expression: $VAR(@) != $VAR(../../../@); "Cannot have local-as same as BGP AS number" 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/no-prepend/node.def index 99b52bdd..5270b67f 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/no-prepend/node.def @@ -1 +1 @@ -help: "Do not prepend local-as to updates from EBGP peers" +help: Do not prepend local-as to updates from EBGP peers 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 aa63bc0b..3ad21f8a 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,25 +1,25 @@ -help: "Specify a local-as number" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set a local-as for neighbor $(../../@) in peer-group $(../../peer-group/@)" -delete: "touch /tmp/bgp-neighbor-$(../@)-local-as.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) local-as \"; \ - if [ -f \"/tmp/bgp-neighbor-$(../@)-local-as.\\$PPID\" ]; then \ - rm -rf /tmp/bgp-neighbor-$(../@)-local-as.\\$PPID; \ +help: Specify a local-as number +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set a local-as for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +delete:expression: "touch /tmp/bgp-neighbor-$VAR(../@)-local-as.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) local-as \"; \ + if [ -f \"/tmp/bgp-neighbor-$VAR(../@)-local-as.$PPID\" ]; then \ + rm -rf /tmp/bgp-neighbor-$VAR(../@)-local-as.$PPID; \ else \ - if [ -z \"$(./local-as/@)\" ]; then \ + if [ -z \"$VAR(./local-as/@)\" ]; then \ echo You must specify local-as local-as ; \ exit 1 ; \ fi ; \ - if [ -n \"$(./no-prepend/@)\" ]; then \ - cond=\"no-prepend \" ; \ + if [ -n \"$VAR(./no-prepend/@)\" ]; then \ + cond=\"no-prepend \" ; \ fi ; \ - if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ + if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) local-as $(./local-as/@) \\$cond \"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -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/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def index a0f90f79..0d3f920f 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,14 +1,14 @@ type: u32 -help: "Maximum number of prefixes to accept from this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Maximum number of prefixes to accept from this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) maximum-prefix $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) maximum-prefix \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) maximum-prefix $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) maximum-prefix \" " 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 ffb33673..4303ec1b 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,14 +1,14 @@ -help: "Disable the next hop calculation for this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set next-hop-self for neighbor $(../@) in peer-group $(../peer-group/@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Disable the next hop calculation for this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set next-hop-self for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) next-hop-self\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) next-hop-self \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) next-hop-self\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) next-hop-self \" " 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 af352512..567441ec 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,14 @@ -help: "Override capability negotiation result" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../strict-capability/) == ""; "You can't set strict-capability and override-capability for neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Override capability negotiation result +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../strict-capability/) == ""; "You can't set strict-capability and override-capability for neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) override-capability\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) override-capability \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) override-capability\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 d4c70d55..128a7f70 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,13 @@ -help: "Don't send open messages to this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Don't send open messages to this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) passive\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) passive \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) passive\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 00f68338..a45f7294 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 @@ -1,13 +1,13 @@ type: txt -help: "Specify BGP neighbor password" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Specify BGP neighbor password +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) password $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) password\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) password $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 index 22646f5d..c1b51fd8 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def @@ -1,11 +1,11 @@ type: txt -help: "Member of the peer-group" -syntax: exec "if [ -n \"`echo $(../@) | sed 's/[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}.[0-9]\\{1,3\\}//'`\" ]; then \ +help: Member of the peer-group +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: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --peergroup=$(@) --as $(../../@) --neighbor $(../@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols bgp $(../../@) neighbor $(@)\" "; "peer-group $(@) doesn't exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) peer-group $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) 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(@)\" "; "peer-group $VAR(@) doesn't exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) peer-group $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 88322c45..ef388c01 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 @@ -1,14 +1,14 @@ type: u32 -help: "Neighbor's BGP port" -syntax: $(@) >= 1 && $(@) <= 4294967294; "remote-as must be between 1 and 4294967294" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Neighbor's BGP port +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "remote-as must be between 1 and 4294967294" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) port $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) port \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) port $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 7ec712c2..062a6312 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,16 +1,16 @@ type: txt -help: "Filter outgoing updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a prefix-list for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" ";"prefix-list $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Filter outgoing updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a prefix-list for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" ";"prefix-list $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) prefix-list $(@) out\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) prefix-list $(@) out\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) prefix-list $VAR(@) out\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) prefix-list $VAR(@) out\" " 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 c05ebff9..f744b9df 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,16 +1,16 @@ type: txt -help: "Filter incoming updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a prefix-list for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" ";"prefix-list $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Filter incoming updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a prefix-list for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" ";"prefix-list $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) prefix-list $(@) in\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) prefix-list $(@) in\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) prefix-list $VAR(@) in\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) prefix-list $VAR(@) in\" " 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 8e96b2b5..60273382 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 +1 @@ -help: "Filter updates to/from this neighbor" +help: Filter 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 ceeba2bd..9e7e7440 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,7 +1,7 @@ type: u32 -help: "Specify BGP neighbor ASN" -syntax: $(@) >= 1 && $(@) <= 4294967294; "remote-as must be between 1 and 4294967294" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) remote-as $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) remote-as $(@)\" " +help: Specify BGP neighbor ASN +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "remote-as must be between 1 and 4294967294" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) remote-as $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) remote-as $VAR(@)\" " 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 bcca6b3e..70b5f223 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,14 +1,14 @@ -help: "Remove private AS number from outbound updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set a remove-private-as for neighbor $(../@) in peer-group $(../peer-group/@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Remove private AS number from outbound updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set a remove-private-as for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) remove-private-AS \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) remove-private-AS \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) remove-private-AS \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) remove-private-AS \" " 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 c3febf9f..51268770 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,16 +1,16 @@ type: txt -help: "Route-map to apply to outgoing updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a route-map for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Route-map to apply to outgoing updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a route-map for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) route-map $(@) out\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) route-map $(@) out\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) route-map $VAR(@) out\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) route-map $VAR(@) out\" " 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 1d90b721..f59f5e69 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,16 +1,16 @@ type: txt -help: "Route-map to apply to incoming updates" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" -commit: $(../../peer-group/) == ""; "You can't set a route-map for neighbor $(../../@) in peer-group $(../../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Route-map to apply to incoming updates +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: $VAR(../../peer-group/) == ""; "You can't set a route-map for neighbor $VAR(../../@) in peer-group $VAR(../../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) route-map $(@) in\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) route-map $(@) in\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) route-map $VAR(@) in\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) route-map $VAR(@) in\" " 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 db8271a6..3ad56222 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 +1 @@ -help: "Route-map to apply on updates to/from this neighbor" +help: Route-map to apply on 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 06b847b2..4079aa80 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,15 +1,15 @@ -help: "Configure a neighbor as Route Reflector client" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set route-reflector-client for neighbor $(../@) in peer-group $(../peer-group/@)" -commit: $(../../@) == $(../remote-as/@); "remote-as must equal local-as to be a route-reflector client" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Configure a neighbor as Route Reflector client +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set route-reflector-client for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "remote-as must equal local-as to be a route-reflector client" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) route-reflector-client \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) route-reflector-client \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) route-reflector-client \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) route-reflector-client \" " 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 26308583..a1cf1c32 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,14 +1,14 @@ -help: "Configure a neighbor as Route Server client" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set route-server-client for neighbor $(../@) in peer-group $(../peer-group/@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Configure a 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/) == ""; "You can't set route-server-client for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) route-server-client \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) route-server-client \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) route-server-client \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) route-server-client \" " 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 1c9b1fbe..8ddee2cf 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,12 +1,12 @@ -help: "Administratively shut down this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Administratively shut down this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) shutdown\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) shutdown\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) shutdown\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 8780ac0a..1c4adbcf 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,13 +1,13 @@ -help: "Allow inbound soft reconfiguration for this neighbor" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../../remote-as/@)\" ]; then \ - peer=\"remote-as $(../../remote-as/@)\"; \ +help: Allow inbound soft reconfiguration for this neighbor +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../../remote-as/@)\"; \ else \ - peer=\"peer-group $(../../peer-group/@)\"; \ + peer=\"peer-group $VAR(../../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"neighbor $(../../@) \\$peer\" \ - -c \"neighbor $(../../@) soft-reconfiguration inbound \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no neighbor $(../../@) soft-reconfiguration inbound \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"neighbor $VAR(../../@) $peer\" \ + -c \"neighbor $VAR(../../@) soft-reconfiguration inbound \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no neighbor $VAR(../../@) soft-reconfiguration inbound \" " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/node.def index 25ab9d17..8cf6600b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/node.def @@ -1,2 +1,2 @@ -help: "Per neighbor soft reconfiguration" -commit: $(./inbound/) != ""; "You must specify the type of soft-reconfiguration" +help: Per neighbor soft reconfiguration +commit:expression: $VAR(./inbound/) != ""; "You must specify the type of soft-reconfiguration" 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 3d389251..695df262 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,13 @@ -help: "Strict capability negotiation match" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../override-capability/) == ""; "You can't set strict-capability and override-capability for neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Strict capability negotiation match +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../override-capability/) == ""; "You can't set strict-capability and override-capability for neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) strict-capability-match \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) strict-capability-match \" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) strict-capability-match \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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/connect/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/connect/node.def index badde464..d2e2533d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/connect/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/connect/node.def @@ -1,3 +1,3 @@ type: u32 -help: "BGP connect timer" -syntax: $(@) >=0 && $(@) <= 65535; "BGP connect timer must be between 0 and 65535" +help: BGP connect timer +syntax:expression: $VAR(@) >=0 && $VAR(@) <= 65535; "BGP connect timer must be between 0 and 65535" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/holdtime/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/holdtime/node.def index b7da119e..06ebfd09 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/holdtime/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/holdtime/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Holdtime interval" -syntax: $(@) == 0 || ($(@) >= 4 && $(@) <= 65535); "Holdtime interval must be 0 or between 4 and 65535" +help: Holdtime interval +syntax:expression: $VAR(@) == 0 || ($VAR(@) >= 4 && $VAR(@) <= 65535); "Holdtime interval must be 0 or between 4 and 65535" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/keepalive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/keepalive/node.def index 59067fdc..3d68ba94 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/keepalive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/keepalive/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Keepalive interval" -syntax: $(@) >= 1 && $(@) <= 65535; "Keepalive interval must be between 1 and 65535" +help: Keepalive interval +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Keepalive interval must be between 1 and 65535" 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 1753510f..8515b9dc 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,27 @@ -help: "BGP per neighbor timers" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set timers for neighbor $(../@) in peer-group $(../peer-group/@)" -delete: "touch /tmp/bgp-neighbor-$(../@)-timers.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) timers \"; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) timers connect \"; \ - if [ -f \"/tmp/bgp-neighbor-$(../@)-timers.\\$PPID\" ]; then \ - rm -rf /tmp/bgp-neighbor-$(../@)-timers.\\$PPID; \ +help: BGP per neighbor timers +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set timers for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +delete:expression: "touch /tmp/bgp-neighbor-$VAR(../@)-timers.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) timers \"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -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 \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ + if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - if [ -n \"$(./connect/@)\" ]; then \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) timers connect $(./connect/@)\" ; \ + if [ -n \"$VAR(./connect/@)\" ]; then \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) timers connect $VAR(./connect/@)\" ; \ fi ; \ - if [ -n \"$(./keepalive/@)\" ] || [ -n \"$(./holdtime/@)\" ]; then \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) timers $(./keepalive/@) $(./holdtime/@)\"; \ + if [ -n \"$VAR(./keepalive/@)\" ] || [ -n \"$VAR(./holdtime/@)\" ]; then \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) timers $VAR(./keepalive/@) $VAR(./holdtime/@)\"; \ fi ; \ fi; " 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 f228b80b..9251c28a 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,15 +1,15 @@ type: txt -help: "Route-map to selectively unsuppress suppressed routes" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -commit: $(../peer-group/) == ""; "You can't set an unsuppress-map for neighbor $(../@) in peer-group $(../peer-group/@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Route-map to selectively unsuppress suppressed routes +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "You can't set an unsuppress-map for neighbor $VAR(../@) in peer-group $VAR(../peer-group/@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) unsuppress-map $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) unsuppress-map $(@)\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) unsuppress-map $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) unsuppress-map $VAR(@)\" " 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 17f68349..afa51402 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 @@ -1,18 +1,18 @@ type: txt -help: "Source of routing updates" -syntax: exec " \ - if [ -z \"`ip addr | grep $(@) `\" ]; then \ - echo $(@) doesn\\'t exist on this system ; \ +help: Source of routing updates +syntax:expression: exec " \ + if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ + echo $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) update-source $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) update-source $(@)\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) update-source $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) update-source $VAR(@)\" " diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def index 215d741f..3ca1bd6c 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 @@ -1,14 +1,14 @@ type: u32 -help: "Set default weight for routes from this neighbor" -syntax: $(@) >= 1 && $(@) <= 65535; "weight must be between 1 and 65535" -commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" -update: "if [ -n \"$(../remote-as/@)\" ]; then \ - peer=\"remote-as $(../remote-as/@)\"; \ +help: Set default weight 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:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ + peer=\"remote-as $VAR(../remote-as/@)\"; \ else \ - peer=\"peer-group $(../peer-group/@)\"; \ + peer=\"peer-group $VAR(../peer-group/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"neighbor $(../@) \\$peer\" \ - -c \"neighbor $(../@) weight $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"no neighbor $(../@) weight $(@)\" " + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"neighbor $VAR(../@) $peer\" \ + -c \"neighbor $VAR(../@) weight $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 5898708d..5299d456 100644 --- a/templates/protocols/bgp/node.tag/network/node.def +++ b/templates/protocols/bgp/node.tag/network/node.def @@ -1,20 +1,20 @@ tag: type: ipv4net -help: "Specify a network to announce via BGP" -syntax: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $(@)" -commit: !($(./backdoor/) != "" && $(./route-map/) != ""); "May specify route-map or backdoor but not both" -delete: "touch /tmp/`echo $(@) | sed 's!/!!'`.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $(../@)\" \ - -c \"no network $(@)\"; \ - if [ -f \"/tmp/`echo $(@) | sed 's!/!!'`.\\$PPID\" ]; then \ - rm -rf /tmp/`echo $(@) | sed 's!/!!'`.\\$PPID; \ +help: Specify a network to announce via BGP +syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" +commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != ""); "May specify route-map or backdoor but not both" +delete:expression: "touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -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 \"$(./backdoor/)\" ]; then \ + if [ -n \"$VAR(./backdoor/)\" ]; then \ COND=\"backdoor\"; \ fi; \ - if [ -n \"$(./route-map/@)\" ]; then \ - COND=\"route-map $(./route-map/@)\"; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + COND=\"route-map $VAR(./route-map/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../@)\" \ - -c \"network $(@) \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../@)\" \ + -c \"network $VAR(@) $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def b/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def index eb1b3ab5..b7dc6950 100644 --- a/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def +++ b/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def @@ -1 +1 @@ -help: "Specify a BGP backdoor route" +help: Specify a BGP backdoor route diff --git a/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def index a0f6f5fa..7a19c2e4 100644 --- a/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def +++ b/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def @@ -1,3 +1,3 @@ type: txt -help: "Route-map to modify the attributes" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" +help: Route-map to modify the attributes +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/parameters/always-compare-med/node.def b/templates/protocols/bgp/node.tag/parameters/always-compare-med/node.def index bf0959c9..37e251af 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,5 @@ -help: "Allow comparing MED from different neighbors" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Allow comparing MED from different neighbors +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"bgp always-compare-med\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 d5e39a06..c3ebac90 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,6 @@ -help: "Compare path lengths including confederation sets & sequences in selecting a route" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +help: Compare path lengths including confederation sets & sequences in selecting a route +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" \ -c \"bgp bestpath as-path confed \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 46385534..7959a950 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,5 @@ -help: "Ignore as-path length in selecting a route" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +help: Ignore as-path length in selecting a route +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" \ -c \"bgp bestpath as-path ignore \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" \ -c \"no bgp bestpath as-path ignore \" " diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/node.def index 72b50839..dda0fc5f 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/as-path/node.def @@ -1 +1 @@ -help: "AS-path attribute" +help: AS-path attribute 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 ba6a7ab4..2c34a4b6 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,6 @@ -help: "Compare router-id for identical EBGP paths" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +help: Compare router-id for identical EBGP paths +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ -c \"bgp bestpath compare-routerid \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 7de7aa6c..ec31b51c 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,6 @@ -help: "Compare MED among confederation paths" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +help: Compare MED among confederation paths +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" \ -c \"bgp bestpath med confed \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 7abff30d..9eb5b558 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,6 @@ -help: "Treat missing MED as the least preferred one" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +help: Treat missing MED as the least preferred one +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" \ -c \"bgp bestpath med missing-as-worst \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" \ -c \"no bgp bestpath med missing-as-worst \" " diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/med/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/med/node.def index 350270bb..088a9331 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/med/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/med/node.def @@ -1 +1 @@ -help: "MED attribute" +help: MED attribute diff --git a/templates/protocols/bgp/node.tag/parameters/bestpath/node.def b/templates/protocols/bgp/node.tag/parameters/bestpath/node.def index b4a1bbe7..178e4573 100644 --- a/templates/protocols/bgp/node.tag/parameters/bestpath/node.def +++ b/templates/protocols/bgp/node.tag/parameters/bestpath/node.def @@ -1 +1 @@ -help: "Change the default bestpath selection" +help: Change the default bestpath selection 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 c29c5c23..dcc764ed 100644 --- a/templates/protocols/bgp/node.tag/parameters/cluster-id/node.def +++ b/templates/protocols/bgp/node.tag/parameters/cluster-id/node.def @@ -1,6 +1,6 @@ type: ipv4 -help: "Configure route-reflector cluster-id\n" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"bgp cluster-id $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Configure route-reflector cluster-id\n +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"bgp cluster-id $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 c30eebd7..2d862c46 100644 --- a/templates/protocols/bgp/node.tag/parameters/confederation/identifier/node.def +++ b/templates/protocols/bgp/node.tag/parameters/confederation/identifier/node.def @@ -1,7 +1,7 @@ type: u32 -help: "Configure confederation AS id" -syntax: $(@) >= 1 && $(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"bgp confederation identifier $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +help: Configure confederation AS id +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"bgp confederation identifier $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ -c \"no bgp confederation identifier \" " diff --git a/templates/protocols/bgp/node.tag/parameters/confederation/node.def b/templates/protocols/bgp/node.tag/parameters/confederation/node.def index 272c946c..4933aeab 100644 --- a/templates/protocols/bgp/node.tag/parameters/confederation/node.def +++ b/templates/protocols/bgp/node.tag/parameters/confederation/node.def @@ -1 +1 @@ -help: "AS confederation parameters" +help: AS confederation parameters 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 0b8d04ed..c32b767f 100644 --- a/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def +++ b/templates/protocols/bgp/node.tag/parameters/confederation/peers/node.def @@ -1,8 +1,8 @@ multi: type: u32 -help: "Peer ASs in BGP confederation" -syntax: $(@) >= 1 && $(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"bgp confederation peers $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"no bgp confederation peers $(@)\" " +help: Peer ASs in BGP confederation +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "confederation AS id must be between 1 and 4294967294" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"bgp confederation peers $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"no bgp confederation peers $VAR(@)\" " diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/half-life/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/half-life/node.def index aa710acf..43839b82 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/half-life/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/half-life/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Half-life time for the penalty" -syntax: $(@) >= 1 && $(@) <= 45; "Half-life penalty must be between 1 and 45" +help: Half-life time for the penalty +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 45; "Half-life penalty must be between 1 and 45" diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/max-suppress-time/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/max-suppress-time/node.def index a4f59b8f..5c77e861 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/max-suppress-time/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/max-suppress-time/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Maximum duration to suppress a stable route" -syntax: $(@) >= 1 && $(@) <= 255; "Max-suppress-time must be between 1 and 255" -commit: $(../re-use/) != ""; "Re-use value must be set" -commit: $(../start-suppress-time/) != ""; "Start-suppress-time must be set" +help: Maximum duration to suppress a stable route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Max-suppress-time must be between 1 and 255" +commit:expression: $VAR(../re-use/) != ""; "Re-use value must be set" +commit:expression: $VAR(../start-suppress-time/) != ""; "Start-suppress-time must be set" diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/node.def index 487725dc..8d15aadc 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/node.def @@ -1,12 +1,12 @@ -help: "Enable route-flap dampening" -delete: "touch /tmp/bgp-dampening.\\$PPID" -end: "sh -c \" - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \\\"configure terminal\\\" -c \\\"router bgp $(../../@)\\\" \ +help: Enable route-flap dampening +delete:expression: "touch /tmp/bgp-dampening.$PPID" +end:expression: "sh -c \" + ${vyatta_sbindir}/vyatta-vtysh.pl -c \\\"configure terminal\\\" -c \\\"router bgp $VAR(../../@)\\\" \ -c \\\"no bgp dampening\\\" ; \ - if [ -f \\\"/tmp/bgp-dampening.\\\\$PPID\\\" ]; then \ - rm -f \\\"/tmp/bgp-dampening.\\\\$PPID\\\" ; \ + if [ -f \\\"/tmp/bgp-dampening.$PPID\\\" ]; then \ + rm -f \\\"/tmp/bgp-dampening.$PPID\\\" ; \ else \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \\\"configure terminal\\\" -c \\\"router bgp $(../../@)\\\" \ - -c \\\"bgp dampening $(./half-life/@) $(./re-use/@) $(./start-suppress-time/@) $(./max-suppress-time/@)\\\" ; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -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/dampening/re-use/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/re-use/node.def index 83b3e246..e9e9af8f 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/re-use/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/re-use/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Value to start reusing a route" -syntax: $(@) >= 1 && $(@) <= 20000; "Re-use value must be between 1 and 20000" -commit: $(../start-suppress-time/) != ""; "Start-suppress-time must be set" -commit: $(../max-suppress-time/) != ""; "Max-suppress-time must be set" +help: Value to start reusing a route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 20000; "Re-use value must be between 1 and 20000" +commit:expression: $VAR(../start-suppress-time/) != ""; "Start-suppress-time must be set" +commit:expression: $VAR(../max-suppress-time/) != ""; "Max-suppress-time must be set" diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/start-suppress-time/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/start-suppress-time/node.def index 17d5a67a..4e79cf61 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/start-suppress-time/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/start-suppress-time/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Value to start suppressing a route" -syntax: $(@) >= 1 && $(@) <= 20000; "Start-suppress-time must be between 1 and 20000" -commit: $(../re-use/) != ""; "Re-use value must be set" -commit: $(../max-suppress-time/) != ""; "Max-suppress-time must be set" +help: Value to start suppressing a route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 20000; "Start-suppress-time must be between 1 and 20000" +commit:expression: $VAR(../re-use/) != ""; "Re-use value must be set" +commit:expression: $VAR(../max-suppress-time/) != ""; "Max-suppress-time must be set" 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 0b2f4501..e9e16e73 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,6 +1,6 @@ type: u32 -help: "Local preference (higher=more preferred)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"bgp default local-preference $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +help: Local preference (higher=more preferred) +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"bgp default local-preference $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 cb184c4b..184dfcb7 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,5 @@ -help: "Deactivate IPv4 unicast for a peer by default" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +help: Deactivate IPv4 unicast for a peer by default +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ -c \"no bgp default ipv4-unicast\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ -c \"bgp default ipv4-unicast\" " diff --git a/templates/protocols/bgp/node.tag/parameters/default/node.def b/templates/protocols/bgp/node.tag/parameters/default/node.def index f1c90ec3..5f2ebba5 100644 --- a/templates/protocols/bgp/node.tag/parameters/default/node.def +++ b/templates/protocols/bgp/node.tag/parameters/default/node.def @@ -1 +1 @@ -help: "Configure BGP defaults" +help: Configure BGP defaults 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 e74fd24f..e7b0e50f 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,5 @@ -help: "Pick the best-MED path among paths advertised from the neighboring AS" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Pick the best-MED path among paths advertised from the neighboring AS +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"bgp deterministic-med \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"no bgp deterministic-med \" " 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 f08645a7..eff66372 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,5 @@ -help: "Enforce the first AS for EBGP routes" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Enforce the first AS for EBGP routes +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"bgp enforce-first-as \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"no bgp enforce-first-as \" " diff --git a/templates/protocols/bgp/node.tag/parameters/graceful-restart/node.def b/templates/protocols/bgp/node.tag/parameters/graceful-restart/node.def index 1e849462..ef9d8f38 100644 --- a/templates/protocols/bgp/node.tag/parameters/graceful-restart/node.def +++ b/templates/protocols/bgp/node.tag/parameters/graceful-restart/node.def @@ -1 +1 @@ -help: "Graceful restart capability parameters" +help: Graceful restart capability parameters 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 e4e5ae3a..763dc4a9 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 @@ -1,7 +1,7 @@ type: u32 -help: "Set the max time in seconds to hold onto restarting peer's stale paths" -syntax: $(@) >= 1 && $(@) <= 3600; "stalepath-time must be between 1 and 3600" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ - -c \"bgp graceful-restart stalepath-time $(@) \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +help: Set the max time in seconds to hold onto restarting peer's stale paths +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 3600; "stalepath-time must be between 1 and 3600" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ + -c \"bgp graceful-restart stalepath-time $VAR(@) \" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 eb9184a4..d88b8de1 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,5 @@ -help: "Log neighbor up/down and reset reason" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Log neighbor up/down and reset reason +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"bgp log-neighbor-changes \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"no bgp log-neighbor-changes \" " diff --git a/templates/protocols/bgp/node.tag/parameters/network/import-check/node.def b/templates/protocols/bgp/node.tag/parameters/network/import-check/node.def index 65d058a4..887eceaf 100644 --- a/templates/protocols/bgp/node.tag/parameters/network/import-check/node.def +++ b/templates/protocols/bgp/node.tag/parameters/network/import-check/node.def @@ -1,5 +1,5 @@ -help: "Check BGP network route exists in IGP" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +help: Check BGP network route exists in IGP +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ -c \"bgp network import-check \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../../@)\" \ -c \"no bgp network import-check \" " diff --git a/templates/protocols/bgp/node.tag/parameters/network/node.def b/templates/protocols/bgp/node.tag/parameters/network/node.def index 2db2693f..afc062e7 100644 --- a/templates/protocols/bgp/node.tag/parameters/network/node.def +++ b/templates/protocols/bgp/node.tag/parameters/network/node.def @@ -1 +1 @@ -help: "Network parameter options" +help: Network parameter options 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 5121991f..33ad9a29 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,5 @@ -help: "Disable client to client route reflection" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Disable client to client route reflection +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"no bgp client-to-client reflection \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 d25928d8..88eef57c 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,5 @@ -help: "Immediately reset session if a link to a directly connected external peer goes down" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Immediately reset session if a link to a directly connected external peer goes down +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"no bgp fast-external-failover \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 b23668f8..cd6b28ce 100644 --- a/templates/protocols/bgp/node.tag/parameters/node.def +++ b/templates/protocols/bgp/node.tag/parameters/node.def @@ -1 +1 @@ -help: "Configure BGP parameters" +help: Configure 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 dcba9f4f..6e9de2dc 100644 --- a/templates/protocols/bgp/node.tag/parameters/router-id/node.def +++ b/templates/protocols/bgp/node.tag/parameters/router-id/node.def @@ -1,6 +1,6 @@ type: ipv4 -help: "Override configured router identifier" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"bgp router-id $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Override configured router identifier +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"bgp router-id $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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 cfb0ef23..5fb71d57 100644 --- a/templates/protocols/bgp/node.tag/parameters/scan-time/node.def +++ b/templates/protocols/bgp/node.tag/parameters/scan-time/node.def @@ -1,7 +1,7 @@ type: u32 -syntax: $(@) >= 5 && $(@) <= 60; "scan-time must be between 5 and 60 seconds" -help: "Configure background scanner interval" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"bgp scan-time $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +syntax:expression: $VAR(@) >= 5 && $VAR(@) <= 60; "scan-time must be between 5 and 60 seconds" +help: Configure background scanner interval +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"bgp scan-time $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ -c \"no bgp scan-time \" " diff --git a/templates/protocols/bgp/node.tag/redistribute/connected/metric/node.def b/templates/protocols/bgp/node.tag/redistribute/connected/metric/node.def index 984a7064..43f1ffff 100644 --- a/templates/protocols/bgp/node.tag/redistribute/connected/metric/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/connected/metric/node.def @@ -1,2 +1,2 @@ type: u32 -help: "Metric for redistributed routes" +help: Metric for redistributed routes diff --git a/templates/protocols/bgp/node.tag/redistribute/connected/node.def b/templates/protocols/bgp/node.tag/redistribute/connected/node.def index 1e78e6bb..5bdf3b2f 100644 --- a/templates/protocols/bgp/node.tag/redistribute/connected/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/connected/node.def @@ -1,16 +1,16 @@ -help: "Redistribute connected routes" -delete: "touch /tmp/bgp-redist-connected.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Redistribute connected routes +delete:expression: "touch /tmp/bgp-redist-connected.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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; \ + if [ -f \"/tmp/bgp-redist-connected.$PPID\" ]; then \ + rm -rf /tmp/bgp-redist-connected.$PPID; \ else \ - if [ -n \"$(./metric/@)\" ]; then \ - COND=\"metric $(./metric/@)\"; + if [ -n \"$VAR(./metric/@)\" ]; then \ + COND=\"metric $VAR(./metric/@)\"; fi; \ - if [ -n \"$(./route-map/@)\" ]; then \ - COND=\"\\$COND route-map $(./route-map/@)\"; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + COND=\"$COND route-map $VAR(./route-map/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"redistribute connected \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"redistribute connected $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def index 5ce5f0ab..f2c6f7c2 100644 --- a/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def @@ -1,3 +1,3 @@ type: txt -help: "Route map reference" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" +help: Route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/kernel/metric/node.def b/templates/protocols/bgp/node.tag/redistribute/kernel/metric/node.def index 984a7064..43f1ffff 100644 --- a/templates/protocols/bgp/node.tag/redistribute/kernel/metric/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/kernel/metric/node.def @@ -1,2 +1,2 @@ type: u32 -help: "Metric for redistributed routes" +help: Metric for redistributed routes diff --git a/templates/protocols/bgp/node.tag/redistribute/kernel/node.def b/templates/protocols/bgp/node.tag/redistribute/kernel/node.def index 57e0531a..479114fd 100644 --- a/templates/protocols/bgp/node.tag/redistribute/kernel/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/kernel/node.def @@ -1,16 +1,16 @@ -help: "Redistribute kernel routes" -delete: "touch /tmp/bgp-redist-kernel.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Redistribute kernel routes +delete:expression: "touch /tmp/bgp-redist-kernel.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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; \ + if [ -f \"/tmp/bgp-redist-kernel.$PPID\" ]; then \ + rm -rf /tmp/bgp-redist-kernel.$PPID; \ else \ - if [ -n \"$(./metric/@)\" ]; then \ - COND=\"metric $(./metric/@)\"; + if [ -n \"$VAR(./metric/@)\" ]; then \ + COND=\"metric $VAR(./metric/@)\"; fi; \ - if [ -n \"$(./route-map/@)\" ]; then \ - COND=\"\\$COND route-map $(./route-map/@)\"; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + COND=\"$COND route-map $VAR(./route-map/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"redistribute kernel \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"redistribute kernel $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def index 5ce5f0ab..f2c6f7c2 100644 --- a/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def @@ -1,3 +1,3 @@ type: txt -help: "Route map reference" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" +help: Route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/node.def b/templates/protocols/bgp/node.tag/redistribute/node.def index e46c9122..00eefa88 100644 --- a/templates/protocols/bgp/node.tag/redistribute/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/node.def @@ -1 +1 @@ -help: "Redistribute information from another routing protocol" +help: Redistribute information from another routing protocol diff --git a/templates/protocols/bgp/node.tag/redistribute/ospf/metric/node.def b/templates/protocols/bgp/node.tag/redistribute/ospf/metric/node.def index 984a7064..43f1ffff 100644 --- a/templates/protocols/bgp/node.tag/redistribute/ospf/metric/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/ospf/metric/node.def @@ -1,2 +1,2 @@ type: u32 -help: "Metric for redistributed routes" +help: Metric for redistributed routes diff --git a/templates/protocols/bgp/node.tag/redistribute/ospf/node.def b/templates/protocols/bgp/node.tag/redistribute/ospf/node.def index 445b9869..f1a894a7 100644 --- a/templates/protocols/bgp/node.tag/redistribute/ospf/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/ospf/node.def @@ -1,16 +1,16 @@ -help: "Redistribute OSPF routes" -delete: "touch /tmp/bgp-redist-ospf.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Redistribute OSPF routes +delete:expression: "touch /tmp/bgp-redist-ospf.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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; \ + if [ -f \"/tmp/bgp-redist-ospf.$PPID\" ]; then \ + rm -rf /tmp/bgp-redist-ospf.$PPID; \ else \ - if [ -n \"$(./metric/@)\" ]; then \ - COND=\"metric $(./metric/@)\"; + if [ -n \"$VAR(./metric/@)\" ]; then \ + COND=\"metric $VAR(./metric/@)\"; fi; \ - if [ -n \"$(./route-map/@)\" ]; then \ - COND=\"\\$COND route-map $(./route-map/@)\"; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + COND=\"$COND route-map $VAR(./route-map/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"redistribute ospf \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"redistribute ospf $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def index 5ce5f0ab..f2c6f7c2 100644 --- a/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def @@ -1,3 +1,3 @@ type: txt -help: "Route map reference" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" +help: Route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/rip/metric/node.def b/templates/protocols/bgp/node.tag/redistribute/rip/metric/node.def index 984a7064..43f1ffff 100644 --- a/templates/protocols/bgp/node.tag/redistribute/rip/metric/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/rip/metric/node.def @@ -1,2 +1,2 @@ type: u32 -help: "Metric for redistributed routes" +help: Metric for redistributed routes diff --git a/templates/protocols/bgp/node.tag/redistribute/rip/node.def b/templates/protocols/bgp/node.tag/redistribute/rip/node.def index c2a4b239..f67cfdc6 100644 --- a/templates/protocols/bgp/node.tag/redistribute/rip/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/rip/node.def @@ -1,16 +1,16 @@ -help: "Redistribute RIP routes" -delete: "touch /tmp/bgp-redist-rip.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Redistribute RIP routes +delete:expression: "touch /tmp/bgp-redist-rip.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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; \ + if [ -f \"/tmp/bgp-redist-rip.$PPID\" ]; then \ + rm -rf /tmp/bgp-redist-rip.$PPID; \ else \ - if [ -n \"$(./metric/@)\" ]; then \ - COND=\"metric $(./metric/@)\"; + if [ -n \"$VAR(./metric/@)\" ]; then \ + COND=\"metric $VAR(./metric/@)\"; fi; \ - if [ -n \"$(./route-map/@)\" ]; then \ - COND=\"\\$COND route-map $(./route-map/@)\"; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + COND=\"$COND route-map $VAR(./route-map/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"redistribute rip \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"redistribute rip $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def index 5ce5f0ab..f2c6f7c2 100644 --- a/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def @@ -1,3 +1,3 @@ type: txt -help: "Route map reference" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" +help: Route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/static/metric/node.def b/templates/protocols/bgp/node.tag/redistribute/static/metric/node.def index 984a7064..43f1ffff 100644 --- a/templates/protocols/bgp/node.tag/redistribute/static/metric/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/static/metric/node.def @@ -1,2 +1,2 @@ type: u32 -help: "Metric for redistributed routes" +help: Metric for redistributed routes diff --git a/templates/protocols/bgp/node.tag/redistribute/static/node.def b/templates/protocols/bgp/node.tag/redistribute/static/node.def index ebf8bc87..d34e30ad 100644 --- a/templates/protocols/bgp/node.tag/redistribute/static/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/static/node.def @@ -1,16 +1,16 @@ -help: "Redistribute static routes" -delete: "touch /tmp/bgp-redist-static.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ +help: Redistribute static routes +delete:expression: "touch /tmp/bgp-redist-static.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -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; \ + if [ -f \"/tmp/bgp-redist-static.$PPID\" ]; then \ + rm -rf /tmp/bgp-redist-static.$PPID; \ else \ - if [ -n \"$(./metric/@)\" ]; then \ - COND=\"metric $(./metric/@)\"; + if [ -n \"$VAR(./metric/@)\" ]; then \ + COND=\"metric $VAR(./metric/@)\"; fi; \ - if [ -n \"$(./route-map/@)\" ]; then \ - COND=\"\\$COND route-map $(./route-map/@)\"; \ + if [ -n \"$VAR(./route-map/@)\" ]; then \ + COND=\"$COND route-map $VAR(./route-map/@)\"; \ fi; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../../@)\" \ - -c \"redistribute static \\$COND\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"redistribute static $COND\"; \ fi; " diff --git a/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def index 5ce5f0ab..f2c6f7c2 100644 --- a/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def @@ -1,3 +1,3 @@ type: txt -help: "Route map reference" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" +help: Route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/timers/holdtime/node.def b/templates/protocols/bgp/node.tag/timers/holdtime/node.def index b7da119e..06ebfd09 100644 --- a/templates/protocols/bgp/node.tag/timers/holdtime/node.def +++ b/templates/protocols/bgp/node.tag/timers/holdtime/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Holdtime interval" -syntax: $(@) == 0 || ($(@) >= 4 && $(@) <= 65535); "Holdtime interval must be 0 or between 4 and 65535" +help: Holdtime interval +syntax:expression: $VAR(@) == 0 || ($VAR(@) >= 4 && $VAR(@) <= 65535); "Holdtime interval must be 0 or between 4 and 65535" diff --git a/templates/protocols/bgp/node.tag/timers/keepalive/node.def b/templates/protocols/bgp/node.tag/timers/keepalive/node.def index 59067fdc..3d68ba94 100644 --- a/templates/protocols/bgp/node.tag/timers/keepalive/node.def +++ b/templates/protocols/bgp/node.tag/timers/keepalive/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Keepalive interval" -syntax: $(@) >= 1 && $(@) <= 65535; "Keepalive interval must be between 1 and 65535" +help: Keepalive interval +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Keepalive interval must be between 1 and 65535" diff --git a/templates/protocols/bgp/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/timers/node.def index 51475580..9fcace77 100644 --- a/templates/protocols/bgp/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/timers/node.def @@ -1,12 +1,12 @@ -help: "Adjust routing timers" -commit: $(./keepalive/) != ""; "You must set a keepalive interval" -commit: $(./holdtime/) != ""; "You must set a holdtime interval" -delete: "touch /tmp/bgp-timers.\\$PPID" -end: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../@)\" \ +help: Adjust routing timers +commit:expression: $VAR(./keepalive/) != ""; "You must set a keepalive interval" +commit:expression: $VAR(./holdtime/) != ""; "You must set a holdtime interval" +delete:expression: "touch /tmp/bgp-timers.$PPID" +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../@)\" \ -c \"no timers bgp\"; \ - if [ -f \"/tmp/bgp-timers.\\$PPID\" ]; then \ - rm -rf /tmp/bgp-timers.\\$PPID; \ + if [ -f \"/tmp/bgp-timers.$PPID\" ]; then \ + rm -rf /tmp/bgp-timers.$PPID; \ else \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $(../@)\" \ - -c \"timers bgp $(./keepalive/@) $(./holdtime/@)\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../@)\" \ + -c \"timers bgp $VAR(./keepalive/@) $VAR(./holdtime/@)\"; \ fi; " |