diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-07-03 15:39:17 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-07-03 15:39:17 +0200 |
commit | 1e74c0df2179c60036e440e15ed9036163039b2a (patch) | |
tree | 4352ed737a931a3d6fbbfb6ecd99cfb84f34661f /data/templates/ipsec/swanctl/peer.tmpl | |
parent | a1abb118c9eb413f3c78cfb2077f9c0d4b443c3a (diff) | |
download | vyos-1x-1e74c0df2179c60036e440e15ed9036163039b2a.tar.gz vyos-1x-1e74c0df2179c60036e440e15ed9036163039b2a.zip |
ipsec: T2816: remove default values from Jinja2 template and place them in XML
VyOS has a known to work mechanism in supplying CLI default values into the
Python configuration scripts. This commit removes hardcoded default values from
the Jinja2 template and places them into the appropriate XML definitions.
The big advantage is that the default value itself and the corresponding help
string are located in the exact same file.
Diffstat (limited to 'data/templates/ipsec/swanctl/peer.tmpl')
-rw-r--r-- | data/templates/ipsec/swanctl/peer.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/ipsec/swanctl/peer.tmpl b/data/templates/ipsec/swanctl/peer.tmpl index 0559d1dac..b35cd4b60 100644 --- a/data/templates/ipsec/swanctl/peer.tmpl +++ b/data/templates/ipsec/swanctl/peer.tmpl @@ -63,7 +63,7 @@ if_id_in = {{ peer_conf.vti.bind | replace('vti', '') }} if_id_out = {{ peer_conf.vti.bind | replace('vti', '') }} ipcomp = {{ 'yes' if vti_esp.compression is defined and vti_esp.compression == 'enable' else 'no' }} - mode = {{ vti_esp.mode if vti_esp.mode is defined else "tunnel" }} + mode = {{ vti_esp.mode }} {% if peer[0:1] == '@' %} start_action = none {% elif peer_conf.connection_type is not defined or peer_conf.connection_type == 'initiate' %} @@ -101,7 +101,7 @@ remote_ts = {{ peer }}{{ remote_suffix }} {% endif %} ipcomp = {{ 'yes' if tunnel_esp.compression is defined and tunnel_esp.compression == 'enable' else 'no' }} - mode = {{ tunnel_esp.mode if tunnel_esp.mode is defined else "tunnel" }} + mode = {{ tunnel_esp.mode }} {% if peer[0:1] == '@' %} start_action = none {% elif peer_conf.connection_type is not defined or peer_conf.connection_type == 'initiate' %} |