From 200fb453f43a3f0406c14b9003ca5a1e6f7587f4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 5 Sep 2008 15:03:30 -0700 Subject: Workaround CLI regex problem Recent CLI changes seem to have broken working templates that do regex matching. Workaround this by doing the syntax checking all in the perl script Bugfix: 3553 --- .../traffic-shaper/node.tag/class/node.tag/bandwidth/node.def | 3 +-- .../qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def | 3 +-- .../qos-policy/traffic-shaper/node.tag/default/bandwidth/node.def | 3 +-- templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'templates/qos-policy') diff --git a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/bandwidth/node.def b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/bandwidth/node.def index 2871b23..6f15037 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/bandwidth/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/bandwidth/node.def @@ -1,8 +1,7 @@ type: txt default: "100%" help: Set the bandwidth used for this class -syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ - /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent-or-rate \"$VAR(@)\"" comp_help: Allowed values: Bandwidth in Kbps %% Percentage of overall rate (default 100%%) diff --git a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def index 82c5ff0..11bf6b9 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def @@ -1,7 +1,6 @@ type: txt help: Set the bandwidth limit for this class -syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ - /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent-or-rate \"$VAR(@)\"" comp_help: Allowed values: Limit in Kbps %% Percentage of overall rate diff --git a/templates/qos-policy/traffic-shaper/node.tag/default/bandwidth/node.def b/templates/qos-policy/traffic-shaper/node.tag/default/bandwidth/node.def index 21b6e88..4d454d4 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/default/bandwidth/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/default/bandwidth/node.def @@ -1,7 +1,6 @@ type: txt help: Set the bandwidth used for default traffic -syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ - /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent-or-rate \"$VAR(@)\"" comp_help: Allowed values: Bandwidth in Kbps per second %% Percentage of overall rate diff --git a/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def b/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def index 9b3c855..463c6bb 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def @@ -1,8 +1,7 @@ type: txt help: Set the bandwidth limit for default traffic default: "100%" -syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ - /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent-or-rate \"$VAR(@)\"" comp_help: Allowed values: Limit in Kbps %% Percentage of overall rate (default 100%%) -- cgit v1.2.3