summaryrefslogtreecommitdiff
path: root/templates/qos-policy
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-03 13:31:02 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-03 13:31:02 -0800
commita3115836962b6607a3441f3eb7615ae324d83b1b (patch)
tree1de21af16eb42d516e3d9208b52669092c2838f8 /templates/qos-policy
parent86f4250ae356e0e9755b8514a0222dccccdf387a (diff)
downloadvyatta-cfg-qos-a3115836962b6607a3441f3eb7615ae324d83b1b.tar.gz
vyatta-cfg-qos-a3115836962b6607a3441f3eb7615ae324d83b1b.zip
change syntax checks for policy name
Only check syntax for policy names in syntax, check for name conflicts later. Part of bug fix for policy name management.
Diffstat (limited to 'templates/qos-policy')
-rw-r--r--templates/qos-policy/fair-queue/node.def7
-rw-r--r--templates/qos-policy/traffic-shaper/node.def3
2 files changed, 6 insertions, 4 deletions
diff --git a/templates/qos-policy/fair-queue/node.def b/templates/qos-policy/fair-queue/node.def
index ba88e32..b45f93e 100644
--- a/templates/qos-policy/fair-queue/node.def
+++ b/templates/qos-policy/fair-queue/node.def
@@ -1,6 +1,7 @@
tag:
type: txt
help: Configure fair queueing policy
-syntax:expression: exec " /opt/vyatta/sbin/vyatta-qos.pl --validate-name $VAR(../@) $VAR(@)"
-update:expression: "/opt/vyatta/sbin/vyatta-qos.pl --update-policy $VAR(../@) $VAR(@)"
-delete:expression: "/opt/vyatta/sbin/vyatta-qos.pl --delete-policy $VAR(@)"
+syntax:expression: pattern $VAR(@) "^[[:alnum:]][-[:alnum:]]*$"
+ ; "invalid qos-policy name $VAR(@)"
+update: /opt/vyatta/sbin/vyatta-qos.pl --update-policy $VAR(../@) $VAR(@)
+delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-policy $VAR(../@) $VAR(@)
diff --git a/templates/qos-policy/traffic-shaper/node.def b/templates/qos-policy/traffic-shaper/node.def
index f8a33f0..051c034 100644
--- a/templates/qos-policy/traffic-shaper/node.def
+++ b/templates/qos-policy/traffic-shaper/node.def
@@ -1,6 +1,7 @@
tag:
type: txt
help: Configure traffic shaping based policy
-syntax:expression: exec " /opt/vyatta/sbin/vyatta-qos.pl --validate-name $VAR(../@) $VAR(@)"
+syntax:expression: pattern $VAR(@) "^[[:alnum:]][-[:alnum:]]*$"
+ ; "invalid qos-policy name $VAR(@)"
update:expression: "/opt/vyatta/sbin/vyatta-qos.pl --update-policy $VAR(../@) $VAR(@)"
delete:expression: "/opt/vyatta/sbin/vyatta-qos.pl --delete-policy $VAR(@)"