summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-02-01 18:37:07 -0800
committerStig Thormodsrud <stig@vyatta.com>2008-02-01 18:37:07 -0800
commit7c31900bc1956b14ba77283c8db27a4aca35b238 (patch)
tree08c5684c0a8d5a8646e76ab017834545a71ff838
parent622bbf801bd435a3848c669ff2c0e9090cd2bb4e (diff)
downloadvyatta-cfg-quagga-7c31900bc1956b14ba77283c8db27a4aca35b238.tar.gz
vyatta-cfg-quagga-7c31900bc1956b14ba77283c8db27a4aca35b238.zip
- Fix 2745: bridge-group cost - syntax error
- Fix 2746: bridge-group priority - syntax error - Add comp_help strings - Change bridge-group to a transaction node
-rw-r--r--templates/interfaces/bridge/node.tag/aging/node.def4
-rw-r--r--templates/interfaces/bridge/node.tag/disable/node.def3
-rw-r--r--templates/interfaces/bridge/node.tag/forwarding-delay/node.def4
-rw-r--r--templates/interfaces/bridge/node.tag/hello-time/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/max-age/node.def5
-rw-r--r--templates/interfaces/bridge/node.tag/priority/node.def4
-rw-r--r--templates/interfaces/bridge/node.tag/stp/node.def3
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def7
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/node.def13
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def4
11 files changed, 43 insertions, 13 deletions
diff --git a/templates/interfaces/bridge/node.tag/aging/node.def b/templates/interfaces/bridge/node.tag/aging/node.def
index 3431f28e..533a8ed5 100644
--- a/templates/interfaces/bridge/node.tag/aging/node.def
+++ b/templates/interfaces/bridge/node.tag/aging/node.def
@@ -2,4 +2,6 @@ type: u32
help: Set the number of seconds a MAC address will be kept in the forwarding database
default: 300
update:expression: "sudo brctl setageing $VAR(../@) $VAR(@)"
-delete:expression: "sudo brctl setageing $VAR(../@) $VAR(@)"
+delete:expression: "sudo 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/disable/node.def b/templates/interfaces/bridge/node.tag/disable/node.def
index d9d4883e..3aa26012 100644
--- a/templates/interfaces/bridge/node.tag/disable/node.def
+++ b/templates/interfaces/bridge/node.tag/disable/node.def
@@ -6,3 +6,6 @@ update:expression: "if [ x$VAR(@) == xtrue ]; then \
else \
sudo ip link set $VAR(../@) up; \
fi; "
+comp_help: possible completions:
+ true Disable the bridge interface
+ false Enable the bridge interface (default)
diff --git a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
index 3bf3cdda..528fdb02 100644
--- a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
+++ b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def
@@ -2,4 +2,6 @@ type: u32
help: Set the forwarding delay
default: 15
update:expression: "sudo brctl setfd $VAR(../@) $VAR(@)"
-delete:expression: "sudo brctl setfd $VAR(../@) $VAR(@)"
+delete:expression: "sudo brctl setfd $VAR(../@) 15"
+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 8128a16d..19324a65 100644
--- a/templates/interfaces/bridge/node.tag/hello-time/node.def
+++ b/templates/interfaces/bridge/node.tag/hello-time/node.def
@@ -2,4 +2,7 @@ type: u32
help: Set the hello packet advertisment interval
default: 2
update:expression: "sudo brctl sethello $VAR(../@) $VAR(@)"
-delete:expression: "sudo brctl sethello $VAR(../@) $VAR(@)"
+delete:expression: "sudo 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 1c245ed5..ddfdf129 100644
--- a/templates/interfaces/bridge/node.tag/max-age/node.def
+++ b/templates/interfaces/bridge/node.tag/max-age/node.def
@@ -2,4 +2,7 @@ type: u32
help: Set the interval at which neighbor bridges are removed
default: 20
update:expression: "sudo brctl setmaxage $VAR(../@) $VAR(@)"
-delete:expression: "sudo brctl setmaxage $VAR(../@) $VAR(@)"
+delete:expression: "sudo brctl setmaxage $VAR(../@) 20"
+comp_help: possible completions:
+ <number> Set the max age (default 20)
+
diff --git a/templates/interfaces/bridge/node.tag/priority/node.def b/templates/interfaces/bridge/node.tag/priority/node.def
index f2876989..ed8f4ef7 100644
--- a/templates/interfaces/bridge/node.tag/priority/node.def
+++ b/templates/interfaces/bridge/node.tag/priority/node.def
@@ -2,4 +2,6 @@ type: u32
help: Set the priority for this bridge
default: 0
update:expression: "sudo brctl setbridgeprio $VAR(../@) $VAR(@)"
-delete:expression: "sudo brctl setbridgeprio $VAR(../@) $VAR(@)"
+default:expression: "sudo brctl setbridgeprio $VAR(../@) 0"
+comp_help: possible completions:
+ <number> Set bridge priority (default 0)
diff --git a/templates/interfaces/bridge/node.tag/stp/node.def b/templates/interfaces/bridge/node.tag/stp/node.def
index 88f6c32b..bcad194a 100644
--- a/templates/interfaces/bridge/node.tag/stp/node.def
+++ b/templates/interfaces/bridge/node.tag/stp/node.def
@@ -7,3 +7,6 @@ update:expression: "if [ x$VAR(@) == xtrue ]; then \
sudo brctl stp $VAR(../@) off; \
fi; "
delete:expression: "sudo brctl stp $VAR(../@) off"
+comp_help: possible completions:
+ true Enable Spanning Tree Protocol
+ false Disable Spanning Tree Protocol (default false)
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
index 9a071930..c6d2934a 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
@@ -1,11 +1,10 @@
type: txt
help: Add this interface to a bridge-group
-syntax:expression: exec " \
- if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \
+syntax:expression: exec " \
+ if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \
echo bridge interface $VAR(@) doesn\\'t exist on this system ; \
- exit 1 ; \
+ exit 1 ; \
fi ; "
-update:expression: "sudo brctl addif $VAR(@) $VAR(../../@)"
delete:expression: "sudo brctl delif $VAR(@) $VAR(../../@)"
allowed: local -a array ;
array=( /sys/class/net/br* ) ;
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def
index f3ae520f..ef2d9940 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def
@@ -1,4 +1,4 @@
type: u32
help: Set the path cost for this port
-commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface"
-update:expression: "sudo brctl setpathcost $VAR(../../@) $VAR(@)"
+comp_help: possible completions:
+ <0-2147483647> Set port cost
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
index fd392431..3cc92cd0 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
@@ -1,2 +1,15 @@
help: Add this interface to a bridge group
commit:expression: $VAR(./bridge/) != ""; "Must set the bridge interface"
+create:expression: "sudo brctl addif $VAR(./bridge/@) $VAR(../@)"
+delete:expression: "touch /tmp/eth-$VAR(../@)-bridge.$PPID"
+end:expression: "\
+ if [ -f \"/tmp/eth-$VAR(../@)-bridge.$PPID\" ]; then \
+ rm -f /tmp/eth-$VAR(../@)-bridge.$PPID; \
+ else \
+ if [ -n \"$VAR(./cost/@)\" ]; then \
+ sudo brctl setpathcost $VAR(./bridge/@) $VAR(../@) $VAR(./cost/@); \
+ fi; \
+ if [ -n \"$VAR(./priority/@)\" ]; then \
+ sudo brctl setportprio $VAR(./bridge/@) $VAR(../@) $VAR(./priority/@); \
+ fi; \
+ fi; "
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def
index 12200b72..8688c394 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def
@@ -1,4 +1,4 @@
type: u32
help: Set the path priority for this port
-commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface"
-update:expression: "sudo brctl setportprio $VAR(../../@) $VAR(@)"
+comp_help: possible completions:
+ <0-255> Set port priority