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/policy/route-map | |
parent | c51dae6826ea505169fca5b0cb0a580bf99c18cf (diff) | |
download | vyatta-cfg-quagga-cd50a751d1480424cdf103fd748b514330029c24.tar.gz vyatta-cfg-quagga-cd50a751d1480424cdf103fd748b514330029c24.zip |
convert templates to new syntax
Diffstat (limited to 'templates/policy/route-map')
46 files changed, 274 insertions, 274 deletions
diff --git a/templates/policy/route-map/node.def b/templates/policy/route-map/node.def index ec188a4b..0a7c2841 100644 --- a/templates/policy/route-map/node.def +++ b/templates/policy/route-map/node.def @@ -1,5 +1,5 @@ tag: type: txt -help: "Create route-map or enter route-map command mode" -syntax: pattern $(@) "^[-a-zA-Z0-9.]+$" ; "route-map $(@): name must be alpha-numeric" -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -n -c \"configure terminal\" -c \"no route-map $(@)\" " +help: Create route-map or enter route-map command mode +syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "route-map $VAR(@): name must be alpha-numeric" +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -n -c \"configure terminal\" -c \"no route-map $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/description/node.def b/templates/policy/route-map/node.tag/description/node.def index f9b9b4a9..b2a5d581 100644 --- a/templates/policy/route-map/node.tag/description/node.def +++ b/templates/policy/route-map/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Route map description" +help: Route map description diff --git a/templates/policy/route-map/node.tag/rule/node.def b/templates/policy/route-map/node.tag/rule/node.def index b59435f0..ccfad3ad 100644 --- a/templates/policy/route-map/node.tag/rule/node.def +++ b/templates/policy/route-map/node.tag/rule/node.def @@ -1,4 +1,4 @@ tag: type: u32 -help: "Specify route-map rule number" -syntax: $(@) >= 1 && $(@) <= 65535; "route-map $(../@): rule number $(@) must be between 1 and 65535" +help: Specify route-map rule number +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "route-map $VAR(../@): rule number $VAR(@) must be between 1 and 65535" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def index f36be233..e06322dd 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def @@ -1,5 +1,5 @@ type: txt -help: "Action to take on prefixes matching this rule" -syntax: $(@) in "permit", "deny"; "route-map $(../../@) $(@) $(../@) action: must be permit or deny" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(@) $(../@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no route-map $(../../@) $(@) $(../@)\" " +help: Action to take on prefixes matching this rule +syntax:expression: $VAR(@) in "permit", "deny"; "route-map $VAR(../../@) $VAR(@) $VAR(../@) action: must be permit or deny" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(@) $VAR(../@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no route-map $VAR(../../@) $VAR(@) $VAR(../@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/call/node.def b/templates/policy/route-map/node.tag/rule/node.tag/call/node.def index 02f578a3..ee36359e 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/call/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/call/node.def @@ -1,8 +1,8 @@ type: txt -help: "Target route-map name" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" "; "route-map $(@) doesn't exist" -commit: $(../action/) != ""; "must define an action for route-map $(../../@) rule $(../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ - -c \"call $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $(../../@) $(../action/@) $(../@)\" \ +help: Target route-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" "; "route-map $VAR(@) doesn't exist" +commit:expression: $VAR(../action/) != ""; "must define an action for route-map $VAR(../../@) rule $VAR(../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ + -c \"call $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ -c \"no call \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def b/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def index c925ec40..a8616682 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def @@ -1,10 +1,10 @@ type: u32 -help: "Continue on a different entry within the route-map" -syntax: $(@) >= 1 && $(@) <= 65535; "continue must be between 1 and 65535" -syntax: $(@) > $(../../@); "you may only continue forward in the route-map" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" - -c \"route-map $(../../@) $(../action/@) $(../@)\" \ - -c \"continue $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" - -c \"route-map $(../../@) $(../action/@) $(../@)\" \ +help: Continue on a different entry within the route-map +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "continue must be between 1 and 65535" +syntax:expression: $VAR(@) > $VAR(../../@); "you may only continue forward in the route-map" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" + -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ + -c \"continue $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" + -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ -c \"no continue \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/description/node.def b/templates/policy/route-map/node.tag/rule/node.tag/description/node.def index a32c76af..9d03b86c 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/description/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Route map rule description" +help: Route map rule description diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def index 4f566402..5df86392 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def @@ -1,10 +1,10 @@ type: txt -help: "Match BGP AS path list" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $(@)\" "; "AS path list $(@) doesn't exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match as-path $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"no match as-path $(@)\" " +help: Match BGP AS path list +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +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: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match as-path $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"no match as-path $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def index 8972b1e9..a167e553 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Match community list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $(@)\" "; "community-list $(@) doesn't exist" +help: Match community list +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\" "; "community-list $VAR(@) doesn't exist" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def index 439b06bb..41922336 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def @@ -1 +1 @@ -help: "Do exact matching of communities" +help: Do exact matching of communities diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def index 0ee602c0..29298fac 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def @@ -1,19 +1,19 @@ -help: "Match BGP community list" -delete: "touch /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-match-community.\\$PPID" -end: "if [ -z \"$(./community-list/)\" ]; then \ +help: Match BGP community list +delete:expression: "touch /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-match-community.$PPID" +end:expression: "if [ -z \"$VAR(./community-list/)\" ]; then \ echo You must configure a community-list ; \ exit 1 ; \ fi ; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ + ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no match community \" ; \ - if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-match-community.\\$PPID\" ]; then \ - rm -rf /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-match-community.\\$PPID; \ + if [ -f \"/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-match-community.$PPID\" ]; then \ + rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-match-community.$PPID; \ else \ - if [ -n \"$(./exact-match/)\" ]; then \ + if [ -n \"$VAR(./exact-match/)\" ]; then \ cond=\"exact-match \"; \ fi ; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match community $(./community-list/@) \\$cond\" ; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match community $VAR(./community-list/@) $cond\" ; \ fi; " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def index 3a594f51..782fdea0 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def @@ -1,15 +1,15 @@ type: txt -help: "Match first hop interface of route" +help: Match first hop interface of route # TODO: this node isn't returning an error, but it also isn't adding anything to vyatta -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -syntax: exec " \ - if [ -z \"`ip addr | grep $(@) `\" ]; then \ - echo $(@) doesn\\'t exist on this system ; \ +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +syntax:expression: exec " \ + if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ + echo $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match interface $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"no match interface $(@)\" " +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match interface $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"no match interface $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def index 1edeccce..d5a1a6d8 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def @@ -1,10 +1,10 @@ type: u32 -help: "access-list number" -commit: $(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" "; "access-list $(@) does not exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"match ip address $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"no match ip address $(@)\" " +help: access-list number +commit:expression: $VAR(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"match ip address $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"no match ip address $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def index d37d5622..a90f87be 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def @@ -1 +1 @@ -help: "Match address of route" +help: Match address of route diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def index 80911e6d..826af72f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def @@ -1,10 +1,10 @@ type: txt -help: "prefix-list name" -commit: $(../access-list/) == ""; "You can only specify a prefix-list or access-list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" "; "prefix-list $(@) does not exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"match ip address prefix-list $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"no match ip address prefix-list $(@)\" " +help: prefix-list name +commit:expression: $VAR(../access-list/) == ""; "You can only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"match ip address prefix-list $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"no match ip address prefix-list $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def index 81565610..9a8daf82 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def @@ -1,10 +1,10 @@ type: u32 -help: "access-list number" -commit: $(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" "; "access-list $(@) does not exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"match ip next-hop $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"no match ip next-hop $(@)\" " +help: access-list number +commit:expression: $VAR(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"match ip next-hop $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"no match ip next-hop $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def index d5c3b95f..b0439561 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def @@ -1 +1 @@ -help: "Match next-hop address of route" +help: Match next-hop address of route diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def index 314ea6f3..f4809ad2 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def @@ -1,10 +1,10 @@ type: txt -help: "prefix-list name" -commit: $(../access-list/) == ""; "You can only specify a prefix-list or access-list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" "; "prefix-list $(@) does not exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"match ip next-hop prefix-list $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"no match ip next-hop prefix-list $(@)\" " +help: prefix-list name +commit:expression: $VAR(../access-list/) == ""; "You can only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"match ip next-hop prefix-list $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"no match ip next-hop prefix-list $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def index ce13dd49..6cea7554 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def @@ -1 +1 @@ -help: "IP information" +help: IP information diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def index 909be735..45fcbfdc 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def @@ -1,10 +1,10 @@ type: u32 -help: "access-list number" -commit: $(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" "; "access-list $(@) does not exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"match ip route-source $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"no match ip route-source $(@)\" " +help: access-list number +commit:expression: $VAR(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"match ip route-source $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"no match ip route-source $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def index 12605cbc..084598c8 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def @@ -1 +1 @@ -help: "Match route-source" +help: Match route-source diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def index 27813153..f6c21378 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def @@ -1,10 +1,10 @@ type: txt -help: "prefix-list name" -commit: $(../access-list/) == ""; "You can only specify a prefix-list or access-list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" "; "prefix-list $(@) does not exist" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"match ip route-source prefix-list $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../../../@) $(../../../../action/@) $(../../../../@)\" \ - -c \"no match ip route-source prefix-list $(@)\" " +help: prefix-list name +commit:expression: $VAR(../access-list/) == ""; "You can only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"match ip route-source prefix-list $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ + -c \"no match ip route-source prefix-list $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def index 7cfab7b1..ec674ef1 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def @@ -1,10 +1,10 @@ type: u32 -help: "Match metric of route" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match metric $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"no match metric $(@)\" " +help: Match metric of route +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match metric $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"no match metric $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def index d322135f..1c7a5919 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def @@ -1,11 +1,11 @@ type: txt -help: "BGP origin code" -syntax: $(@) in "egp", "igp", "incomplete"; "origin must be egp, igp, or incomplete" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match origin $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"no match origin $(@)\" " +help: BGP origin code +syntax:expression: $VAR(@) in "egp", "igp", "incomplete"; "origin must be egp, igp, or incomplete" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match origin $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"no match origin $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def index d90b5814..696f2d93 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def @@ -1,11 +1,11 @@ type: txt -help: "Match peer address" -syntax: exec "/opt/vyatta/sbin/vyatta-policy.pl --check-peer-syntax $(@)"; "peer must be either an IP or local" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match peer $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Match peer address +syntax:expression: exec "/opt/vyatta/sbin/vyatta-policy.pl --check-peer-syntax $VAR(@)"; "peer must be either an IP or local" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match peer $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no match peer \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def index 4b92cb6b..af88a29f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def @@ -1,11 +1,11 @@ type: u32 -help: "Match tag of route" -syntax: $(@) >= 1 && $(@) <= 65535; "tag must be between 1 and 65535" -commit: $(../../action) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"match tag $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"no match tag $(@)\" " +help: Match tag of route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" +commit:expression: $VAR(../../action) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"match tag $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"no match tag $VAR(@)\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def index 30cf2197..2203a9d6 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def @@ -1,11 +1,11 @@ type: u32 -help: "Goto sequence number" -syntax: $(../next/) == ""; "you can set only goto or next" -syntax: $(@) >= 1 && $(@) <= 65535; "tag must be between 1 and 65535" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"on-match goto $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Goto sequence number +syntax:expression: $VAR(../next/) == ""; "you can set only goto or next" +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"on-match goto $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no on-match goto \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def index fa93fcf7..1e7e9bbe 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def @@ -1,10 +1,10 @@ -help: "Goto next sequence number" -syntax: $(../goto/) == ""; "you can set only goto or next" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Goto next sequence number +syntax:expression: $VAR(../goto/) == ""; "you can set only goto or next" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"on-match next \" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no on-match next \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def index 496da614..718fe124 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def @@ -1 +1 @@ -help: "Exit policy on matches" +help: Exit policy on matches diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def index b41708ee..e0d63209 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def @@ -1,3 +1,3 @@ type: u32 -help: "AS number of aggregator" -syntax: $(@) >= 1 && $(@) <= 4294967294; "AS number must be between 1 and 4294967294" +help: AS number of aggregator +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "AS number must be between 1 and 4294967294" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def index 5cc75381..59f601c8 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def @@ -1,2 +1,2 @@ type: ipv4 -help: "IP address of aggregator" +help: IP address of aggregator diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def index 342b8a8a..84cca487 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def @@ -1,16 +1,16 @@ -help: "BGP aggregator attribute" -commit: $(./as/) != "" && $(./ip/) != ""; "Must configure both as and ip" -commit: $(../../action/) != ""; "Must configure an action" -delete: "echo $(./as/@) $(./ip/@) > /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID" -end: "if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID\" ]; then \ - as=\\$(cat /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID); \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"no set aggregator as \\$as\" ; \ - rm -rf /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-aggregator.\\$PPID; \ +help: BGP aggregator attribute +commit:expression: $VAR(./as/) != "" && $VAR(./ip/) != ""; "Must configure both as and ip" +commit:expression: $VAR(../../action/) != ""; "Must configure an action" +delete:expression: "echo $VAR(./as/@) $VAR(./ip/@) > /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID" +end:expression: "if [ -f \"/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID\" ]; then \ + as=$(cat /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID); \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"no set aggregator as $as\" ; \ + rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID; \ else \ - as=\"$(./as/@) $(./ip/@)\"; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set aggregator as \\$as\" ; \ + as=\"$VAR(./as/@) $VAR(./ip/@)\"; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set aggregator as $as\" ; \ fi ; " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def index d308b37e..b9c1ae27 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def @@ -1,11 +1,11 @@ type: txt -help: "Prepend string for a BGP AS-path attribute" -syntax: exec "/opt/vyatta/sbin/vyatta-check-as-prepend.pl \"$(@)\" "; "Invalid AS path." -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set as-path prepend $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Prepend string for a BGP AS-path attribute +syntax:expression: exec "/opt/vyatta/sbin/vyatta-check-as-prepend.pl \"$VAR(@)\" "; "Invalid AS path." +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set as-path prepend $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set as-path prepend \" " -#comp_help: Enter a list of AS numbers to prepend. Use double quotes around the list (f.g. "456 64500 45001") +comp_help: Enter a list of AS numbers to prepend. Use double quotes around the list (f.g. "456 64500 45001") diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def index ba5344eb..0cc8560b 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def @@ -1,8 +1,8 @@ -help: "BGP atomic aggregate attribute" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: BGP atomic aggregate attribute +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"set atomic-aggregate\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set atomic-aggregate\" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def index 068c096c..5fd3eaae 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def @@ -1,3 +1,3 @@ type: txt -help: "Set BGP community list" -commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $(@)\""; "community list $(@) does not exist" +help: Set BGP community list +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\""; "community list $VAR(@) does not exist" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def index f8ca6637..000d8d23 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def @@ -1 +1 @@ -help: "Delete matching communities" +help: Delete matching communities diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def index 1eadf4c2..f1e98001 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def @@ -1,19 +1,19 @@ -help: "Set BGP community list" -delete: "touch /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-comm-list.\\$PPID" -end: "if [ -z \"$(./comm-list/)\" ]; then \ +help: Set BGP community list +delete:expression: "touch /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID" +end:expression: "if [ -z \"$VAR(./comm-list/)\" ]; then \ echo You must configure a comm-list ; \ exit 1 ; \ fi ; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ + ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set comm-list \" ; \ - if [ -f \"/tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-comm-list.\\$PPID\" ]; then \ - rm -rf /tmp/policy-route-map-$(../../../@)-$(../../action/@)-$(../../@)-set-comm-list.\\$PPID; \ + if [ -f \"/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID\" ]; then \ + rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID; \ else \ - if [ -n \"$(./delete/)\" ]; then \ + if [ -n \"$VAR(./delete/)\" ]; then \ cond=\"delete\" ; \ fi ; \ - \\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set comm-list $(./comm-list/@) \\$cond\" ; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set comm-list $VAR(./comm-list/@) $cond\" ; \ fi; " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def index f77940af..83c93e8c 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def @@ -1,9 +1,9 @@ type: txt -help: "Community number in aa:nn format or local-AS|no-advertise|no-export|internet|additive or none" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set community $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Community number in aa:nn format or local-AS|no-advertise|no-export|internet|additive or none +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set community $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set community \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def index ac92a5c3..05438de7 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def @@ -1,10 +1,10 @@ type: ipv4 -help: "Next hop IP address" +help: Next hop IP address # TODO: can also set to peer for BGP -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set ip next-hop $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set ip next-hop $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set ip next-hop \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def index 4bb7e8b2..678f081b 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def @@ -1,9 +1,9 @@ type: u32 -help: "BGP local preference path attribute" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set local-preference $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: BGP local preference path attribute +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set local-preference $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set local-preference \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def index a854d167..c16e4faf 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def @@ -1,10 +1,10 @@ type: txt -help: "Metric value for destination routing protocol" -syntax: exec "if [ -n \"\\$(echo $(@) | sed 's/^[+-]*[0123456789]*//')\" ]; then exit 1; fi; "; "metric must be an integer with an optional +/- prepend" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set metric $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Metric value for destination routing protocol +syntax:expression: exec "if [ -n \"$(echo $VAR(@) | sed 's/^[+-]*[0123456789]*//')\" ]; then exit 1; fi; "; "metric must be an integer with an optional +/- prepend" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set metric $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set metric \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/node.def index 6d30b42f..80487db0 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/node.def @@ -1 +1 @@ -help: "Set values in destination routing protocol" +help: Set values in destination routing protocol diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def index c0696612..7fa269eb 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def @@ -1,10 +1,10 @@ type: txt -help: "BGP origin code" -syntax: $(@) in "igp", "egp", "incomplete"; "origin must be one of igp, egp, or incomplete" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set origin $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: BGP origin code +syntax:expression: $VAR(@) in "igp", "egp", "incomplete"; "origin must be one of igp, egp, or incomplete" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set origin $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set origin \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def index c96f2371..f82602c4 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def @@ -1,9 +1,9 @@ type: ipv4 -help: "BGP originator ID attribute" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set originator-id $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: BGP originator ID attribute +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set originator-id $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set originator-id \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def index b13f26ba..9a74d304 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def @@ -1,10 +1,10 @@ type: u32 -help: "Tag value for routing protocol" -syntax: $(@) >= 1 && $(@) <= 65535; "tag must be between 1 and 65535" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set tag $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: Tag value for routing protocol +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set tag $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set tag \" " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def index 7ac8958a..035d8e38 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def @@ -1,9 +1,9 @@ type: u32 -help: "BGP weight for routing table" -commit: $(../../action/) != ""; "You must specify an action for route-map $(../../../@) rule $(../../@)" -update: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ - -c \"set weight $(@)\" " -delete: "\\${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $(../../../@) $(../../action/@) $(../../@)\" \ +help: BGP weight for routing table +commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ + -c \"set weight $VAR(@)\" " +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ -c \"no set weight \" " |