activate is not a true boolean

This commit is contained in:
Emmanuel Garette 2021-01-30 12:28:36 +01:00
parent f5f68f3bc8
commit 0a8be9a355
19 changed files with 87 additions and 48 deletions

View file

@ -41,14 +41,15 @@ class ConditionAnnotator:
objectspace, objectspace,
): ):
self.objectspace = objectspace self.objectspace = objectspace
self.force_service_value = {}
if hasattr(objectspace.space, 'variables'): if hasattr(objectspace.space, 'variables'):
self.convert_auto_freeze() self.convert_auto_freeze()
if not hasattr(objectspace.space, 'constraints') or \ if not hasattr(objectspace.space, 'constraints') or \
not hasattr(self.objectspace.space.constraints, 'condition'): not hasattr(self.objectspace.space.constraints, 'condition'):
return return
self.convert_condition_target() self.convert_condition_target()
self.convert_xxxlist_to_variable()
self.check_condition_fallback() self.check_condition_fallback()
self.convert_xxxlist_to_variable()
self.convert_condition_source() self.convert_condition_source()
self.check_choice_option_condition() self.check_choice_option_condition()
self.remove_condition_with_empty_target() self.remove_condition_with_empty_target()
@ -133,31 +134,6 @@ class ConditionAnnotator:
for index in remove_targets: for index in remove_targets:
condition.target.pop(index) condition.target.pop(index)
def convert_xxxlist_to_variable(self):
"""transform *list to variable or family
"""
for condition in self.objectspace.space.constraints.condition:
new_targets = []
remove_targets = []
for target_idx, target in enumerate(condition.target):
if target.type.endswith('list'):
listname = target.type
listvars = self.objectspace.list_conditions.get(listname,
{}).get(target.name)
if listvars:
for listvar in listvars:
type_ = 'variable'
new_target = self.objectspace.target(listvar.xmlfiles)
new_target.type = type_
new_target.name = listvar
new_targets.append(new_target)
remove_targets.append(target_idx)
remove_targets.sort(reverse=True)
for target_idx in remove_targets:
condition.target.pop(target_idx)
condition.target.extend(new_targets)
def check_condition_fallback(self): def check_condition_fallback(self):
"""a condition with a fallback **and** the source variable doesn't exist """a condition with a fallback **and** the source variable doesn't exist
""" """
@ -187,8 +163,11 @@ class ConditionAnnotator:
""" """
actions = self.get_actions_from_condition(condition.name) actions = self.get_actions_from_condition(condition.name)
for target in condition.target: for target in condition.target:
leader_or_var, variables = self._get_family_variables_from_target(target)
main_action = actions[0] main_action = actions[0]
if target.type.endswith('list'):
self.force_service_value[target.name] = main_action != 'disabled'
continue
leader_or_var, variables = self._get_family_variables_from_target(target)
setattr(leader_or_var, main_action, True) setattr(leader_or_var, main_action, True)
for action in actions[1:]: for action in actions[1:]:
for variable in variables: for variable in variables:
@ -224,6 +203,65 @@ class ConditionAnnotator:
return variable, list(variable.variable.values()) return variable, list(variable.variable.values())
return variable, [] return variable, []
def convert_xxxlist_to_variable(self):
"""transform *list to variable or family
"""
fills = {}
for condition in self.objectspace.space.constraints.condition:
remove_targets = []
for target_idx, target in enumerate(condition.target):
if target.type.endswith('list'):
listname = target.type
listvars = self.objectspace.list_conditions.get(listname,
{}).get(target.name)
if listvars:
for listvar in listvars:
if target.name in self.force_service_value:
listvar.default = self.force_service_value[target.name]
continue
value = condition.name != 'disabled_if_in'
if len(condition.param) != 1:
xmlfiles = self.objectspace.display_xmlfiles(condition.xmlfiles)
msg = _(f'a condition with "{listname}" can only have '
f'only have only on param')
raise DictConsistencyError(msg, 35) from err
if listvar.path in fills:
fill = fills[listvar.path]
fill.index += 1
else:
fill = self.objectspace.fill(target.xmlfiles)
fill.target = listvar.path
fill.name = 'calc_value'
fill.namespace = 'services'
fill.index = 0
if not hasattr(self.objectspace.space, 'constraints'):
self.objectspace.space.constraints = self.objectspace.constraints(elt.xmlfiles)
if not hasattr(self.objectspace.space.constraints, 'fill'):
self.objectspace.space.constraints.fill = []
self.objectspace.space.constraints.fill.append(fill)
fills[listvar.path] = fill
param1 = self.objectspace.param(target.xmlfiles)
param1.text = value
param1.type = 'boolean'
param2 = self.objectspace.param(target.xmlfiles)
param2.name = 'default'
param2.text = not value
param2.type = 'boolean'
fill.param = [param1, param2]
param3 = self.objectspace.param(target.xmlfiles)
param3.name = f'condition_{fill.index}'
param3.type = 'variable'
param3.text = condition.source
fill.param.append(param3)
param4 = self.objectspace.param(target.xmlfiles)
param4.name = f'expected_{fill.index}'
param4.text = getattr(condition.param[0], 'text', None)
fill.param.append(param4)
remove_targets.append(target_idx)
remove_targets.sort(reverse=True)
for target_idx in remove_targets:
condition.target.pop(target_idx)
def convert_condition_source(self): def convert_condition_source(self):
"""remove condition for ChoiceOption that don't have param """remove condition for ChoiceOption that don't have param
""" """

View file

@ -79,6 +79,9 @@ class FillAnnotator:
value = self.objectspace.value(fill.xmlfiles) value = self.objectspace.value(fill.xmlfiles)
value.type = 'calculation' value.type = 'calculation'
value.name = fill.name value.name = fill.name
if variable.namespace == 'services':
variable.default = value
else:
variable.value = [value] variable.value = [value]
# manage params # manage params

View file

@ -123,8 +123,6 @@ class ServiceAnnotator:
elt.xmlfiles, elt.xmlfiles,
) )
family.variable = [] family.variable = []
# FIXME ne devrait pas etre True par défaut
# devrait etre un calcule
activate_obj = self._generate_element('boolean', activate_obj = self._generate_element('boolean',
'activate', 'activate',
True, True,

View file

@ -365,7 +365,7 @@ class CreoleTemplateEngine:
filename = fill['source'] filename = fill['source']
if not isfile(filename): # pragma: no cover if not isfile(filename): # pragma: no cover
raise FileNotFound(_(f"File {filename} does not exist.")) raise FileNotFound(_(f"File {filename} does not exist."))
if fill.get('activate', False): if fill['activate']:
self.instance_file(fill, self.instance_file(fill,
tmp_dir, tmp_dir,
dest_dir, dest_dir,

View file

@ -312,7 +312,7 @@ class Variable(Common):
if value is not None: if value is not None:
value = self.convert_str(value) value = self.convert_str(value)
return f"ParamValue({value})" return f"ParamValue({value})"
if param.type == 'number': if param.type in ['number', 'boolean']:
return f'ParamValue({param.text})' return f'ParamValue({param.text})'
if param.type == 'variable': if param.type == 'variable':
return self.build_param(param, function) return self.build_param(param, function)
@ -320,7 +320,7 @@ class Variable(Common):
return f'ParamInformation("{param.text}", None)' return f'ParamInformation("{param.text}", None)'
if param.type == 'suffix': if param.type == 'suffix':
return 'ParamSuffix()' return 'ParamSuffix()'
return '' # pragma: no cover raise Exception(f'unknown type {param.type}') # pragma: no cover
@staticmethod @staticmethod
def build_param(param, def build_param(param,

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/etc/file")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file") option_14 = StrOption(name="source", doc="source", default="file")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("oui")})))
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -1 +1 @@
{"rougail.general.condition": "oui", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/etc/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true} {"rougail.general.condition": "oui", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/etc/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": false}

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/etc/file")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file") option_14 = StrOption(name="source", doc="source", default="file")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("oui")})))
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1") option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("oui")})))
option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_18 = StrOption(name="group", doc="group", default="root") option_18 = StrOption(name="group", doc="group", default="root")
option_19 = StrOption(name="mode", doc="mode", default="0644") option_19 = StrOption(name="mode", doc="mode", default="0644")
@ -31,7 +31,7 @@ option_20 = StrOption(name="name", doc="name", default="/tmp/file2")
option_21 = StrOption(name="owner", doc="owner", default="root") option_21 = StrOption(name="owner", doc="owner", default="root")
option_22 = StrOption(name="source", doc="source", default="file2") option_22 = StrOption(name="source", doc="source", default="file2")
option_23 = BoolOption(name="templating", doc="templating", default=True) option_23 = BoolOption(name="templating", doc="templating", default=True)
option_24 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))})) option_24 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("oui")})))
option_17 = OptionDescription(name="file2", doc="file2", children=[option_18, option_19, option_20, option_21, option_22, option_23, option_24]) option_17 = OptionDescription(name="file2", doc="file2", children=[option_18, option_19, option_20, option_21, option_22, option_23, option_24])
option_8 = OptionDescription(name="files", doc="files", children=[option_9, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9, option_17])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -1 +1 @@
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true} {"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": false}

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file") option_14 = StrOption(name="source", doc="source", default="file")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('unpossible'), 'reverse_condition': ParamValue(True)}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(True)), kwargs={'default': ParamValue(False), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("unpossible")})))
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -1 +1 @@
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true} {"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": false}

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file") option_14 = StrOption(name="source", doc="source", default="file")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('unpossible'), 'reverse_condition': ParamValue(True)}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(True)), kwargs={'default': ParamValue(False), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("unpossible")})))
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -1 +1 @@
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true} {"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": false}

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file") option_14 = StrOption(name="source", doc="source", default="file")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('unpossible'), 'reverse_condition': ParamValue(True)})), Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(True)), kwargs={'default': ParamValue(False), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("unpossible"), 'condition_1': ParamOption(option_5, notraisepropertyerror=False, todict=False), 'expected_1': ParamValue("oui")})))
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -1 +1 @@
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true} {"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": false}

View file

@ -23,7 +23,7 @@ option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root") option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file") option_14 = StrOption(name="source", doc="source", default="file")
option_15 = BoolOption(name="templating", doc="templating", default=True) option_15 = BoolOption(name="templating", doc="templating", default=True)
option_16 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('statique'), 'reverse_condition': ParamValue(True)}))})) option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(True)), kwargs={'default': ParamValue(False), 'condition_0': ParamOption(option_3, notraisepropertyerror=False, todict=False), 'expected_0': ParamValue("statique")})))
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_7 = OptionDescription(name="test", doc="test", children=[option_8])

View file

@ -1 +1 @@
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "non", "services.test.files.file1.group": "root", "services.test.files.file1.mode": "0644", "services.test.files.file1.name": "/tmp/file1", "services.test.files.file1.owner": "root", "services.test.files.file1.source": "file1", "services.test.files.file1.templating": true} {"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "non", "services.test.files.file1.group": "root", "services.test.files.file1.mode": "0644", "services.test.files.file1.name": "/tmp/file1", "services.test.files.file1.owner": "root", "services.test.files.file1.source": "file1", "services.test.files.file1.templating": true, "services.test.files.file1.activate": false}

View file

@ -22,7 +22,7 @@ option_11 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = StrOption(name="owner", doc="owner", default="root") option_12 = StrOption(name="owner", doc="owner", default="root")
option_13 = StrOption(name="source", doc="source", default="file1") option_13 = StrOption(name="source", doc="source", default="file1")
option_14 = BoolOption(name="templating", doc="templating", default=True) option_14 = BoolOption(name="templating", doc="templating", default=True)
option_15 = BoolOption(name="activate", doc="activate", default=True, properties=frozenset({"disabled"})) option_15 = BoolOption(name="activate", doc="activate", default=False)
option_8 = OptionDescription(name="file1", doc="file1", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15]) option_8 = OptionDescription(name="file1", doc="file1", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15])
option_7 = OptionDescription(name="files", doc="files", children=[option_8]) option_7 = OptionDescription(name="files", doc="files", children=[option_8])
option_6 = OptionDescription(name="test", doc="test", children=[option_7]) option_6 = OptionDescription(name="test", doc="test", children=[option_7])