Drop any None and thus previously required default values
authorPlamen Dimitrov <plamen.dimitrov@intra2net.com>
Thu, 12 May 2022 05:03:11 +0000 (08:03 +0300)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 19 May 2022 09:13:27 +0000 (11:13 +0200)
There can be no "None" cnfvar values as these will be automatically
converted to "None" strings. Empty strings are thus their correct
equivalent after the cnfline classes migration.

As no child cnfvars could be considered obligatory and whether they
are required depends entirely on choices for other child cnfvars,
we will not try to implement any option for an early fail and simply
delegate any further validation to the production code.

src/cnfvar/templates.py

index a0b2e89..9c39520 100644 (file)
@@ -86,8 +86,8 @@ intraclient_defaults = {
     "INTRACLIENT_DNS_RELAYING_ALLOWED": "1",
     "INTRACLIENT_EMAIL_RELAYING_ALLOWED": "1",
     "INTRACLIENT_FIREWALL_RULESET_REF": "5",
-    "INTRACLIENT_IP": None,
-    "INTRACLIENT_MAC": None,
+    "INTRACLIENT_IP": "",
+    "INTRACLIENT_MAC": "",
     "INTRACLIENT_PROXY_PROFILE_REF": "-1",
 }
 #: UI defaults for a NIC instance
@@ -188,7 +188,7 @@ vpnconn_defaults = {
     "VPNCONN_LIFETIME_IPSECSA": "60",
     "VPNCONN_OFFLINE_DETECTION_SEC": "60",
     "VPNCONN_PEER_DNS": "",
-    "VPNCONN_PEER_IP": None,
+    "VPNCONN_PEER_IP": "",
     "VPNCONN_PEER_TYPE": "IP",
     "VPNCONN_PROXY_PROFILE_REF": "-2",
     "VPNCONN_PSK": "",