summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules-vyos <vyos@ourhouse.org.uk>2017-07-27 15:38:31 +0100
committerjules-vyos <vyos@ourhouse.org.uk>2017-07-27 15:38:31 +0100
commit24c7ff03646d73767df9a0b5e20c483fcf9708a6 (patch)
tree20425b83b0b9e2f07d3ad78b771166f4b21bf1db
parent4aba0c7e26b5336122e88ab2bba01c1c6066600e (diff)
downloadvyatta-op-vpn-24c7ff03646d73767df9a0b5e20c483fcf9708a6.tar.gz
vyatta-op-vpn-24c7ff03646d73767df9a0b5e20c483fcf9708a6.zip
Add templates for extended commands
-rw-r--r--templates/show/vpn/ipsec/peer/node.def1
-rw-r--r--templates/show/vpn/ipsec/peer/node.tag/detail/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/peer/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/node.def.in6
-rw-r--r--templates/show/vpn/ipsec/stats/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/stats/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/stats/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/stats/node.tag/tunnel/node.tag/node.def.in10
-rw-r--r--templates/show/vpn/ipsec/verbose/node.def7
9 files changed, 37 insertions, 0 deletions
diff --git a/templates/show/vpn/ipsec/peer/node.def b/templates/show/vpn/ipsec/peer/node.def
new file mode 100644
index 0000000..f77f46e
--- /dev/null
+++ b/templates/show/vpn/ipsec/peer/node.def
@@ -0,0 +1 @@
+help: Show all currently active IPSec Security Associations (SA) for a peer
diff --git a/templates/show/vpn/ipsec/peer/node.tag/detail/node.def.in b/templates/show/vpn/ipsec/peer/node.tag/detail/node.def.in
new file mode 100644
index 0000000..e05a3c4
--- /dev/null
+++ b/templates/show/vpn/ipsec/peer/node.tag/detail/node.def.in
@@ -0,0 +1,3 @@
+help: Show detail on all currently active IPSec Security Associations (SA) for a peer
+allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-peers-for-cli
+run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-peer-detail="$6"
diff --git a/templates/show/vpn/ipsec/peer/node.tag/node.def.in b/templates/show/vpn/ipsec/peer/node.tag/node.def.in
new file mode 100644
index 0000000..4b23f44
--- /dev/null
+++ b/templates/show/vpn/ipsec/peer/node.tag/node.def.in
@@ -0,0 +1,3 @@
+help: Show all currently active IPSec Security Associations (SA) for a peer
+allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-peers-for-cli
+run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-peer="$6"
diff --git a/templates/show/vpn/ipsec/sa/detail/node.def.in b/templates/show/vpn/ipsec/sa/detail/node.def.in
new file mode 100644
index 0000000..3362e9b
--- /dev/null
+++ b/templates/show/vpn/ipsec/sa/detail/node.def.in
@@ -0,0 +1,6 @@
+help: Show Detail on all active IPsec Security Associations (SA)
+run: if pgrep charon >&/dev/null; then
+ @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa
+ else
+ echo -e "IPSec Process NOT Running\n"
+ fi
diff --git a/templates/show/vpn/ipsec/stats/node.def.in b/templates/show/vpn/ipsec/stats/node.def.in
new file mode 100644
index 0000000..d1d6ad0
--- /dev/null
+++ b/templates/show/vpn/ipsec/stats/node.def.in
@@ -0,0 +1,3 @@
+help: Show statistics for alll currently active IPSec Security Associations (SA)
+run: @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-stats
+
diff --git a/templates/show/vpn/ipsec/stats/node.tag/node.def.in b/templates/show/vpn/ipsec/stats/node.tag/node.def.in
new file mode 100644
index 0000000..9426469
--- /dev/null
+++ b/templates/show/vpn/ipsec/stats/node.tag/node.def.in
@@ -0,0 +1,3 @@
+help: Show Statistics for SAs associated with a specific peer
+allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-peers-for-cli
+#run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-peer="$6"
diff --git a/templates/show/vpn/ipsec/stats/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/stats/node.tag/tunnel/node.def
new file mode 100644
index 0000000..0429324
--- /dev/null
+++ b/templates/show/vpn/ipsec/stats/node.tag/tunnel/node.def
@@ -0,0 +1 @@
+help: Get Stats for a specific tunnel
diff --git a/templates/show/vpn/ipsec/stats/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/stats/node.tag/tunnel/node.tag/node.def.in
new file mode 100644
index 0000000..92a8572
--- /dev/null
+++ b/templates/show/vpn/ipsec/stats/node.tag/tunnel/node.tag/node.def.in
@@ -0,0 +1,10 @@
+help: Reset a specific tunnel for given peer
+
+allowed: @SUDOUSRDIR@/vyatta-vpn-op.pl \
+ --op=get-tunnels-for-peer \
+ --peer="${COMP_WORDS[COMP_CWORD-2]}"
+
+run: @SUDOUSRDIR@/vyatta-op-vpn.pl \
+ --op=show-ipsec-sa-stats-conn \
+ --peer="$6" \
+ --tunnel="$8"
diff --git a/templates/show/vpn/ipsec/verbose/node.def b/templates/show/vpn/ipsec/verbose/node.def
new file mode 100644
index 0000000..fac77a3
--- /dev/null
+++ b/templates/show/vpn/ipsec/verbose/node.def
@@ -0,0 +1,7 @@
+help: Show Verbose Detail on all active IPsec Security Associations (SA)
+run: if pgrep charon >&/dev/null; then
+ /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-detail
+ else
+ echo -e "IPSec Process NOT Running\n"
+ fi
+