summaryrefslogtreecommitdiff
path: root/op-mode-definitions/vpn-ipsec.xml.in
diff options
context:
space:
mode:
authoraapostoliuk <a.apostoliuk@vyos.io>2023-03-30 18:28:56 +0300
committeraapostoliuk <a.apostoliuk@vyos.io>2023-03-30 18:28:56 +0300
commita78982625a8a18069bd5a13744734873698fd0f9 (patch)
tree348121f92740f466357de2ac111b6d2d13981340 /op-mode-definitions/vpn-ipsec.xml.in
parent623dfc9d87d513bd69e5e6eef9664056dc1a45f1 (diff)
downloadvyos-1x-a78982625a8a18069bd5a13744734873698fd0f9.tar.gz
vyos-1x-a78982625a8a18069bd5a13744734873698fd0f9.zip
ipsec: T5093: Fixed 'reset vpn ipsec profile' command
Fixed 'reset vpn ipsec profile' command using vici library and new op-mode style. Added ability to use 'reset vpn ipsec profile' command with 'remote-host' option.
Diffstat (limited to 'op-mode-definitions/vpn-ipsec.xml.in')
-rw-r--r--op-mode-definitions/vpn-ipsec.xml.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/op-mode-definitions/vpn-ipsec.xml.in b/op-mode-definitions/vpn-ipsec.xml.in
index 5baaec7ce..5a7e6dd63 100644
--- a/op-mode-definitions/vpn-ipsec.xml.in
+++ b/op-mode-definitions/vpn-ipsec.xml.in
@@ -14,7 +14,7 @@
<children>
<tagNode name="profile">
<properties>
- <help>Reset all tunnels for given DMVPN profile</help>
+ <help>Reset a specific tunnel for given DMVPN profile</help>
<completionHelp>
<path>vpn ipsec profile</path>
</completionHelp>
@@ -23,11 +23,24 @@
<tagNode name="tunnel">
<properties>
<help>Reset a specific tunnel for given DMVPN profile</help>
+ <completionHelp>
+ <script>sudo ${vyos_completion_dir}/list_ipsec_profile_tunnels.py --profile ${COMP_WORDS[4]}</script>
+ </completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/vpn_ipsec.py --action="reset-profile" --name="$6" --tunnel="$8"</command>
+ <children>
+ <tagNode name="remote-host">
+ <properties>
+ <help>Reset a specific tunnel for given DMVPN NBMA</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_dst --profile="$5" --tunnel="$7" --nbma_dst="$9"</command>
+ </tagNode>
+ </children>
+ <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_all --profile="$5" --tunnel="$7"</command>
</tagNode>
</children>
- <command>sudo ${vyos_op_scripts_dir}/vpn_ipsec.py --action="reset-profile" --name="$6" --tunnel="all"</command>
</tagNode>
<node name="remote-access">
<properties>