diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-21 12:07:29 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-21 12:07:29 -0700 |
commit | baa0d50c299c06ad5027f730d7a63e8eec6bef43 (patch) | |
tree | 4cd709395e5e23d69990f93ac27b5095e0d509a5 /templates/policy/prefix-list | |
parent | 69c3c53afee2f975b5c631d19dfd150caaf4b861 (diff) | |
download | vyatta-cfg-quagga-baa0d50c299c06ad5027f730d7a63e8eec6bef43.tar.gz vyatta-cfg-quagga-baa0d50c299c06ad5027f730d7a63e8eec6bef43.zip |
Convert Quagga templates to use val_help:
Diffstat (limited to 'templates/policy/prefix-list')
6 files changed, 15 insertions, 7 deletions
diff --git a/templates/policy/prefix-list/node.def b/templates/policy/prefix-list/node.def index 64bee643..cb741618 100644 --- a/templates/policy/prefix-list/node.def +++ b/templates/policy/prefix-list/node.def @@ -1,5 +1,6 @@ tag: type: txt help: Set IP prefix-list filter -comp_help: \1 <txt>\tprefix-list list name +val_help: Prefix list name + syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "prefix-list name must be alpha-numeric" diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def index 5b97a5f0..e0d8e866 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.def @@ -1,10 +1,13 @@ tag: type: u32 help: Set a rule for this prefix-list -comp_help: \1 <1-65535>\tprefix-list rule number +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" + delete: touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID ; len=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; if [ -n "$VAR(./ge/@)" ]; then @@ -15,6 +18,7 @@ delete: touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID ; fi; vtysh -c "configure terminal" \ -c "no ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " + end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; if [ -n "$VAR(./ge/@)" ]; then if [ $len -ge $VAR(./ge/@) ]; then diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def index 00612d90..1d5d05dc 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def @@ -1,5 +1,6 @@ type: txt help: Set action to take on prefixes matching this rule [REQUIRED] -comp_help: \1 permit\tpermit matching prefixes - deny\t\tdeny matching prefixes +val_help: permit; Permit matching prefixes +val_help: deny; Deny matching prefixes + syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny" diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def index 8e102057..a89204f8 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def @@ -1,4 +1,5 @@ type: u32 help: Set prefix length to match a netmask greater than or equal to it -comp_help: \1 <0-32>\tnetmask greater than length +val_help: u32:0-32; Netmask greater than length + syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 32; "ge must be between 0 and 32" diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def index 56296cf4..5a91bc53 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def @@ -1,4 +1,5 @@ type: u32 help: Set prefix length to match a netmask less than or equal to it -comp_help: \1 <0-32>\tnetmask less than length +val_help: u32:0-32; Netmask less than length + syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 32; "le must be between 0 and 32" diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def index 1581769a..f7e7ef39 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def @@ -1,3 +1,3 @@ type: ipv4net help: Set a prefix to match -comp_help: \1 <x.x.x.x/x>\tprefix to match against +val_help: Prefix to match against |