From a9d4ab9d4806e0b8a0d151442bcffd4f63f65dda Mon Sep 17 00:00:00 2001 From: Robert Bays Date: Wed, 5 Sep 2012 10:57:02 -0700 Subject: add show command support for policy rules --- templates/clear/policy/ipv6-route/node.def | 1 + templates/clear/policy/ipv6-route/node.tag/counters/node.def | 2 ++ templates/clear/policy/ipv6-route/node.tag/node.def | 4 ++++ templates/clear/policy/ipv6-route/node.tag/rule/node.def | 1 + .../clear/policy/ipv6-route/node.tag/rule/node.tag/counters/node.def | 2 ++ templates/clear/policy/ipv6-route/node.tag/rule/node.tag/node.def | 5 +++++ 6 files changed, 15 insertions(+) create mode 100755 templates/clear/policy/ipv6-route/node.def create mode 100755 templates/clear/policy/ipv6-route/node.tag/counters/node.def create mode 100755 templates/clear/policy/ipv6-route/node.tag/node.def create mode 100755 templates/clear/policy/ipv6-route/node.tag/rule/node.def create mode 100644 templates/clear/policy/ipv6-route/node.tag/rule/node.tag/counters/node.def create mode 100755 templates/clear/policy/ipv6-route/node.tag/rule/node.tag/node.def (limited to 'templates/clear/policy/ipv6-route') 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[@]} -- cgit v1.2.3