summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-19 10:29:15 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-19 10:29:15 -0700
commitefe70f63cc68f487b7d3199d377f98a539fabae3 (patch)
treeb8d3f42246a59b3b53246ebf9c255c65db216bd1 /templates
parent3153e4a117f0a5b2b4273c91ea6a946f55a1e0cb (diff)
downloadvyatta-cfg-system-efe70f63cc68f487b7d3199d377f98a539fabae3.tar.gz
vyatta-cfg-system-efe70f63cc68f487b7d3199d377f98a539fabae3.zip
Bridge parameter node update
Do syntax range checking on bridge STP parameters. Note: kernel allows much bigger values (and IOS checking is more strict).
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/bridge/node.tag/aging/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/forwarding-delay/node.def4
-rw-r--r--templates/interfaces/bridge/node.tag/hello-time/node.def7
-rw-r--r--templates/interfaces/bridge/node.tag/max-age/node.def4
-rw-r--r--templates/interfaces/bridge/node.tag/stp/node.def8
5 files changed, 14 insertions, 14 deletions
diff --git a/templates/interfaces/bridge/node.tag/aging/node.def b/templates/interfaces/bridge/node.tag/aging/node.def
index 77c6a8b2..925734a3 100644
--- a/templates/interfaces/bridge/node.tag/aging/node.def
+++ b/templates/interfaces/bridge/node.tag/aging/node.def
@@ -1,7 +1,8 @@
type: u32
help: Interval addresses are retained
default: 300
+syntax:expression:$VAR(@) <= 60; "Bridge aging time must be between 0 and 60"
+val_help:<0-60>; Address aging time for bridge (seconds)
+
update: /usr/sbin/brctl setageing $VAR(../@) $VAR(@)
delete: /usr/sbin/brctl setageing $VAR(../@) 300
-comp_help: possible completions:
- <number> Set the number of seconds for ageing (default 300)
diff --git a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
index e122c340..b1e244f4 100644
--- a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
+++ b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
@@ -1,5 +1,5 @@
type: u32
help: Forwarding delay
+syntax:expression:$VAR(@) <= 60; "Forwarding delay must be between 0 and 60"
+val_help:<0-60>; Spanning Tree Protocol forwarding delay in seconds (default 15)
update: /usr/sbin/brctl setfd $VAR(../@) $VAR(@)
-comp_help: possible completions:
- <number> Set the folwarding delay (default 15)
diff --git a/templates/interfaces/bridge/node.tag/hello-time/node.def b/templates/interfaces/bridge/node.tag/hello-time/node.def
index 126e7020..6dfb3493 100644
--- a/templates/interfaces/bridge/node.tag/hello-time/node.def
+++ b/templates/interfaces/bridge/node.tag/hello-time/node.def
@@ -1,8 +1,7 @@
type: u32
-help: Hello packet advertisment interval
default: 2
+help: Hello packet advertisment interval
+syntax:expression:$VAR(@) <= 30; "Bridge Hello interval must be between 0 and 30 seconds"
+val_help:<0-30>:Spanning Tree Protocol hello advertisement interval (default 2)
update: /usr/sbin/brctl sethello $VAR(../@) $VAR(@)
delete: /usr/sbin/brctl sethello $VAR(../@) 2
-comp_help: possible completions:
- <number> Set the hello packet advertisment interval (default 2)
-
diff --git a/templates/interfaces/bridge/node.tag/max-age/node.def b/templates/interfaces/bridge/node.tag/max-age/node.def
index 7ce7fd9d..b05ac934 100644
--- a/templates/interfaces/bridge/node.tag/max-age/node.def
+++ b/templates/interfaces/bridge/node.tag/max-age/node.def
@@ -1,8 +1,8 @@
type: u32
help: Interval at which neighbor bridges are removed
default: 20
+syntax:expression:$VAR(@) <= 60; "Bridge max aging value must be between 0 and 60"
+val_help:<0-60>:Bridge maximum aging time value (default 20)
update: /usr/sbin/brctl setmaxage $VAR(../@) $VAR(@)
delete: /usr/sbin/brctl setmaxage $VAR(../@) 20
-comp_help: possible completions:
- <number> Set the max age (default 20)
diff --git a/templates/interfaces/bridge/node.tag/stp/node.def b/templates/interfaces/bridge/node.tag/stp/node.def
index f3095b26..5a660574 100644
--- a/templates/interfaces/bridge/node.tag/stp/node.def
+++ b/templates/interfaces/bridge/node.tag/stp/node.def
@@ -1,6 +1,9 @@
type: bool
-help: Enable spanning tree protocol
default: false
+help: Enable spanning tree protocol
+val_help:true:Enable Spanning Tree Protocol
+val_help:false:Disable Spanning Tree Protocol (default false)
+
update: if [ "$VAR(@)" == "true" ]; then
if [ -z "$VAR(../../forwarding-delay)" ]; then
/usr/sbin/brctl setfd $VAR(../@) 15
@@ -13,6 +16,3 @@ update: if [ "$VAR(@)" == "true" ]; then
/usr/sbin/brctl setfd $VAR(../@) 0
fi
delete:/usr/sbin/brctl stp $VAR(../@) off
-comp_help: possible completions:
- true Enable Spanning Tree Protocol
- false Disable Spanning Tree Protocol (default false)