_network_vpn() {
local words=( $@ )
- local commands="ipsec"
+ local commands="ipsec security-policies"
local cmd="$(_network_find_on_cmdline "${commands}")"
if [[ -z "${cmd}" ]]; then
COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
ipsec)
_network_vpn_ipsec ${args}
;;
+ security-policies)
+ _network_vpn_security_policies ${args}
+ ;;
esac
}
fi
}
+_network_vpn_security_policies() {
+ local words=( $@ )
+
+ local commands="destroy new $(network raw list-vpn-security-policies-all)"
+ local cmd="$(_network_find_on_cmdline "${commands}")"
+ if [[ -z "${cmd}" ]]; then
+ COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
+ return 0
+ fi
+
+
+ local args="${words[@]:1}"
+ case "${cmd}" in
+ destroy)
+ :
+ ;;
+ new)
+ :
+ ;;
+ *)
+ if network raw vpn-security-policy-exists ${cmd}; then
+ _network_vpn_security_policies_subcommands ${cmd} ${args}
+ fi
+ ;;
+ esac
+}
+
+_network_vpn_security_policies_subcommands() {
+ local policy=${1}
+ shift
+ local words=( $@ )
+
+ local commands="cipher compression group-type integrity key-exchange lifetime pfs show"
+ local cmd="$(_network_find_on_cmdline "${commands}")"
+ if [[ -z "${cmd}" ]]; then
+ COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
+ return 0
+ fi
+
+
+ local args="${words[@]:1}"
+ case "${cmd}" in
+ cipher)
+ _network_vpn_security_policies_subcommands_cipher ${policy} ${args}
+ ;;
+ compression)
+ _network_vpn_security_policies_subcommands_compression ${policy} ${args}
+ ;;
+ group-type)
+ _network_vpn_security_policies_subcommands_group_type ${policy} ${args}
+ ;;
+ integrity)
+ _network_vpn_security_policies_subcommands_integrity ${policy} ${args}
+ ;;
+ key-exchange)
+ _network_vpn_security_policies_subcommands_key_exchange ${policy} ${args}
+ ;;
+ pfs)
+ _network_vpn_security_policies_subcommands_pfs ${policy} ${args}
+ ;;
+ esac
+}
+
+_network_vpn_security_policies_subcommands_cipher() {
+ :
+}
+
+_network_vpn_security_policies_subcommands_compression() {
+ :
+}
+
+_network_vpn_security_policies_subcommands_group_type() {
+ :
+}
+
+_network_vpn_security_policies_subcommands_integrity() {
+ :
+}
+
+_network_vpn_security_policies_subcommands_key_exchange() {
+ :
+}
+
+_network_vpn_security_policies_subcommands_pfs() {
+ :
+}
+
_network_zone() {
local words=( $@ )