summaryrefslogtreecommitdiff
path: root/templates/clear/policy/route
diff options
context:
space:
mode:
Diffstat (limited to 'templates/clear/policy/route')
-rwxr-xr-xtemplates/clear/policy/route/node.def1
-rw-r--r--templates/clear/policy/route/node.tag/counters/node.def2
-rwxr-xr-xtemplates/clear/policy/route/node.tag/node.def4
-rwxr-xr-xtemplates/clear/policy/route/node.tag/rule/node.def1
-rw-r--r--templates/clear/policy/route/node.tag/rule/node.tag/counters/node.def2
-rwxr-xr-xtemplates/clear/policy/route/node.tag/rule/node.tag/node.def5
6 files changed, 15 insertions, 0 deletions
diff --git a/templates/clear/policy/route/node.def b/templates/clear/policy/route/node.def
new file mode 100755
index 0000000..ef1851f
--- /dev/null
+++ b/templates/clear/policy/route/node.def
@@ -0,0 +1 @@
+help: Clear policy statistics for chain
diff --git a/templates/clear/policy/route/node.tag/counters/node.def b/templates/clear/policy/route/node.tag/counters/node.def
new file mode 100644
index 0000000..e47bcdc
--- /dev/null
+++ b/templates/clear/policy/route/node.tag/counters/node.def
@@ -0,0 +1,2 @@
+help: Clear firewall counters
+run: /opt/vyatta/bin/vyatta-clear-firewall "/sbin/iptables" "mangle" "$4"
diff --git a/templates/clear/policy/route/node.tag/node.def b/templates/clear/policy/route/node.tag/node.def
new file mode 100755
index 0000000..e54b196
--- /dev/null
+++ b/templates/clear/policy/route/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Clear policy rules for a given chain
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes policy route))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/policy/route/node.tag/rule/node.def b/templates/clear/policy/route/node.tag/rule/node.def
new file mode 100755
index 0000000..1ec9d53
--- /dev/null
+++ b/templates/clear/policy/route/node.tag/rule/node.def
@@ -0,0 +1 @@
+help: Clear policy statistics for a rule
diff --git a/templates/clear/policy/route/node.tag/rule/node.tag/counters/node.def b/templates/clear/policy/route/node.tag/rule/node.tag/counters/node.def
new file mode 100644
index 0000000..d3cbae8
--- /dev/null
+++ b/templates/clear/policy/route/node.tag/rule/node.tag/counters/node.def
@@ -0,0 +1,2 @@
+help: Clear counters for specified rule
+run: /opt/vyatta/bin/vyatta-clear-firewall "/sbin/iptables" "mangle" "$4" "$6"
diff --git a/templates/clear/policy/route/node.tag/rule/node.tag/node.def b/templates/clear/policy/route/node.tag/rule/node.tag/node.def
new file mode 100755
index 0000000..ff425cf
--- /dev/null
+++ b/templates/clear/policy/route/node.tag/rule/node.tag/node.def
@@ -0,0 +1,5 @@
+help: Clear policy statistics for given rule
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes \
+ policy route ${COMP_WORDS[COMP_CWORD-2]} rule))"
+ echo -n ${vals[@]}