summaryrefslogtreecommitdiff
path: root/templates/qos-policy/traffic-shaper
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-06 12:38:19 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-06 12:38:19 -0800
commited247481c162eb619764c8d206e2272909963a3d (patch)
tree7859e7dcf99dbb18541cb9d917573b35ad9eb258 /templates/qos-policy/traffic-shaper
parent8fb29dcbda4dc037d855671fa59aff7f3738d01c (diff)
downloadvyatta-cfg-qos-ed247481c162eb619764c8d206e2272909963a3d.tar.gz
vyatta-cfg-qos-ed247481c162eb619764c8d206e2272909963a3d.zip
better syntax/semantic checking of qos-policy
Add a bunch of checks. * Check policy configuration at commit time * Add check for duplicate names * Allow _ in policy name Bugfix: 2907
Diffstat (limited to 'templates/qos-policy/traffic-shaper')
-rw-r--r--templates/qos-policy/traffic-shaper/node.def9
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/qos-policy/traffic-shaper/node.def b/templates/qos-policy/traffic-shaper/node.def
index c9be692..e1cab0b 100644
--- a/templates/qos-policy/traffic-shaper/node.def
+++ b/templates/qos-policy/traffic-shaper/node.def
@@ -1,7 +1,8 @@
tag:
type: txt
help: Configure traffic shaping based policy
-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(../@) $VAR(@)"
+syntax:expression: pattern $VAR(@) "^[[:alnum:]][-_[:alnum:]]*$"
+ ; "only alpha-numeric policy name allowed"
+create: /opt/vyatta/sbin/vyatta-qos.pl --create-policy "$VAR(.)" "$VAR(@)"
+delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-policy "$VAR(@)"
+update: /opt/vyatta/sbin/vyatta-qos.pl --update-policy "$VAR(.)" "$VAR(@)"