summaryrefslogtreecommitdiff
path: root/templates/clear/firewall
diff options
context:
space:
mode:
Diffstat (limited to 'templates/clear/firewall')
-rw-r--r--templates/clear/firewall/ipv6-modify/node.tag/node.def4
-rw-r--r--templates/clear/firewall/ipv6-modify/node.tag/rule/node.tag/node.def5
-rw-r--r--templates/clear/firewall/ipv6-name/node.tag/node.def4
-rw-r--r--templates/clear/firewall/ipv6-name/node.tag/rule/node.tag/node.def5
-rw-r--r--templates/clear/firewall/modify/node.tag/node.def4
-rw-r--r--templates/clear/firewall/modify/node.tag/rule/node.tag/node.def5
-rw-r--r--templates/clear/firewall/name/node.tag/node.def4
-rw-r--r--templates/clear/firewall/name/node.tag/rule/node.tag/node.def5
8 files changed, 28 insertions, 8 deletions
diff --git a/templates/clear/firewall/ipv6-modify/node.tag/node.def b/templates/clear/firewall/ipv6-modify/node.tag/node.def
index 521953c..693c0ae 100644
--- a/templates/clear/firewall/ipv6-modify/node.tag/node.def
+++ b/templates/clear/firewall/ipv6-modify/node.tag/node.def
@@ -1,2 +1,4 @@
help: Clear firewall rules for a given chain
-allowed: ls /opt/vyatta/config/active/firewall/ipv6-modify/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes firewall ipv6-modify))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/ipv6-modify/node.tag/rule/node.tag/node.def b/templates/clear/firewall/ipv6-modify/node.tag/rule/node.tag/node.def
index dc954f5..f777438 100644
--- a/templates/clear/firewall/ipv6-modify/node.tag/rule/node.tag/node.def
+++ b/templates/clear/firewall/ipv6-modify/node.tag/rule/node.tag/node.def
@@ -1,2 +1,5 @@
help: Clear firewall statistics for given rule
-allowed: ls /opt/vyatta/config/active/firewall/ipv6-modify/${COMP_WORDS[COMP_CWORD-2]}/rule/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes \
+ firewall ipv6-modify ${COMP_WORDS[COMP_CWORD-2]} rule))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/ipv6-name/node.tag/node.def b/templates/clear/firewall/ipv6-name/node.tag/node.def
index b35fe00..1019010 100644
--- a/templates/clear/firewall/ipv6-name/node.tag/node.def
+++ b/templates/clear/firewall/ipv6-name/node.tag/node.def
@@ -1,2 +1,4 @@
help: Clear firewall rules for a given chain
-allowed: ls /opt/vyatta/config/active/firewall/ipv6-name/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes firewall ipv6-name))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/ipv6-name/node.tag/rule/node.tag/node.def b/templates/clear/firewall/ipv6-name/node.tag/rule/node.tag/node.def
index f740f57..2798002 100644
--- a/templates/clear/firewall/ipv6-name/node.tag/rule/node.tag/node.def
+++ b/templates/clear/firewall/ipv6-name/node.tag/rule/node.tag/node.def
@@ -1,2 +1,5 @@
help: Clear firewall statistics for given rule
-allowed: ls /opt/vyatta/config/active/firewall/ipv6-name/${COMP_WORDS[COMP_CWORD-2]}/rule/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes \
+ firewall ipv6-name ${COMP_WORDS[COMP_CWORD-2]} rule))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/modify/node.tag/node.def b/templates/clear/firewall/modify/node.tag/node.def
index 458fcb7..748872d 100644
--- a/templates/clear/firewall/modify/node.tag/node.def
+++ b/templates/clear/firewall/modify/node.tag/node.def
@@ -1,2 +1,4 @@
help: Clear firewall rules for a given chain
-allowed: ls /opt/vyatta/config/active/firewall/modify/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes firewall modify))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/modify/node.tag/rule/node.tag/node.def b/templates/clear/firewall/modify/node.tag/rule/node.tag/node.def
index 80a0676..6682b94 100644
--- a/templates/clear/firewall/modify/node.tag/rule/node.tag/node.def
+++ b/templates/clear/firewall/modify/node.tag/rule/node.tag/node.def
@@ -1,2 +1,5 @@
help: Clear firewall statistics for given rule
-allowed: ls /opt/vyatta/config/active/firewall/modify/${COMP_WORDS[COMP_CWORD-2]}/rule/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes \
+ firewall modify ${COMP_WORDS[COMP_CWORD-2]} rule))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/name/node.tag/node.def b/templates/clear/firewall/name/node.tag/node.def
index 1411a83..e02731a 100644
--- a/templates/clear/firewall/name/node.tag/node.def
+++ b/templates/clear/firewall/name/node.tag/node.def
@@ -1,2 +1,4 @@
help: Clear firewall rules for a given chain
-allowed: ls /opt/vyatta/config/active/firewall/name/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes firewall name))"
+ echo -n ${vals[@]}
diff --git a/templates/clear/firewall/name/node.tag/rule/node.tag/node.def b/templates/clear/firewall/name/node.tag/rule/node.tag/node.def
index 1830c94..0ac97ec 100644
--- a/templates/clear/firewall/name/node.tag/rule/node.tag/node.def
+++ b/templates/clear/firewall/name/node.tag/rule/node.tag/node.def
@@ -1,2 +1,5 @@
help: Clear firewall statistics for given rule
-allowed: ls /opt/vyatta/config/active/firewall/name/${COMP_WORDS[COMP_CWORD-2]}/rule/ 2>/dev/null
+allowed: local -a vals
+ eval "vals=($(cli-shell-api listActiveNodes \
+ firewall name ${COMP_WORDS[COMP_CWORD-2]} rule))"
+ echo -n ${vals[@]}