diff options
author | aapostoliuk <a.apostoliuk@vyos.io> | 2023-03-30 18:28:56 +0300 |
---|---|---|
committer | aapostoliuk <a.apostoliuk@vyos.io> | 2023-03-30 18:28:56 +0300 |
commit | a78982625a8a18069bd5a13744734873698fd0f9 (patch) | |
tree | 348121f92740f466357de2ac111b6d2d13981340 /op-mode-definitions/vpn-ipsec.xml.in | |
parent | 623dfc9d87d513bd69e5e6eef9664056dc1a45f1 (diff) | |
download | vyos-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.in | 19 |
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><x.x.x.x> <h:h:h:h:h:h:h:h></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> |