summaryrefslogtreecommitdiff
path: root/templates/policy/prefix-list
diff options
context:
space:
mode:
authorRobert Bays <rbays@moresby.vyatta.com>2008-03-17 23:04:11 -0700
committerRobert Bays <rbays@moresby.vyatta.com>2008-03-17 23:04:11 -0700
commit775e849022773e681f6e975e04949d3930cde94d (patch)
tree259c82007910dfe5da899a3d8dc9094a1122dbdf /templates/policy/prefix-list
parent298958d7617b8fea64e1fe658458e631c4f49f48 (diff)
downloadvyatta-cfg-quagga-775e849022773e681f6e975e04949d3930cde94d.tar.gz
vyatta-cfg-quagga-775e849022773e681f6e975e04949d3930cde94d.zip
iupdate help strings for policy nodes
Diffstat (limited to 'templates/policy/prefix-list')
-rw-r--r--templates/policy/prefix-list/node.def3
-rw-r--r--templates/policy/prefix-list/node.tag/description/node.def2
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.def67
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def4
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def2
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def3
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def3
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def3
8 files changed, 47 insertions, 40 deletions
diff --git a/templates/policy/prefix-list/node.def b/templates/policy/prefix-list/node.def
index b1fcc1f9..eec6608e 100644
--- a/templates/policy/prefix-list/node.def
+++ b/templates/policy/prefix-list/node.def
@@ -1,4 +1,5 @@
tag:
type: txt
-help: Add a prefix list entry
+help: IP prefix-list filter
+comp_help: \1 <txt> prefix-list 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/description/node.def b/templates/policy/prefix-list/node.tag/description/node.def
index 8e10bcb9..8a4ae9fa 100644
--- a/templates/policy/prefix-list/node.tag/description/node.def
+++ b/templates/policy/prefix-list/node.tag/description/node.def
@@ -1,2 +1,2 @@
type: txt
-help: Prefix list description
+help: set a description for this prefix-list
diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def
index 841e824c..4813f596 100644
--- a/templates/policy/prefix-list/node.tag/rule/node.def
+++ b/templates/policy/prefix-list/node.tag/rule/node.def
@@ -1,37 +1,38 @@
tag:
type: u32
-help: Specify prefix-list rule number
-commit:expression: $VAR(./prefix/) != ""; "must set a prefix"
-commit:expression: $VAR(./action/) != ""; "must specify an action before committing"
-delete:expression: "touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID \
- LEN=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; \
- if [ -n \"$VAR(./ge/@)\" ]; then \
- COND=\"ge $VAR(./ge/@) \";
+help: create a rule for this prefix-list
+comp_help: \1 <1-65535>\tprefix-list rule number
+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
+ cond="ge $VAR(./ge/@) ";
fi;
- if [ -n \"$VAR(./le/@)\" ]; then \
- COND=\"$COND le $VAR(./le/@) \"; \
- fi; \
- ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \
- -c \"no ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $COND \" "
-end:expression: "LEN=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; \
- if [ -n \"$VAR(./ge/@)\" ]; then \
- if [ $LEN -ge $VAR(./ge/@) ]; then \
- echo ge must be greater than prefix length ;\
- exit 1 ; \
- fi ; \
- COND=\"ge $VAR(./ge/@) \";
+ if [ -n "$VAR(./le/@)" ]; then
+ cond="$cond le $VAR(./le/@) ";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -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
+ echo "policy prefix-list $VAR(../@) rule $VAR(@): 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 le must be greater than or equal to ge ; \
- exit 1 ; \
- fi ; \
- COND=\"$COND le $VAR(./le/@) \"; \
- fi; \
- if [ -f \"/tmp/protocols-$VAR(../@)-$VAR(@).$PPID\" ]; then \
- rm -f \"protocols-$VAR(../@)-$VAR(@).$PPID\" ; \
- else \
- ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \
- -c \"ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $COND \" ; \
- fi ; \
- exit 0 ; "
+ 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";
+ exit 1 ;
+ fi ;
+ cond="$cond le $VAR(./le/@) ";
+ fi;
+ if [ -f "/tmp/protocols-$VAR(../@)-$VAR(@).$PPID" ]; then
+ rm -f "protocols-$VAR(../@)-$VAR(@).$PPID" ;
+ else
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " ;
+ fi ;
+ exit 0 ;
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 4cdf4170..2b641e7c 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,3 +1,5 @@
type: txt
-help: Action to take on prefixes matching this rule
+help: action to take on prefixes matching this rule
+comp_help: \1 permit\tpermit matching prefixes
+ deny\t\tdeny 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/description/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def
index b8e3095b..562ab020 100644
--- a/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def
+++ b/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def
@@ -1,2 +1,2 @@
type: txt
-help: Description for this rule
+help: set a description for this rule
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 ae818e87..4187034b 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,3 +1,4 @@
type: u32
-help: Prefix greater than or equal to
+help: match a netmask greater than or equal to prefix length
+comp_help: \1 <0-32>\tnetmask 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 e108cd60..4ebe9128 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,3 +1,4 @@
type: u32
-help: Prefix less than or equal to
+help: match a netmask less than or equal to prefix length
+comp_help: \1 <0-32>\tnetmask 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 5494d284..7145e0fd 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,2 +1,3 @@
type: ipv4net
-help: Prefix to match against this rule
+help: match on a prefix
+comp_help: \1 <x.x.x.x/x>\tprefix to match against