summaryrefslogtreecommitdiff
path: root/templates/clear/policy/ipv6-route
diff options
context:
space:
mode:
authorRobert Bays <robert@vyatta.com>2012-09-05 10:57:02 -0700
committerRobert Bays <robert@vyatta.com>2012-09-05 10:57:02 -0700
commita9d4ab9d4806e0b8a0d151442bcffd4f63f65dda (patch)
tree33f6f85bd8575b5ffb4548a1b1e1a72772f344f8 /templates/clear/policy/ipv6-route
parente5ba41191e5be53ca366f3a880ed19269f23ea3f (diff)
downloadvyatta-op-firewall-a9d4ab9d4806e0b8a0d151442bcffd4f63f65dda.tar.gz
vyatta-op-firewall-a9d4ab9d4806e0b8a0d151442bcffd4f63f65dda.zip
add show command support for policy rules
Diffstat (limited to 'templates/clear/policy/ipv6-route')
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.def1
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.tag/counters/node.def2
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.tag/node.def4
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.tag/rule/node.def1
-rw-r--r--templates/clear/policy/ipv6-route/node.tag/rule/node.tag/counters/node.def2
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.tag/rule/node.tag/node.def5
6 files changed, 15 insertions, 0 deletions
diff --git a/templates/clear/policy/ipv6-route/node.def b/templates/clear/policy/ipv6-route/node.def
new file mode 100755
index 0000000..ef1851f
--- /dev/null
+++ b/templates/clear/policy/ipv6-route/node.def
@@ -0,0 +1 @@
+help: Clear policy statistics for chain
diff --git a/templates/clear/policy/ipv6-route/node.tag/counters/node.def b/templates/clear/policy/ipv6-route/node.tag/counters/node.def
new file mode 100755
index 0000000..8d4810e
--- /dev/null
+++ b/templates/clear/policy/ipv6-route/node.tag/counters/node.def
@@ -0,0 +1,2 @@
+help: Clear policy counters
+run: /opt/vyatta/bin/vyatta-clear-firewall "/sbin/ip6tables" "mangle" "$4"
diff --git a/templates/clear/policy/ipv6-route/node.tag/node.def b/templates/clear/policy/ipv6-route/node.tag/node.def
new file mode 100755
index 0000000..b01a78f
--- /dev/null
+++ b/templates/clear/policy/ipv6-route/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Clear firewall rules for a given chain
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes policy ipv6-route))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/policy/ipv6-route/node.tag/rule/node.def b/templates/clear/policy/ipv6-route/node.tag/rule/node.def
new file mode 100755
index 0000000..1ec9d53
--- /dev/null
+++ b/templates/clear/policy/ipv6-route/node.tag/rule/node.def
@@ -0,0 +1 @@
+help: Clear policy statistics for a rule
diff --git a/templates/clear/policy/ipv6-route/node.tag/rule/node.tag/counters/node.def b/templates/clear/policy/ipv6-route/node.tag/rule/node.tag/counters/node.def
new file mode 100644
index 0000000..ad6c104
--- /dev/null
+++ b/templates/clear/policy/ipv6-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/ip6tables" "mangle" "$4" "$6"
diff --git a/templates/clear/policy/ipv6-route/node.tag/rule/node.tag/node.def b/templates/clear/policy/ipv6-route/node.tag/rule/node.tag/node.def
new file mode 100755
index 0000000..b059b02
--- /dev/null
+++ b/templates/clear/policy/ipv6-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 ipv6-route ${COMP_WORDS[COMP_CWORD-2]} rule))"
+ echo -n ${vals[@]}