summaryrefslogtreecommitdiff
path: root/templates/traffic-policy/network-emulator
diff options
context:
space:
mode:
Diffstat (limited to 'templates/traffic-policy/network-emulator')
-rw-r--r--templates/traffic-policy/network-emulator/node.def8
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/bandwidth/node.def9
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/burst/node.def7
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/description/node.def2
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/network-delay/node.def6
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/packet-corruption/node.def6
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/packet-loss/node.def6
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/packet-reordering/node.def8
-rw-r--r--templates/traffic-policy/network-emulator/node.tag/queue-limit/node.def2
9 files changed, 54 insertions, 0 deletions
diff --git a/templates/traffic-policy/network-emulator/node.def b/templates/traffic-policy/network-emulator/node.def
new file mode 100644
index 0000000..9a89c53
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.def
@@ -0,0 +1,8 @@
+tag:
+type: txt
+help: Setup network emulator policy
+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(@)
+end: /opt/vyatta/sbin/vyatta-qos.pl --apply-policy $VAR(@)
diff --git a/templates/traffic-policy/network-emulator/node.tag/bandwidth/node.def b/templates/traffic-policy/network-emulator/node.tag/bandwidth/node.def
new file mode 100644
index 0000000..db8ca65
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/bandwidth/node.def
@@ -0,0 +1,9 @@
+type: txt
+help: Set the bandwidth limit
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --rate $VAR(@)"
+comp_help: Allowed values:
+ <number> Bandwidth in Kbps per second
+ <number><suffix> Value with scaling suffix
+ bits per sec (kbit, mbit, gbit)
+ bytes per sec (kbps, mbps, gbps)
+
diff --git a/templates/traffic-policy/network-emulator/node.tag/burst/node.def b/templates/traffic-policy/network-emulator/node.tag/burst/node.def
new file mode 100644
index 0000000..4df45de
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/burst/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: Set the burst size
+default: "15k"
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --burst $VAR(@)"
+comp_help: Allowed values:
+ <number> Burst size in bytes
+ <number><suffix> Size with scaling suffix (kb, mb, gb)
diff --git a/templates/traffic-policy/network-emulator/node.tag/description/node.def b/templates/traffic-policy/network-emulator/node.tag/description/node.def
new file mode 100644
index 0000000..1e8e64f
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Set description for this queuing policy
diff --git a/templates/traffic-policy/network-emulator/node.tag/network-delay/node.def b/templates/traffic-policy/network-emulator/node.tag/network-delay/node.def
new file mode 100644
index 0000000..40b8437
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/network-delay/node.def
@@ -0,0 +1,6 @@
+type: txt
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --time $VAR(@)"
+help: Setup network delay
+comp_help: Additional network delay in milliseconds
+ <number> Latency in milliseconds
+ <number><suffix> Time with suffx (secs, ms, us)
diff --git a/templates/traffic-policy/network-emulator/node.tag/packet-corruption/node.def b/templates/traffic-policy/network-emulator/node.tag/packet-corruption/node.def
new file mode 100644
index 0000000..fb0e975
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/packet-corruption/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: Set emulated packet data corruption rate
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent $VAR(@)"
+comp_help: Allowed values:
+ <number>%% Percentage of packets affected
+
diff --git a/templates/traffic-policy/network-emulator/node.tag/packet-loss/node.def b/templates/traffic-policy/network-emulator/node.tag/packet-loss/node.def
new file mode 100644
index 0000000..6501d7a
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/packet-loss/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: Set emulated packet loss rate
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent $VAR(@)"
+comp_help: Allowed values:
+ <number>%% Percentage of packets affected
+
diff --git a/templates/traffic-policy/network-emulator/node.tag/packet-reordering/node.def b/templates/traffic-policy/network-emulator/node.tag/packet-reordering/node.def
new file mode 100644
index 0000000..ee5c64a
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/packet-reordering/node.def
@@ -0,0 +1,8 @@
+type: txt
+help: Set emulated packet reordering percentage
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --percent $VAR(@)"
+commit:expression: $VAR(../network-delay) != "" ; \
+ "Must specify network-delay for packet reordering"
+comp_help: Allowed values:
+ <number>%% Percentage of packets affected
+
diff --git a/templates/traffic-policy/network-emulator/node.tag/queue-limit/node.def b/templates/traffic-policy/network-emulator/node.tag/queue-limit/node.def
new file mode 100644
index 0000000..49c47b4
--- /dev/null
+++ b/templates/traffic-policy/network-emulator/node.tag/queue-limit/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: Set maximum queue size (packets)