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 /interface-definitions | |
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 'interface-definitions')
-rw-r--r-- | interface-definitions/vpn_ipsec.xml.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/interface-definitions/vpn_ipsec.xml.in b/interface-definitions/vpn_ipsec.xml.in index 6aff7bef5..a2e9a7a5a 100644 --- a/interface-definitions/vpn_ipsec.xml.in +++ b/interface-definitions/vpn_ipsec.xml.in @@ -64,6 +64,7 @@ <validator name="numeric" argument="--range 30-86400"/> </constraint> </properties> + <defaultValue>3600</defaultValue> </leafNode> <leafNode name="mode"> <properties> @@ -83,6 +84,7 @@ <regex>^(tunnel|transport)$</regex> </constraint> </properties> + <defaultValue>tunnel</defaultValue> </leafNode> <leafNode name="pfs"> <properties> @@ -190,6 +192,7 @@ <regex>^(enable|dh-group1|dh-group2|dh-group5|dh-group14|dh-group15|dh-group16|dh-group17|dh-group18|dh-group19|dh-group20|dh-group21|dh-group22|dh-group23|dh-group24|dh-group25|dh-group26|dh-group27|dh-group28|dh-group29|dh-group30|dh-group31|dh-group32|disable)$</regex> </constraint> </properties> + <defaultValue>enable</defaultValue> </leafNode> <tagNode name="proposal"> <properties> @@ -341,6 +344,7 @@ <validator name="numeric" argument="--range 30-86400"/> </constraint> </properties> + <defaultValue>28800</defaultValue> </leafNode> <leafNode name="mobike"> <properties> |