diff options
author | Robert Bays <robert@vyatta.com> | 2010-07-21 17:40:48 -0700 |
---|---|---|
committer | Robert Bays <robert@vyatta.com> | 2010-07-21 17:40:48 -0700 |
commit | d538bb7b58ebf74d6174992d69e57e829601d7ee (patch) | |
tree | cbf397fbec3414149850bdefd3e060712b54071f /templates/policy | |
parent | 93004ab85218f1877f85b037b2c9dde05cafb505 (diff) | |
download | vyatta-cfg-quagga-d538bb7b58ebf74d6174992d69e57e829601d7ee.tar.gz vyatta-cfg-quagga-d538bb7b58ebf74d6174992d69e57e829601d7ee.zip |
remove explicit paths from commit error messages since that is handled by CLI now
Diffstat (limited to 'templates/policy')
51 files changed, 102 insertions, 140 deletions
diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def index 16f9d58b..74e9acf8 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def @@ -1,10 +1,4 @@ help: Any IP address to match - -commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ -policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" - -commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "\ -policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" - -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" - +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def index ec8410b8..10523b87 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def @@ -1,8 +1,6 @@ type: ipv4 help: Single host IP address to match val_help: Host address to match -commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ -policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" -commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "\ -policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def index 2f35bde4..6f3172ca 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def @@ -1,8 +1,7 @@ type: ipv4 help: Network/netmask to match (requires network be defined) val_help: Inverse-mask to match -commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ -policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" -commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../network/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify a network if you configure an inverse mask." -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../network/) != ""; "you must specify a network if you configure an inverse mask." +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def index 85b71ad8..2be0b768 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def @@ -1,8 +1,7 @@ type: ipv4 help: Network/netmask to match (requires inverse-mask be defined) val_help: Network to match -commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ -policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" -commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../inverse-mask/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an inverse-mask if you configure a network" -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../inverse-mask/) != ""; "you must specify an inverse-mask if you configure a network" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def index 777ac99a..2e432a5a 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def @@ -1,3 +1,3 @@ help: Any IP address to match -commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" +commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def index aeaa5521..e6700aa6 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def @@ -1,5 +1,5 @@ type: ipv4 help: Single host IP address to match val_help: Host address to match -commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" +commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def index 60b8143e..e0702837 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def @@ -1,7 +1,6 @@ type: ipv4 help: Network/netmask to match (requires network be defined) val_help: Inverse-mast to match - -commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../network/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify a network if you configure an inverse-mask" -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" +commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../network/) != ""; "you must specify a network if you configure an inverse-mask" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def index 24e191b3..c6199485 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def @@ -2,6 +2,6 @@ type: ipv4 help: Network/netmask to match (requires inverse-mask be defined) val_help: Network to match -commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" -commit:expression: $VAR(../inverse-mask/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an inverse-mask if you configure a network" -commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" +commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../inverse-mask/) != ""; "you must specify an inverse-mask if you configure a network" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list6/node.tag/rule/node.tag/source/any/node.def b/templates/policy/access-list6/node.tag/rule/node.tag/source/any/node.def index f08dd0dd..16b87410 100644 --- a/templates/policy/access-list6/node.tag/rule/node.tag/source/any/node.def +++ b/templates/policy/access-list6/node.tag/rule/node.tag/source/any/node.def @@ -1,5 +1,3 @@ help: Any IPv6 address to match - -commit:expression: ($VAR(../network/) == ""); "policy access-list6 $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (network|any)" - -commit:expression: $VAR(../../action/) != ""; "policy access-list6 $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" +commit:expression: ($VAR(../network/) == ""); "you may only define one filter type. (network|any)" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/access-list6/node.tag/rule/node.tag/source/exact-match/node.def b/templates/policy/access-list6/node.tag/rule/node.tag/source/exact-match/node.def index 170efc33..01565bea 100644 --- a/templates/policy/access-list6/node.tag/rule/node.tag/source/exact-match/node.def +++ b/templates/policy/access-list6/node.tag/rule/node.tag/source/exact-match/node.def @@ -1,3 +1,2 @@ help: Exact match of the network prefixes - -commit:expression: ($VAR(../any/) == ""); "policy access-list6 $VAR(../../../@) rule $VAR(../../@) source: exact-match can only be used with a network filter " +commit:expression: ($VAR(../any/) == ""); "exact-match can only be used with a network filter " diff --git a/templates/policy/access-list6/node.tag/rule/node.tag/source/network/node.def b/templates/policy/access-list6/node.tag/rule/node.tag/source/network/node.def index ad10ba4d..eb97e759 100644 --- a/templates/policy/access-list6/node.tag/rule/node.tag/source/network/node.def +++ b/templates/policy/access-list6/node.tag/rule/node.tag/source/network/node.def @@ -1,7 +1,5 @@ type: ipv6net help: Network/netmask to match (requires inverse-mask be defined) val_help: IPv6 address and prefix length - -commit:expression: ($VAR(../any/) == ""); "policy access-list6 $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (network|any)" - -commit:expression: $VAR(../../action/) != ""; "policy access-list6 $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" +commit:expression: ($VAR(../any/) == ""); "you may only define one filter type. (network|any)" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" diff --git a/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def b/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def index e42d30d8..6b721273 100644 --- a/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def +++ b/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def @@ -4,4 +4,4 @@ val_help: <aa:nn>; AS path regular expression (ex: "50:1 6553:1201") # TODO: check regex syntax; \ # "invalid chars in regex syntax" -commit:expression: $VAR(../action/@) != ""; "policy as-path-list $VAR(../../@) rule $VAR(../@): You must specify an action" +commit:expression: $VAR(../action/@) != ""; "You must specify an action" diff --git a/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def index 49825567..8d903b33 100644 --- a/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def +++ b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def @@ -5,9 +5,9 @@ val_help: Community list regular expression syntax:expression: exec " \ if [ $VAR(../../@) -ge 1 ] && [ $VAR(../../@) -le 99 ]; then \ if [ -n \"`echo $VAR(@) | sed 's/[0-9]*:[0-9]*//g' | sed -e 's/internet//g' -e 's/local-AS//g' -e 's/no-advertise//g' -e 's/no-export//g'`\" ]; then \ - echo policy community-list $VAR(../../@) rule $VAR(../@): regex $VAR(@) is invalid for a standard community list; \ + echo regex $VAR(@) is invalid for a standard community list; \ exit 1 ; \ fi ; \ fi ; " -commit:expression: $VAR(../action/@) != ""; "policy community-list $VAR(../../@) rule $VAR(../@): You must specify an action" +commit:expression: $VAR(../action/@) != ""; "You must specify an action" diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def index 8245f766..e779122a 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.def @@ -5,8 +5,8 @@ val_help: u32:1-65535; Prefix-list rule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" -commit:expression: $VAR(./prefix/) != ""; "policy prefix-list $VAR(../@) rule $VAR(@): You must specify a prefix" -commit:expression: $VAR(./action/) != ""; "policy prefix-list $VAR(../@) rule $VAR(@): You must specify an action" +commit:expression: $VAR(./prefix/) != ""; "You must specify a prefix" +commit:expression: $VAR(./action/) != ""; "You must specify an action" delete: touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID ; len=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; @@ -22,14 +22,14 @@ delete: touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID ; end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; if [ -n "$VAR(./ge/@)" ]; then if [ $len -ge $VAR(./ge/@) ]; then - echo "policy prefix-list $VAR(../@) rule $VAR(@): ge must be greater than prefix length"; + echo "ge must be greater than prefix length"; exit 1 ; fi ; cond="ge $VAR(./ge/@) "; fi; if [ -n "$VAR(./le/@)" ]; then if [ $VAR(./le/@) -ne 32 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -le $VAR(./ge/@) ]; then - echo "policy prefix-list $VAR(../@) rule $VAR(@): le must be greater than or equal to ge"; + echo "le must be greater than or equal to ge"; exit 1 ; fi ; cond="$cond le $VAR(./le/@) "; diff --git a/templates/policy/prefix-list6/node.tag/rule/node.def b/templates/policy/prefix-list6/node.tag/rule/node.def index 2af0eb88..5e466f47 100644 --- a/templates/policy/prefix-list6/node.tag/rule/node.def +++ b/templates/policy/prefix-list6/node.tag/rule/node.def @@ -5,9 +5,9 @@ val_help: u32:1-65535; Prefix list rule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" -commit:expression: $VAR(./prefix/) != ""; "policy prefix-list6 $VAR(../@) rule $VAR(@): You must specify a prefix" +commit:expression: $VAR(./prefix/) != ""; "You must specify a prefix" -commit:expression: $VAR(./action/) != ""; "policy prefix-list6 $VAR(../@) rule $VAR(@): You must specify an action" +commit:expression: $VAR(./action/) != ""; "You must specify an action" delete: len=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; if [ -n "$VAR(./ge/@)" ]; then @@ -22,14 +22,14 @@ delete: len=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; if [ -n "$VAR(./ge/@)" ]; then if [ $len -ge $VAR(./ge/@) ]; then - echo "policy prefix-list $VAR(../@) rule $VAR(@): ge must be greater than prefix length"; + echo "ge must be greater than prefix length"; exit 1 ; fi ; cond="ge $VAR(./ge/@) "; fi; if [ -n "$VAR(./le/@)" ]; then if [ $VAR(./le/@) -ne 128 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -le $VAR(./ge/@) ]; then - echo "policy prefix-list $VAR(../@) rule $VAR(@): le must be greater than or equal to ge"; + echo "le must be greater than or equal to ge"; exit 1 ; fi ; cond="$cond le $VAR(./le/@) "; 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 a2d7c96f..a679f937 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 @@ -9,7 +9,7 @@ update: /opt/vyatta/sbin/vyatta-policy.pl --check-routemap-action "policy route- if [ $? -eq 0 ]; then vtysh -c "configure terminal" -c "route-map $VAR(../../@) $VAR(@) $VAR(../@)"; else - echo "policy route-map $VAR(../../@) rule $VAR(../@): You can not change the action."; + echo "You can not change the action."; echo " To change the action you must first delete the rule "; echo -e " \"delete route-map $VAR(../../@) rule $VAR(../@)\" and commit it. \\n"; exit 1; @@ -19,7 +19,7 @@ delete: /opt/vyatta/sbin/vyatta-policy.pl --check-delete-routemap-action "policy if [ $? -eq 0 ]; then touch /tmp/route-map-$VAR(../../@)-rule-$VAR(../@)-action.$PPID ; else - echo "policy route-map $VAR(../../@) rule $VAR(../@): Action is a required parameter. "; + echo "Action is a required parameter. "; echo -e " To delete that node you must delete \"route-map $VAR(../../@) rule $VAR(../@)\". \\n"; exit 1; fi; 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 bbd278e3..0527e2e7 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 @@ -2,8 +2,8 @@ type: txt help: Call another route-map on match val_help: Route map name -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" "; "policy route-map $VAR(../../@) rule $VAR(../@) call: called route-map $VAR(@) doesn't exist" -commit:expression: $VAR(../action/) != ""; "policy route-map $VAR(../../@) rule $VAR(../@): you must define an action" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" "; "called route-map $VAR(@) doesn't exist" +commit:expression: $VAR(../action/) != ""; "you must define an action" update: vtysh -c "configure terminal" -c "route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)" \ -c "call $VAR(@)" 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 9982c50a..cda7d38d 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 @@ -5,7 +5,7 @@ val_help: u32:1-65535; Rule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "continue must be between 1 and 65535" commit:expression: $VAR(@) > $VAR(../@); "you may only continue forward in the route-map" -commit:expression: $VAR(../action/) != ""; "policy route-map $VAR(../../@) rule $VAR(../@): you must define an action" +commit:expression: $VAR(../action/) != ""; "you must define an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)" \ 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 73a013ba..edf514f4 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 @@ -2,8 +2,8 @@ type: txt help: BGP as-path-list to match val_help: AS path list name -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" "; "policy route-map $VAR(../../../@) rule $VAR(../../@) match as-path: AS path list $VAR(@) doesn't exist" +commit:expression: $VAR(../../action/) != ""; "You must specify an action" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" "; "match as-path: AS path list $VAR(@) doesn't exist" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $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 5566808b..17037274 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 @@ -3,4 +3,4 @@ help: BGP community-list to match val_help: u32:1-99; BGP community list (standard) val_help: u32:100-500; BGP community list (expanded) -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\" "; "policy route-map $VAR(../../../../@) rule $VAR(../../../@) match community: community-list $VAR(@) doesn't exist" +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/interface/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def index 5c1034c3..f590c32f 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 @@ -2,10 +2,10 @@ type: txt help: First hop interface of a route to match val_help: Interface name -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" +commit:expression: $VAR(../../action/) != ""; "You must specify an action" commit:expression: exec " \ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ - echo policy route-map $VAR(../../../@) rule $VAR(../../@) match interface: interface $VAR(@) doesn\\'t exist on this system ; \ + echo interface $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " 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 1a8b8eb2..1ba1af4f 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 @@ -9,11 +9,11 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/access-list/* ) echo -n ${params[@]##*/} -commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: you may only specify a prefix-list or access-list" +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(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: access-list $VAR(@) does not exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ 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 66dafac6..c0da0baf 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 @@ -6,11 +6,11 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/prefix-list/* ) echo -n ${params[@]##*/} -commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address prefix-list: you may only specify a prefix-list or access-list" +commit:expression: $VAR(../access-list/) == ""; "you may only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address prefix-list: prefix-list $VAR(@) does not exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $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 90e2fc30..53aac4da 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 @@ -5,9 +5,9 @@ val_help: u32:100-199; IP extended access list number val_help: u32:1300-1999; IP standard access list number (expanded range) val_help: u32:2000-2699; IP extended access list number (expanded range) -commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop access-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(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop access-list: access-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +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" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ 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 bb59ecfe..1771454e 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 @@ -2,9 +2,9 @@ type: txt help: IP prefix-list to match val_help: Prefix list name -commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop prefix-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(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop prefix-list: prefix-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +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" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ 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 4182eafb..516b8027 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 @@ -5,9 +5,9 @@ val_help: u32:100-199; IP extended access list number val_help: u32:1300-1999; IP standard access list number (expanded range) val_help: u32:2000-2699; IP extended access list number (expanded range) -commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source access-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(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source access-list: access-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +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" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ 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 8c58d92a..f4ca6241 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 @@ -2,11 +2,9 @@ type: txt help: IP prefix-list to match val_help: Prefix list name -commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-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(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: prefix-list $VAR(@) does not exist" - -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: you must specify an action" +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" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) \ diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def index 5d99ddaa..27bf95ce 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def @@ -6,11 +6,9 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: you may only specify a prefix-list or access-list" - -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 address access-list: access-list6 $VAR(@) does not exist" - -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +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-list6 $VAR(@)\" "; "access-list6 $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def index c2f75c45..ef841e89 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def @@ -6,11 +6,9 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/prefix-list6/* ) echo -n ${params[@]##*/} -commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 address prefix-list: you may only specify a prefix-list or access-list" - -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 address prefix-list: prefix-list6 $VAR(@) does not exist" - -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +commit:expression: $VAR(../access-list/) == ""; "you may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; "prefix-list6 $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/access-list/node.def index eb75c329..18b6a1ce 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/access-list/node.def @@ -2,11 +2,9 @@ type: txt help: IPv6 access-list6 to match val_help: IPv6 access list -commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 nexthop access-list: you may only specify a prefix-list or access-list" - -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 nexthop access-list: access-list6 $VAR(@) does not exist" - -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +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-list6 $VAR(@)\" "; "access-list6 $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/prefix-list/node.def index 8acefeb0..ec9a4d2f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/nexthop/prefix-list/node.def @@ -2,11 +2,9 @@ type: txt help: IPv6 prefix-list to match val_help: IPv6 prefix list name -commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 nexthop prefix-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(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 nexthop prefix-list: prefix-list $VAR(@) does not exist" - -commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +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" +commit:expression: $VAR(../../../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $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 26190202..7f99c2c7 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 @@ -3,8 +3,7 @@ help: Metric of route to match val_help: u32:1-65535; Rrute metric syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "metric must be between 1 and 65535" - -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $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 591fa8ca..aac5cd0a 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 @@ -5,8 +5,7 @@ val_help: igp; Interior gateway protocol origin val_help: incomplete; Incomplete origin syntax:expression: $VAR(@) in "egp", "igp", "incomplete"; "origin must be egp, igp, or incomplete" - -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $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 e0f7ffc0..ea8fcddc 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 @@ -4,8 +4,7 @@ val_help: ipv4; Peer IP address val_help: local: Static or redistributed routes 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/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 2ee87f7b..46e1b165 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 @@ -3,8 +3,7 @@ help: Route tag to match val_help: u32:1-65535; Route tag syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" - -commit:expression: $VAR(../../action) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $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 212a8e69..7980d35c 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 @@ -4,9 +4,8 @@ val_help: u32:1-65535; Rule number syntax:expression: $VAR(../next/) == ""; "you may set only goto or next" syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "goto must be a rule number between 1 and 65535" - -commit:expression: $VAR(@) > $VAR(../../@); "policy route-map $VAR(../../../@) rule $VAR(../../@): you may only go forward in the route-map" -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(@) > $VAR(../../@); "you may only go forward in the route-map" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 647a8c0e..31fc8efb 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,6 +1,6 @@ help: Next sequence number to goto on match syntax:expression: $VAR(../goto/) == ""; "you may set only goto or next" -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ -c "on-match next " 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 15cfe854..632a0032 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,6 +1,6 @@ help: Border Gateway Protocol (BGP) aggregator attribute -commit:expression: $VAR(./as/) != "" && $VAR(./ip/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@) set aggregator: you must configure both as and ip" -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must configure an action" +commit:expression: $VAR(./as/) != "" && $VAR(./ip/) != ""; "you must configure both as and ip" +commit:expression: $VAR(../../action/) != ""; "you must configure an action" delete: echo $VAR(./as/@) $VAR(./ip/@) > /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID end: 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); 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 1bc6709c..1a7f6376 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 @@ -3,8 +3,7 @@ help: Prepend string for a Border Gateway Protocol (BGP) AS-path attribute val_help: BGP AS path prepend string (ex: "456 64500 45001") syntax:expression: exec "/opt/vyatta/sbin/vyatta-check-as-prepend.pl \"$VAR(@)\" "; "invalid AS path string" - -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 f844c1ef..aac00e3e 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,5 +1,5 @@ help: Border Gateway Protocol (BGP) atomic aggregate attribute -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ -c "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 31a321bd..474528d6 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 @@ -3,4 +3,4 @@ help: BGP communities with a community-list val_help: u32:1-99; BGP community list (standard) val_help: u32:100-500; BGP community list (expanded) -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\""; "policy route-map $VAR(../../../@) rule $VAR(../../@) set comm-list: community list $VAR(@) does not exist" +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/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def index 518023ca..9ae67bc2 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,7 +1,7 @@ help: Border Gateway Protocol (BGP) communities matching a community-list delete: touch /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID end: if [ -z "$VAR(./comm-list/)" ]; then - echo policy route-map $VAR(../../../@) rule $VAR(../../@) set comm-list: You must configure a comm-list ; + echo You must configure a comm-list ; exit 1 ; fi ; vtysh --noerror -c "configure terminal" \ 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 cd3c8ed5..41029366 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 @@ -9,9 +9,7 @@ val_help: internet; Symbolic Internet community 0 allowed:echo "none local-AS no-advertise no-export internet" syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-community $VAR(@)" - -commit:expression: $VAR(../../action/) != "" \ - ; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" +commit:expression: $VAR(../../action/) != "" ; "You must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 2faf7c6c..256f4eeb 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 @@ -3,7 +3,7 @@ help: Nexthop IP address val_help: IP address # TODO: can also set to peer for BGP -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 7dfda530..125e9e69 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 @@ -2,7 +2,7 @@ type: u32 help: Border Gateway Protocol (BGP) local preference attribute val_help: Local preference value -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def index 92c776d0..0d17ef0d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def @@ -4,8 +4,7 @@ val_help: type-1; OSPF external type 1 metric val_help: type-2; OSPF external type 2 metric syntax:expression: $VAR(@) in "type-1", "type-2"; "Must be (type-1, type-2)" - -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 6f71fd12..7bba75bf 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 @@ -4,8 +4,7 @@ val_help: <+/-metric>; Add or subtract metric val_help: u32:0-4294967295; Metric value 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/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 887b1ef9..4b03a4f8 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 @@ -6,8 +6,7 @@ val_help: incomplete; Incomplete origin allowed: echo "igp egp incomplete" syntax:expression: $VAR(@) in "igp", "egp", "incomplete"; "origin must be one of igp, egp, or incomplete" - -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 db2d90d2..a3d03579 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 @@ -2,7 +2,7 @@ type: ipv4 help: Border Gateway Protocol (BGP) originator ID attribute val_help: Orignator IP address -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 94497a37..24ddb4bb 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 @@ -3,8 +3,7 @@ help: Tag value for routing protocol val_help: u32:1-65535; Tag value syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" - -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ 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 ee11e704..9a222b35 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 @@ -2,7 +2,7 @@ type: u32 help: Border Gateway Protocol (BGP) weight attribute val_help: BGP weight -commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +commit:expression: $VAR(../../action/) != ""; "you must specify an action" update: vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ |