Allow children in cnfvar templates
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Tue, 3 Mar 2026 14:24:50 +0000 (15:24 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Tue, 3 Mar 2026 14:40:16 +0000 (15:40 +0100)
commitd2e31cef8f7770c27614534292592269f528eea5
treeb77111f1ac5a9228adb52ca09e1aa9b8723b4813
parent9766b37ee0dd125c13b49a8bed248b4fbd9d0207
Allow children in cnfvar templates

Some templates are not just lists of cnfvars, but contain elements that
required child cnfvars (e.g. the upcomping VPNCONN_WG_LOCAL_NET).
However, a CnfVar's "children" attribute cannot be set in the CnfVar
constructor, nor are there mechanisms to do that in other functions that
create CnfVars. Add functionality for this special case of creating
CnfVars from templates, where values are very-well controlled. Use dicts
to specify the children.

Also warn if naive users specify overwrite parameters including the "name"
like "VPNCONN_PROTO" (should only be "proto=...")
src/cnfvar/templates.py