summaryrefslogtreecommitdiff
path: root/templates/qos-policy
diff options
context:
space:
mode:
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(@)"