From 0be7a72d286b6f3a5c45c294aeb4d8082e632adb Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 21 Feb 2021 10:34:01 +0100 Subject: [PATCH] Add new attribute "include" to "file" This attribute have 3 values: - "no": it's a normal file - "name": the name is included in another template so it is generated before other templates - "content": the content is included in another template so it is generated before the other templates and is not installed on the server fixes #2 --- doc/service/file.md | 17 +++++++ src/rougail/data/rougail.dtd | 1 + src/rougail/template/base.py | 28 +++++++---- src/rougail/template/engine/creole.py | 4 +- src/rougail/template/engine/jinja2.py | 9 +++- src/rougail/template/systemd.py | 3 +- .../01base_file/makedict/base.json | 2 +- .../dictionaries/01base_file/tiramisu/base.py | 32 ++++++------ .../01base_file_include/makedict/base.json | 2 +- .../01base_file_include/tiramisu/base.py | 32 ++++++------ .../01base_file_include_content/00-base.xml | 21 ++++++++ .../01base_file_include_content/__init__.py | 0 .../makedict/base.json | 1 + .../result/etc/dir/incfile | 1 + .../result/etc/file | 1 + .../result/etc/file2 | 1 + .../result/tmpfiles.d/rougail.conf | 4 ++ .../tiramisu/base.py | 47 ++++++++++++++++++ .../01base_file_include_content/tmpl/file | 7 +++ .../01base_file_include_content/tmpl/file2 | 1 + .../01base_file_include_content/tmpl/incfile | 1 + .../01base_file_include_name/00-base.xml | 21 ++++++++ .../01base_file_include_name/__init__.py | 0 .../makedict/base.json | 1 + .../result/etc/dir/incfile | 1 + .../01base_file_include_name/result/etc/file | 1 + .../01base_file_include_name/result/etc/file2 | 1 + .../result/tmpfiles.d/rougail.conf | 6 +++ .../01base_file_include_name/tiramisu/base.py | 47 ++++++++++++++++++ .../01base_file_include_name/tmpl/file | 7 +++ .../01base_file_include_name/tmpl/file2 | 1 + .../01base_file_include_name/tmpl/incfile | 1 + .../01base_file_patch/makedict/base.json | 2 +- .../01base_file_patch/tiramisu/base.py | 13 ++--- .../01base_file_utfchar/makedict/base.json | 2 +- .../01base_file_utfchar/tiramisu/base.py | 32 ++++++------ .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 32 ++++++------ .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../20notemplating/makedict/base.json | 2 +- .../20notemplating/tiramisu/base.py | 13 ++--- .../40ifin_leadershipauto/makedict/base.json | 2 +- .../40ifin_leadershipauto/tiramisu/base.py | 13 ++--- .../makedict/base.json | 2 +- .../tiramisu/base.py | 32 ++++++------ .../45extra_without_family/makedict/base.json | 2 +- .../45extra_without_family/tiramisu/base.py | 13 ++--- .../60extra_group/makedict/base.json | 2 +- .../60extra_group/tiramisu/base.py | 32 ++++++------ .../60extra_help/makedict/base.json | 2 +- .../60extra_help/tiramisu/base.py | 13 ++--- .../70container_files/makedict/base.json | 2 +- .../70container_files/tiramisu/base.py | 32 ++++++------ .../makedict/base.json | 2 +- .../tiramisu/base.py | 32 ++++++------ .../makedict/base.json | 2 +- .../tiramisu/base.py | 36 +++++++------- .../makedict/base.json | 2 +- .../tiramisu/base.py | 15 +++--- .../makedict/base.json | 2 +- .../70container_files_twice/tiramisu/base.py | 49 ++++++++++--------- .../70container_filesmulti/makedict/base.json | 2 +- .../70container_filesmulti/tiramisu/base.py | 32 ++++++------ .../makedict/base.json | 2 +- .../tiramisu/base.py | 13 ++--- .../70service_not_managed/makedict/base.json | 2 +- .../70service_not_managed/tiramisu/base.py | 13 ++--- tests/test_3_template.py | 2 +- 101 files changed, 631 insertions(+), 377 deletions(-) create mode 100644 tests/dictionaries/01base_file_include_content/00-base.xml create mode 100644 tests/dictionaries/01base_file_include_content/__init__.py create mode 100644 tests/dictionaries/01base_file_include_content/makedict/base.json create mode 100644 tests/dictionaries/01base_file_include_content/result/etc/dir/incfile create mode 100644 tests/dictionaries/01base_file_include_content/result/etc/file create mode 100644 tests/dictionaries/01base_file_include_content/result/etc/file2 create mode 100644 tests/dictionaries/01base_file_include_content/result/tmpfiles.d/rougail.conf create mode 100644 tests/dictionaries/01base_file_include_content/tiramisu/base.py create mode 100644 tests/dictionaries/01base_file_include_content/tmpl/file create mode 100644 tests/dictionaries/01base_file_include_content/tmpl/file2 create mode 100644 tests/dictionaries/01base_file_include_content/tmpl/incfile create mode 100644 tests/dictionaries/01base_file_include_name/00-base.xml create mode 100644 tests/dictionaries/01base_file_include_name/__init__.py create mode 100644 tests/dictionaries/01base_file_include_name/makedict/base.json create mode 100644 tests/dictionaries/01base_file_include_name/result/etc/dir/incfile create mode 100644 tests/dictionaries/01base_file_include_name/result/etc/file create mode 100644 tests/dictionaries/01base_file_include_name/result/etc/file2 create mode 100644 tests/dictionaries/01base_file_include_name/result/tmpfiles.d/rougail.conf create mode 100644 tests/dictionaries/01base_file_include_name/tiramisu/base.py create mode 100644 tests/dictionaries/01base_file_include_name/tmpl/file create mode 100644 tests/dictionaries/01base_file_include_name/tmpl/file2 create mode 100644 tests/dictionaries/01base_file_include_name/tmpl/incfile diff --git a/doc/service/file.md b/doc/service/file.md index 19bbd770..0cbf5701 100644 --- a/doc/service/file.md +++ b/doc/service/file.md @@ -149,3 +149,20 @@ Ou d'utiliser le moteur "jinja2" : ``` /etc/squid/squid.conf ``` + +## Inclusion de template + +Un attribut "include" permet de définir la nature du fichier. Cet attribut peut avoir trois valeurs : + +- "no" : c'est un fichier normal +- "name" : le répertoire de destination est listé dans un autre template, il faut que le fichier soit généré avant cet autre template +- "include" : le contenu du fichier est copié dans un autre template, il faut que le fichier soit généré avant cet autre template et ce fichier n'a pas besoin d'être installé sur le serveur cible. + +Exemples : + +``` +/etc/squid/squid.conf +/etc/squid/squid.conf +``` + +Bien entendu, c'est au développeur de lister ou d'inclure le contenu de ce template dans le fichier de destination. Cet attribut permet juste de garantir que le fichier sera fait avant l'autre et de ne pas l'installer sur le serveur si ce n'est pas nécessaire. diff --git a/src/rougail/data/rougail.dtd b/src/rougail/data/rougail.dtd index 396a8a71..5f5a0460 100644 --- a/src/rougail/data/rougail.dtd +++ b/src/rougail/data/rougail.dtd @@ -67,6 +67,7 @@ + diff --git a/src/rougail/template/base.py b/src/rougail/template/base.py index 98735f5c..a295ddb7 100644 --- a/src/rougail/template/base.py +++ b/src/rougail/template/base.py @@ -267,6 +267,7 @@ class RougailBaseTemplate: source=source, true_destfilename=destfile, destfilename=destfilename, + destdir=self.destinations_dir, variable=var, rougail_variables_dict=self.rougail_variables_dict, eosfunc=self.eosfunc, @@ -285,16 +286,23 @@ class RougailBaseTemplate: ) for template in listdir('.'): self.prepare_template(template) - for service_obj in await self.config.option('services').list('all'): - service_name = await service_obj.option.name() - for fills in await service_obj.list('all'): - type_ = await fills.option.name() - for fill_obj in await fills.list('all'): - fill = await fill_obj.value.dict() - if fill['activate']: - self.instance_file(fill, type_, service_name) - else: - self.log.debug(_("Instantiation of file '{filename}' disabled")) + for include in (True, False): + for service_obj in await self.config.option('services').list('all'): + service_name = await service_obj.option.name() + for fills in await service_obj.list('all'): + type_ = await fills.option.name() + for fill_obj in await fills.list('all'): + fill = await fill_obj.value.dict() + if 'include' in fill: + if (fill['include'] == 'no' and include is True) or \ + (fill['include'] != 'no' and include is False): + continue + elif include is True: + continue + if fill['activate']: + self.instance_file(fill, type_, service_name) + else: + self.log.debug(_("Instantiation of file '{filename}' disabled")) self.post_instance() chdir(ori_dir) diff --git a/src/rougail/template/engine/creole.py b/src/rougail/template/engine/creole.py index a1dcd830..e71d48e6 100644 --- a/src/rougail/template/engine/creole.py +++ b/src/rougail/template/engine/creole.py @@ -96,6 +96,7 @@ def process(filename: str, source: str, true_destfilename: str, destfilename: str, + destdir: str, variable: Any, rougail_variables_dict: Dict, eosfunc: Dict, @@ -105,7 +106,8 @@ def process(filename: str, # full path of the destination file try: extra_context = {'normalize_family': normalize_family, - 'rougail_filename': true_destfilename + 'rougail_filename': true_destfilename, + 'rougail_destination_dir': destdir, } if variable is not None: extra_context['rougail_variable'] = variable diff --git a/src/rougail/template/engine/jinja2.py b/src/rougail/template/engine/jinja2.py index a447dfef..cb1b18da 100644 --- a/src/rougail/template/engine/jinja2.py +++ b/src/rougail/template/engine/jinja2.py @@ -37,6 +37,7 @@ def process(filename: str, source: str, true_destfilename: str, destfilename: str, + destdir: str, variable: Any, rougail_variables_dict: Dict, eosfunc: Dict, @@ -55,9 +56,13 @@ def process(filename: str, try: # extra_context = {'normalize_family': normalize_family, # eosfunc - env = Environment(loader=FileSystemLoader(dir_name)) + env = Environment(loader=FileSystemLoader([dir_name, destdir])) template = env.get_template(template_name) - data = template.render(**rougail_variables_dict, rougail_filename=true_destfilename, **var) + data = template.render(**rougail_variables_dict, + rougail_filename=true_destfilename, + rougail_destination_dir=destdir, + **var, + ) except UndefinedError as err: # pragma: no cover varname = err msg = f"Error: unknown variable used in template {filename} to {destfilename}: {varname}" diff --git a/src/rougail/template/systemd.py b/src/rougail/template/systemd.py index 9a3c025b..6d713f4a 100644 --- a/src/rougail/template/systemd.py +++ b/src/rougail/template/systemd.py @@ -47,7 +47,7 @@ z %%filename - - - - - %for %%service in %%services %if %%hasattr(%%service, 'files') %for %%file in %%service.files - %if %%file.activate == True + %if %%file.activate == True and %%file.include != 'content' %if %%isinstance(%%file.name, list) %for %%filename in %%file.name %%display(%%file, %%filename)%slurp @@ -125,6 +125,7 @@ class RougailSystemdTemplate(RougailBaseTemplate): source=ROUGAIL_TMPL_TEMPLATE, true_destfilename=destfile, destfilename=destfilename, + destdir=self.destinations_dir, variable=None, rougail_variables_dict=self.rougail_variables_dict, eosfunc=self.eosfunc, diff --git a/tests/dictionaries/01base_file/makedict/base.json b/tests/dictionaries/01base_file/makedict/base.json index fe375f63..a09c3a9c 100644 --- a/tests/dictionaries/01base_file/makedict/base.json +++ b/tests/dictionaries/01base_file/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "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.activate": true, "services.test.files.file2.engine": "jinja2", "services.test.files.file2.group": "root", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/etc/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true, "services.test.files.file2.engine": "jinja2", "services.test.files.file2.group": "root", "services.test.files.file2.include": "no", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/etc/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true} diff --git a/tests/dictionaries/01base_file/tiramisu/base.py b/tests/dictionaries/01base_file/tiramisu/base.py index a6632482..ee74b1ce 100644 --- a/tests/dictionaries/01base_file/tiramisu/base.py +++ b/tests/dictionaries/01base_file/tiramisu/base.py @@ -16,21 +16,23 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/file") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="file") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="jinja2") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = FilenameOption(name="name", doc="name", default="/etc/file2") -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="file2") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="file2", doc="file2", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/file") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/file2") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="file2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="file2", doc="file2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/01base_file_include/makedict/base.json b/tests/dictionaries/01base_file_include/makedict/base.json index fe375f63..a09c3a9c 100644 --- a/tests/dictionaries/01base_file_include/makedict/base.json +++ b/tests/dictionaries/01base_file_include/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "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.activate": true, "services.test.files.file2.engine": "jinja2", "services.test.files.file2.group": "root", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/etc/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true, "services.test.files.file2.engine": "jinja2", "services.test.files.file2.group": "root", "services.test.files.file2.include": "no", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/etc/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true} diff --git a/tests/dictionaries/01base_file_include/tiramisu/base.py b/tests/dictionaries/01base_file_include/tiramisu/base.py index a6632482..ee74b1ce 100644 --- a/tests/dictionaries/01base_file_include/tiramisu/base.py +++ b/tests/dictionaries/01base_file_include/tiramisu/base.py @@ -16,21 +16,23 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/file") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="file") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="jinja2") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = FilenameOption(name="name", doc="name", default="/etc/file2") -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="file2") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="file2", doc="file2", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/file") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/file2") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="file2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="file2", doc="file2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/01base_file_include_content/00-base.xml b/tests/dictionaries/01base_file_include_content/00-base.xml new file mode 100644 index 00000000..8927d933 --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/00-base.xml @@ -0,0 +1,21 @@ + + + + + + /etc/file + /etc/file2 + /etc/dir/incfile + + + + + + + non + + + + + diff --git a/tests/dictionaries/01base_file_include_content/__init__.py b/tests/dictionaries/01base_file_include_content/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/01base_file_include_content/makedict/base.json b/tests/dictionaries/01base_file_include_content/makedict/base.json new file mode 100644 index 00000000..a06b9214 --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/makedict/base.json @@ -0,0 +1 @@ +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true, "services.test.files.file2.engine": "jinja2", "services.test.files.file2.group": "root", "services.test.files.file2.include": "no", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/etc/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true, "services.test.files.incfile.engine": "creole", "services.test.files.incfile.group": "root", "services.test.files.incfile.include": "content", "services.test.files.incfile.mode": "0644", "services.test.files.incfile.name": "/etc/dir/incfile", "services.test.files.incfile.owner": "root", "services.test.files.incfile.source": "incfile", "services.test.files.incfile.activate": true} diff --git a/tests/dictionaries/01base_file_include_content/result/etc/dir/incfile b/tests/dictionaries/01base_file_include_content/result/etc/dir/incfile new file mode 100644 index 00000000..d907505b --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/result/etc/dir/incfile @@ -0,0 +1 @@ +non diff --git a/tests/dictionaries/01base_file_include_content/result/etc/file b/tests/dictionaries/01base_file_include_content/result/etc/file new file mode 100644 index 00000000..d907505b --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/result/etc/file @@ -0,0 +1 @@ +non diff --git a/tests/dictionaries/01base_file_include_content/result/etc/file2 b/tests/dictionaries/01base_file_include_content/result/etc/file2 new file mode 100644 index 00000000..d907505b --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/result/etc/file2 @@ -0,0 +1 @@ +non diff --git a/tests/dictionaries/01base_file_include_content/result/tmpfiles.d/rougail.conf b/tests/dictionaries/01base_file_include_content/result/tmpfiles.d/rougail.conf new file mode 100644 index 00000000..2dab2179 --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/result/tmpfiles.d/rougail.conf @@ -0,0 +1,4 @@ +C /etc/file 0644 root root - /usr/local/lib/etc/file +z /etc/file - - - - - +C /etc/file2 0644 root root - /usr/local/lib/etc/file2 +z /etc/file2 - - - - - diff --git a/tests/dictionaries/01base_file_include_content/tiramisu/base.py b/tests/dictionaries/01base_file_include_content/tiramisu/base.py new file mode 100644 index 00000000..c2eed268 --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/tiramisu/base.py @@ -0,0 +1,47 @@ +from importlib.machinery import SourceFileLoader +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) +for key, value in dict(locals()).items(): + if key != ['SourceFileLoader', 'func']: + setattr(func, key, value) +try: + from tiramisu3 import * +except: + from tiramisu import * +option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"})) +option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) +option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) +option_8 = StrOption(name="engine", doc="engine", default="creole") +option_9 = StrOption(name="group", doc="group", default="root") +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/file") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/file2") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="file2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="file2", doc="file2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_26 = StrOption(name="engine", doc="engine", default="creole") +option_27 = StrOption(name="group", doc="group", default="root") +option_28 = StrOption(name="include", doc="include", default="content") +option_29 = StrOption(name="mode", doc="mode", default="0644") +option_30 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile") +option_31 = StrOption(name="owner", doc="owner", default="root") +option_32 = StrOption(name="source", doc="source", default="incfile") +option_33 = BoolOption(name="activate", doc="activate", default=True) +option_25 = OptionDescription(name="incfile", doc="incfile", children=[option_26, option_27, option_28, option_29, option_30, option_31, option_32, option_33]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16, option_25]) +option_5 = OptionDescription(name="test", doc="test", children=[option_6]) +option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/01base_file_include_content/tmpl/file b/tests/dictionaries/01base_file_include_content/tmpl/file new file mode 100644 index 00000000..9b6ed7d4 --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/tmpl/file @@ -0,0 +1,7 @@ +%import os +%set %%confdir = %%rougail_destination_dir + '/etc/dir/' +%set %%files = %%os.listdir(%%confdir) +%%files.sort()%slurp +%for file in %%files +%include raw %%confdir + file +%end for diff --git a/tests/dictionaries/01base_file_include_content/tmpl/file2 b/tests/dictionaries/01base_file_include_content/tmpl/file2 new file mode 100644 index 00000000..2c66fba2 --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/tmpl/file2 @@ -0,0 +1 @@ +{% include "/etc/dir/incfile" %} diff --git a/tests/dictionaries/01base_file_include_content/tmpl/incfile b/tests/dictionaries/01base_file_include_content/tmpl/incfile new file mode 100644 index 00000000..a29cfeaf --- /dev/null +++ b/tests/dictionaries/01base_file_include_content/tmpl/incfile @@ -0,0 +1 @@ +%%mode_conteneur_actif diff --git a/tests/dictionaries/01base_file_include_name/00-base.xml b/tests/dictionaries/01base_file_include_name/00-base.xml new file mode 100644 index 00000000..775a4f13 --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/00-base.xml @@ -0,0 +1,21 @@ + + + + + + /etc/file + /etc/file2 + /etc/dir/incfile + + + + + + + non + + + + + diff --git a/tests/dictionaries/01base_file_include_name/__init__.py b/tests/dictionaries/01base_file_include_name/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/01base_file_include_name/makedict/base.json b/tests/dictionaries/01base_file_include_name/makedict/base.json new file mode 100644 index 00000000..fe952a65 --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/makedict/base.json @@ -0,0 +1 @@ +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true, "services.test.files.file2.engine": "jinja2", "services.test.files.file2.group": "root", "services.test.files.file2.include": "no", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/etc/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true, "services.test.files.incfile.engine": "creole", "services.test.files.incfile.group": "root", "services.test.files.incfile.include": "name", "services.test.files.incfile.mode": "0644", "services.test.files.incfile.name": "/etc/dir/incfile", "services.test.files.incfile.owner": "root", "services.test.files.incfile.source": "incfile", "services.test.files.incfile.activate": true} diff --git a/tests/dictionaries/01base_file_include_name/result/etc/dir/incfile b/tests/dictionaries/01base_file_include_name/result/etc/dir/incfile new file mode 100644 index 00000000..d907505b --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/result/etc/dir/incfile @@ -0,0 +1 @@ +non diff --git a/tests/dictionaries/01base_file_include_name/result/etc/file b/tests/dictionaries/01base_file_include_name/result/etc/file new file mode 100644 index 00000000..1ac4955d --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/result/etc/file @@ -0,0 +1 @@ +include /etc/dir/incfile diff --git a/tests/dictionaries/01base_file_include_name/result/etc/file2 b/tests/dictionaries/01base_file_include_name/result/etc/file2 new file mode 100644 index 00000000..d907505b --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/result/etc/file2 @@ -0,0 +1 @@ +non diff --git a/tests/dictionaries/01base_file_include_name/result/tmpfiles.d/rougail.conf b/tests/dictionaries/01base_file_include_name/result/tmpfiles.d/rougail.conf new file mode 100644 index 00000000..245eb456 --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/result/tmpfiles.d/rougail.conf @@ -0,0 +1,6 @@ +C /etc/file 0644 root root - /usr/local/lib/etc/file +z /etc/file - - - - - +C /etc/file2 0644 root root - /usr/local/lib/etc/file2 +z /etc/file2 - - - - - +C /etc/dir/incfile 0644 root root - /usr/local/lib/etc/dir/incfile +z /etc/dir/incfile - - - - - diff --git a/tests/dictionaries/01base_file_include_name/tiramisu/base.py b/tests/dictionaries/01base_file_include_name/tiramisu/base.py new file mode 100644 index 00000000..ae83dfaf --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/tiramisu/base.py @@ -0,0 +1,47 @@ +from importlib.machinery import SourceFileLoader +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) +for key, value in dict(locals()).items(): + if key != ['SourceFileLoader', 'func']: + setattr(func, key, value) +try: + from tiramisu3 import * +except: + from tiramisu import * +option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"})) +option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) +option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) +option_8 = StrOption(name="engine", doc="engine", default="creole") +option_9 = StrOption(name="group", doc="group", default="root") +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/file") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/file2") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="file2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="file2", doc="file2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_26 = StrOption(name="engine", doc="engine", default="creole") +option_27 = StrOption(name="group", doc="group", default="root") +option_28 = StrOption(name="include", doc="include", default="name") +option_29 = StrOption(name="mode", doc="mode", default="0644") +option_30 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile") +option_31 = StrOption(name="owner", doc="owner", default="root") +option_32 = StrOption(name="source", doc="source", default="incfile") +option_33 = BoolOption(name="activate", doc="activate", default=True) +option_25 = OptionDescription(name="incfile", doc="incfile", children=[option_26, option_27, option_28, option_29, option_30, option_31, option_32, option_33]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16, option_25]) +option_5 = OptionDescription(name="test", doc="test", children=[option_6]) +option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/01base_file_include_name/tmpl/file b/tests/dictionaries/01base_file_include_name/tmpl/file new file mode 100644 index 00000000..cabf7b21 --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/tmpl/file @@ -0,0 +1,7 @@ +%import os +%set %%confdir = '/etc/dir/' +%set %%files = %%os.listdir(%%rougail_destination_dir + %%confdir) +%%files.sort()%slurp +%for %%file in %%files +include %%{confdir}%%file +%end for diff --git a/tests/dictionaries/01base_file_include_name/tmpl/file2 b/tests/dictionaries/01base_file_include_name/tmpl/file2 new file mode 100644 index 00000000..2c66fba2 --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/tmpl/file2 @@ -0,0 +1 @@ +{% include "/etc/dir/incfile" %} diff --git a/tests/dictionaries/01base_file_include_name/tmpl/incfile b/tests/dictionaries/01base_file_include_name/tmpl/incfile new file mode 100644 index 00000000..a29cfeaf --- /dev/null +++ b/tests/dictionaries/01base_file_include_name/tmpl/incfile @@ -0,0 +1 @@ +%%mode_conteneur_actif diff --git a/tests/dictionaries/01base_file_patch/makedict/base.json b/tests/dictionaries/01base_file_patch/makedict/base.json index 2b24b0b1..04a10642 100644 --- a/tests/dictionaries/01base_file_patch/makedict/base.json +++ b/tests/dictionaries/01base_file_patch/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "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.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true} diff --git a/tests/dictionaries/01base_file_patch/tiramisu/base.py b/tests/dictionaries/01base_file_patch/tiramisu/base.py index 0bdb05a1..c862eab0 100644 --- a/tests/dictionaries/01base_file_patch/tiramisu/base.py +++ b/tests/dictionaries/01base_file_patch/tiramisu/base.py @@ -16,12 +16,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/file") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="file") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/file") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) option_6 = OptionDescription(name="files", doc="files", children=[option_7]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/01base_file_utfchar/makedict/base.json b/tests/dictionaries/01base_file_utfchar/makedict/base.json index ccb3f1ed..7c01cc4d 100644 --- a/tests/dictionaries/01base_file_utfchar/makedict/base.json +++ b/tests/dictionaries/01base_file_utfchar/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.engine": "creole", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.group": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.mode": "0644", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.name": "/etc/systemd-makefs@dev-disk-by\\x2dpartlabel", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.owner": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.source": "systemd-makefs@dev-disk-by\\x2dpartlabel", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.activate": true, "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.engine": "jinja2", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.group": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.mode": "0644", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.name": "/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.owner": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.source": "systemd-makefs@dev-disk-by\\x2dpartlabel2", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.engine": "creole", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.group": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.include": "no", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.mode": "0644", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.name": "/etc/systemd-makefs@dev-disk-by\\x2dpartlabel", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.owner": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.source": "systemd-makefs@dev-disk-by\\x2dpartlabel", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.activate": true, "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.engine": "jinja2", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.group": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.include": "no", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.mode": "0644", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.name": "/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.owner": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.source": "systemd-makefs@dev-disk-by\\x2dpartlabel2", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel2.activate": true} diff --git a/tests/dictionaries/01base_file_utfchar/tiramisu/base.py b/tests/dictionaries/01base_file_utfchar/tiramisu/base.py index 85b887ed..b701c18c 100644 --- a/tests/dictionaries/01base_file_utfchar/tiramisu/base.py +++ b/tests/dictionaries/01base_file_utfchar/tiramisu/base.py @@ -16,21 +16,23 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="systemd-makefs@dev-disk-by\\x2dpartlabel") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel", doc="systemd-makefs@dev-disk-by\\x2dpartlabel", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="jinja2") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2") -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="systemd-makefs@dev-disk-by\\x2dpartlabel2") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="systemd-makefs@dev-disk-by\\x2dpartlabel") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel", doc="systemd-makefs@dev-disk-by\\x2dpartlabel", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="systemd-makefs@dev-disk-by\\x2dpartlabel2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param/makedict/base.json index adc0f4a2..0ad2c86f 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file1.engine": "creole", "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.activate": true} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": true} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param/tiramisu/base.py index e084563c..27066f01 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["oui", "maybe"]), 'condition_operator': ParamValue("OR")}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["oui", "maybe"]), 'condition_operator': ParamValue("OR")}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param2/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param2/makedict/base.json index acc4e5e5..1f89e005 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param2/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param2/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "no", "rougail.general.condition2": "no", "rougail.general.test_variable": "no", "services.test.files.file1.engine": "creole", "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.activate": true} +{"rougail.general.condition": "no", "rougail.general.condition2": "no", "rougail.general.test_variable": "no", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": true} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param2/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param2/tiramisu/base.py index 32672343..ca3edcf1 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param2/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param2/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param3/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param3/makedict/base.json index 28d701e2..027e184b 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param3/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param3/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "no", "rougail.general.condition2": "no", "services.test.files.file1.engine": "creole", "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.activate": false} +{"rougail.general.condition": "no", "rougail.general.condition2": "no", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": false} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param3/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param3/tiramisu/base.py index f8d0b73e..db9b5d36 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param3/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param3/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param4/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param4/makedict/base.json index cf385f00..8820aae2 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param4/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param4/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "yes", "rougail.general.condition2": "no", "services.test.files.file1.engine": "creole", "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.activate": true} +{"rougail.general.condition": "yes", "rougail.general.condition2": "no", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": true} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param4/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param4/tiramisu/base.py index 46cd5e16..15c86f34 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param4/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param4/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param5/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param5/makedict/base.json index 9ec310ad..c82c7060 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param5/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param5/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "yes", "rougail.general.condition2": "yes", "services.test.files.file1.engine": "creole", "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.activate": false} +{"rougail.general.condition": "yes", "rougail.general.condition2": "yes", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": false} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param5/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param5/tiramisu/base.py index fea0b1a3..8dc405a4 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param5/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param5/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param6/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param6/makedict/base.json index cbd70713..f1ce78ae 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param6/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param6/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "no", "rougail.general.condition2": "yes", "services.test.files.file1.engine": "creole", "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.activate": false} +{"rougail.general.condition": "no", "rougail.general.condition2": "yes", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": false} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param6/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param6/tiramisu/base.py index 8ba448a1..c470f64b 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param6/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param6/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["yes", "maybe"]), 'reverse_condition_0': ParamValue(True), 'condition_operator': ParamValue("OR"), 'condition_1': ParamOption(option_4), 'expected_1': ParamValue(["yes", "maybe"])}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/makedict/base.json index a87123be..9a5b9f64 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "oui", "services.test.files.file1.engine": "creole", "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.activate": false} +{"rougail.general.condition": "oui", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": false} diff --git a/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/tiramisu/base.py index f8d77569..391d7ee2 100644 --- a/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["oui", "maybe"]), 'condition_operator': ParamValue("OR")}))) -option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["oui", "maybe"]), 'condition_operator': ParamValue("OR")}))) +option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/10load_disabled_if_not_in_fallback/makedict/base.json b/tests/dictionaries/10load_disabled_if_not_in_fallback/makedict/base.json index a73037ee..c97d341d 100644 --- a/tests/dictionaries/10load_disabled_if_not_in_fallback/makedict/base.json +++ b/tests/dictionaries/10load_disabled_if_not_in_fallback/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "no", "rougail.general.disable_variable": "no", "services.test.files.file1.engine": "creole", "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.activate": true} +{"rougail.general.condition": "no", "rougail.general.disable_variable": "no", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": true} diff --git a/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py index 299b254b..39c67d11 100644 --- a/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py @@ -17,12 +17,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_9 = StrOption(name="engine", doc="engine", default="creole") option_10 = StrOption(name="group", doc="group", default="root") -option_11 = StrOption(name="mode", doc="mode", default="0644") -option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_13 = StrOption(name="owner", doc="owner", default="root") -option_14 = StrOption(name="source", doc="source", default="file1") -option_15 = BoolOption(name="activate", doc="activate", default=True) -option_8 = OptionDescription(name="file1", doc="file1", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_11 = StrOption(name="include", doc="include", default="no") +option_12 = StrOption(name="mode", doc="mode", default="0644") +option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_14 = StrOption(name="owner", doc="owner", default="root") +option_15 = StrOption(name="source", doc="source", default="file1") +option_16 = BoolOption(name="activate", doc="activate", default=True) +option_8 = OptionDescription(name="file1", doc="file1", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_7 = OptionDescription(name="files", doc="files", children=[option_8]) option_6 = OptionDescription(name="test", doc="test", children=[option_7]) option_5 = OptionDescription(name="services", doc="services", children=[option_6], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabled_if_in_filelist/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist/makedict/base.json index 179cec85..0de278ad 100644 --- a/tests/dictionaries/11disabled_if_in_filelist/makedict/base.json +++ b/tests/dictionaries/11disabled_if_in_filelist/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": true, "services.test.files.file.engine": "creole", "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.activate": true} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": true, "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true} diff --git a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py index 3c47e546..91af9ddd 100644 --- a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/etc/file") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/etc/file") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabled_if_in_filelist_boolean/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_boolean/makedict/base.json index 03cb0a7f..cae59d2d 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_boolean/makedict/base.json +++ b/tests/dictionaries/11disabled_if_in_filelist_boolean/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": true, "services.test.files.file1.engine": "creole", "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.activate": false} +{"rougail.general.condition": true, "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11disabled_if_in_filelist_boolean/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_boolean/tiramisu/base.py index 34f2360a..c273a41b 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_boolean/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_boolean/tiramisu/base.py @@ -16,12 +16,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="file1") -option_14 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(True)}))) -option_7 = OptionDescription(name="file1", doc="file1", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file1") +option_15 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(True)}))) +option_7 = OptionDescription(name="file1", doc="file1", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) option_6 = OptionDescription(name="files", doc="files", children=[option_7]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabled_if_in_filelist_boolean2/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_boolean2/makedict/base.json index 4a46804d..003585f3 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_boolean2/makedict/base.json +++ b/tests/dictionaries/11disabled_if_in_filelist_boolean2/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": false, "services.test.files.file1.engine": "creole", "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.activate": true} +{"rougail.general.condition": false, "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": true} diff --git a/tests/dictionaries/11disabled_if_in_filelist_boolean2/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_boolean2/tiramisu/base.py index dc07321e..e260d25c 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_boolean2/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_boolean2/tiramisu/base.py @@ -16,12 +16,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="file1") -option_14 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(True)}))) -option_7 = OptionDescription(name="file1", doc="file1", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file1") +option_15 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(True)}))) +option_7 = OptionDescription(name="file1", doc="file1", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) option_6 = OptionDescription(name="files", doc="files", children=[option_7]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabled_if_in_filelist_disabled/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_disabled/makedict/base.json index 14a7791d..a5a68611 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_disabled/makedict/base.json +++ b/tests/dictionaries/11disabled_if_in_filelist_disabled/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "oui", "services.test.files.file.engine": "creole", "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.activate": false} +{"rougail.general.condition": "oui", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py index 5a23ff2e..2d696b73 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/etc/file") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/etc/file") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabled_if_in_filelist_multi/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_multi/makedict/base.json index 9c7ff3c9..003bfee7 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_multi/makedict/base.json +++ b/tests/dictionaries/11disabled_if_in_filelist_multi/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file1.engine": "creole", "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.activate": true, "services.test.files.file2.engine": "creole", "services.test.files.file2.group": "root", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/tmp/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": true, "services.test.files.file2.engine": "creole", "services.test.files.file2.group": "root", "services.test.files.file2.include": "no", "services.test.files.file2.mode": "0644", "services.test.files.file2.name": "/tmp/file2", "services.test.files.file2.owner": "root", "services.test.files.file2.source": "file2", "services.test.files.file2.activate": true} diff --git a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py index ba32e450..c17e9ab2 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py @@ -18,21 +18,23 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file1") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_18 = StrOption(name="engine", doc="engine", default="creole") -option_19 = StrOption(name="group", doc="group", default="root") -option_20 = StrOption(name="mode", doc="mode", default="0644") -option_21 = FilenameOption(name="name", doc="name", default="/tmp/file2") -option_22 = StrOption(name="owner", doc="owner", default="root") -option_23 = StrOption(name="source", doc="source", default="file2") -option_24 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_8 = OptionDescription(name="files", doc="files", children=[option_9, option_17]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file1") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), '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_17]) +option_19 = StrOption(name="engine", doc="engine", default="creole") +option_20 = StrOption(name="group", doc="group", default="root") +option_21 = StrOption(name="include", doc="include", default="no") +option_22 = StrOption(name="mode", doc="mode", default="0644") +option_23 = FilenameOption(name="name", doc="name", default="/tmp/file2") +option_24 = StrOption(name="owner", doc="owner", default="root") +option_25 = StrOption(name="source", doc="source", default="file2") +option_26 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("oui")}))) +option_18 = OptionDescription(name="file2", doc="file2", children=[option_19, option_20, option_21, option_22, option_23, option_24, option_25, option_26]) +option_8 = OptionDescription(name="files", doc="files", children=[option_9, option_18]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_6]) diff --git a/tests/dictionaries/11disabledifin_filelist_notexist/makedict/base.json b/tests/dictionaries/11disabledifin_filelist_notexist/makedict/base.json index 3d5308eb..1cf2605a 100644 --- a/tests/dictionaries/11disabledifin_filelist_notexist/makedict/base.json +++ b/tests/dictionaries/11disabledifin_filelist_notexist/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "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.activate": false} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py index 893abaca..a8939ba6 100644 --- a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("unpossible"), 'reverse_condition_0': ParamValue(True)}))) -option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("unpossible"), 'reverse_condition_0': ParamValue(True)}))) +option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist/makedict/base.json b/tests/dictionaries/11disabledifnotin_filelist_notexist/makedict/base.json index 3d5308eb..1cf2605a 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist/makedict/base.json +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "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.activate": false} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py index 893abaca..a8939ba6 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("unpossible"), 'reverse_condition_0': ParamValue(True)}))) -option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("unpossible"), 'reverse_condition_0': ParamValue(True)}))) +option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/makedict/base.json b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/makedict/base.json index 3d5308eb..1cf2605a 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/makedict/base.json +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "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.activate": false} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py index 63a05b2e..0ab35037 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("unpossible"), 'reverse_condition_0': ParamValue(True), 'condition_1': ParamOption(option_5), 'expected_1': ParamValue("oui"), 'reverse_condition_1': ParamValue(True), 'condition_operator': ParamValue("OR")}))) -option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("unpossible"), 'reverse_condition_0': ParamValue(True), 'condition_1': ParamOption(option_5), 'expected_1': ParamValue("oui"), 'reverse_condition_1': ParamValue(True), 'condition_operator': ParamValue("OR")}))) +option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/makedict/base.json b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/makedict/base.json index 3d5308eb..1cf2605a 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/makedict/base.json +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/makedict/base.json @@ -1 +1 @@ -{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "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.activate": false} +{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py index 60226f91..4ad06542 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py @@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_10 = StrOption(name="engine", doc="engine", default="creole") option_11 = StrOption(name="group", doc="group", default="root") -option_12 = StrOption(name="mode", doc="mode", default="0644") -option_13 = FilenameOption(name="name", doc="name", default="/tmp/file") -option_14 = StrOption(name="owner", doc="owner", default="root") -option_15 = StrOption(name="source", doc="source", default="file") -option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("statique"), 'reverse_condition_0': ParamValue(True)}))) -option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16]) +option_12 = StrOption(name="include", doc="include", default="no") +option_13 = StrOption(name="mode", doc="mode", default="0644") +option_14 = FilenameOption(name="name", doc="name", default="/tmp/file") +option_15 = StrOption(name="owner", doc="owner", default="root") +option_16 = StrOption(name="source", doc="source", default="file") +option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue("statique"), 'reverse_condition_0': ParamValue(True)}))) +option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) option_8 = OptionDescription(name="files", doc="files", children=[option_9]) option_7 = OptionDescription(name="test", doc="test", children=[option_8]) option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/11multi_disabled_if_in_filelist/makedict/base.json b/tests/dictionaries/11multi_disabled_if_in_filelist/makedict/base.json index 0ade809b..39da9390 100644 --- a/tests/dictionaries/11multi_disabled_if_in_filelist/makedict/base.json +++ b/tests/dictionaries/11multi_disabled_if_in_filelist/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "non", "services.test.files.file1.engine": "creole", "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.activate": false} +{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "non", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "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.activate": false} diff --git a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py index e3e4d898..fd10aa82 100644 --- a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py @@ -17,12 +17,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_9 = StrOption(name="engine", doc="engine", default="creole") option_10 = StrOption(name="group", doc="group", default="root") -option_11 = StrOption(name="mode", doc="mode", default="0644") -option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1") -option_13 = StrOption(name="owner", doc="owner", default="root") -option_14 = StrOption(name="source", doc="source", default="file1") -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_11 = StrOption(name="include", doc="include", default="no") +option_12 = StrOption(name="mode", doc="mode", default="0644") +option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1") +option_14 = StrOption(name="owner", doc="owner", default="root") +option_15 = StrOption(name="source", doc="source", default="file1") +option_16 = 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_16]) option_7 = OptionDescription(name="files", doc="files", children=[option_8]) option_6 = OptionDescription(name="test", doc="test", children=[option_7]) option_5 = OptionDescription(name="services", doc="services", children=[option_6], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/20notemplating/makedict/base.json b/tests/dictionaries/20notemplating/makedict/base.json index 722c0667..6fded8b9 100644 --- a/tests/dictionaries/20notemplating/makedict/base.json +++ b/tests/dictionaries/20notemplating/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "none", "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.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "none", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true} diff --git a/tests/dictionaries/20notemplating/tiramisu/base.py b/tests/dictionaries/20notemplating/tiramisu/base.py index 3ce2852f..26a30d80 100644 --- a/tests/dictionaries/20notemplating/tiramisu/base.py +++ b/tests/dictionaries/20notemplating/tiramisu/base.py @@ -16,12 +16,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3], option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="none") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/file") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="file") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/file") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="file") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) option_6 = OptionDescription(name="files", doc="files", children=[option_7]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/40ifin_leadershipauto/makedict/base.json b/tests/dictionaries/40ifin_leadershipauto/makedict/base.json index ff6a2a38..4fa9ff4d 100644 --- a/tests/dictionaries/40ifin_leadershipauto/makedict/base.json +++ b/tests/dictionaries/40ifin_leadershipauto/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "oui", "rougail.general.leader.leader": [{"rougail.general.leader.leader": "a", "rougail.general.leader.follower2": null}], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "oui", "rougail.general.leader.leader": [{"rougail.general.leader.leader": "a", "rougail.general.leader.follower2": null}], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true} diff --git a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py index 1e194d7b..81fa87b1 100644 --- a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py @@ -21,12 +21,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_13 = StrOption(name="engine", doc="engine", default="creole") option_14 = StrOption(name="group", doc="group", default="root") -option_15 = StrOption(name="mode", doc="mode", default="0644") -option_16 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_17 = StrOption(name="owner", doc="owner", default="root") -option_18 = StrOption(name="source", doc="source", default="mailname") -option_19 = BoolOption(name="activate", doc="activate", default=True) -option_12 = OptionDescription(name="mailname", doc="mailname", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19]) +option_15 = StrOption(name="include", doc="include", default="no") +option_16 = StrOption(name="mode", doc="mode", default="0644") +option_17 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_18 = StrOption(name="owner", doc="owner", default="root") +option_19 = StrOption(name="source", doc="source", default="mailname") +option_20 = BoolOption(name="activate", doc="activate", default=True) +option_12 = OptionDescription(name="mailname", doc="mailname", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20]) option_11 = OptionDescription(name="files", doc="files", children=[option_12]) option_10 = OptionDescription(name="test", doc="test", children=[option_11]) option_9 = OptionDescription(name="services", doc="services", children=[option_10], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/40ifin_leadershipauto_follower/makedict/base.json b/tests/dictionaries/40ifin_leadershipauto_follower/makedict/base.json index 3fa24062..8cc52a50 100644 --- a/tests/dictionaries/40ifin_leadershipauto_follower/makedict/base.json +++ b/tests/dictionaries/40ifin_leadershipauto_follower/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "oui", "rougail.general.leader.leader": [{"rougail.general.leader.leader": "a", "rougail.general.leader.follower2": null}, {"rougail.general.leader.leader": "b", "rougail.general.leader.follower1": null, "rougail.general.leader.follower2": null}], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": "/etc/mailname2", "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "rougail.general.condition": "oui", "rougail.general.leader.leader": [{"rougail.general.leader.leader": "a", "rougail.general.leader.follower2": null}, {"rougail.general.leader.leader": "b", "rougail.general.leader.follower1": null, "rougail.general.leader.follower2": null}], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.include": "no", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": "/etc/mailname2", "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} diff --git a/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py index 11bdb7a2..6acf182e 100644 --- a/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py @@ -21,21 +21,23 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_13 = StrOption(name="engine", doc="engine", default="creole") option_14 = StrOption(name="group", doc="group", default="root") -option_15 = StrOption(name="mode", doc="mode", default="0644") -option_16 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_17 = StrOption(name="owner", doc="owner", default="root") -option_18 = StrOption(name="source", doc="source", default="mailname") -option_19 = BoolOption(name="activate", doc="activate", default=True) -option_12 = OptionDescription(name="mailname", doc="mailname", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19]) -option_21 = StrOption(name="engine", doc="engine", default="jinja2") -option_22 = StrOption(name="group", doc="group", default="root") -option_23 = StrOption(name="mode", doc="mode", default="0644") -option_24 = FilenameOption(name="name", doc="name", default="/etc/mailname2") -option_25 = StrOption(name="owner", doc="owner", default="root") -option_26 = StrOption(name="source", doc="source", default="mailname2") -option_27 = BoolOption(name="activate", doc="activate", default=True) -option_20 = OptionDescription(name="mailname2", doc="mailname2", children=[option_21, option_22, option_23, option_24, option_25, option_26, option_27]) -option_11 = OptionDescription(name="files", doc="files", children=[option_12, option_20]) +option_15 = StrOption(name="include", doc="include", default="no") +option_16 = StrOption(name="mode", doc="mode", default="0644") +option_17 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_18 = StrOption(name="owner", doc="owner", default="root") +option_19 = StrOption(name="source", doc="source", default="mailname") +option_20 = BoolOption(name="activate", doc="activate", default=True) +option_12 = OptionDescription(name="mailname", doc="mailname", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20]) +option_22 = StrOption(name="engine", doc="engine", default="jinja2") +option_23 = StrOption(name="group", doc="group", default="root") +option_24 = StrOption(name="include", doc="include", default="no") +option_25 = StrOption(name="mode", doc="mode", default="0644") +option_26 = FilenameOption(name="name", doc="name", default="/etc/mailname2") +option_27 = StrOption(name="owner", doc="owner", default="root") +option_28 = StrOption(name="source", doc="source", default="mailname2") +option_29 = BoolOption(name="activate", doc="activate", default=True) +option_21 = OptionDescription(name="mailname2", doc="mailname2", children=[option_22, option_23, option_24, option_25, option_26, option_27, option_28, option_29]) +option_11 = OptionDescription(name="files", doc="files", children=[option_12, option_21]) option_10 = OptionDescription(name="test", doc="test", children=[option_11]) option_9 = OptionDescription(name="services", doc="services", children=[option_10], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_9]) diff --git a/tests/dictionaries/45extra_without_family/makedict/base.json b/tests/dictionaries/45extra_without_family/makedict/base.json index fa08f9ad..dfc21ff1 100644 --- a/tests/dictionaries/45extra_without_family/makedict/base.json +++ b/tests/dictionaries/45extra_without_family/makedict/base.json @@ -1 +1 @@ -{"rougail.my_var": "rougail", "extra.my_var": null, "services.test.files.file.engine": "creole", "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.activate": true} +{"rougail.my_var": "rougail", "extra.my_var": null, "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.include": "no", "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.activate": true} diff --git a/tests/dictionaries/45extra_without_family/tiramisu/base.py b/tests/dictionaries/45extra_without_family/tiramisu/base.py index 6b313e83..2fadc67d 100644 --- a/tests/dictionaries/45extra_without_family/tiramisu/base.py +++ b/tests/dictionaries/45extra_without_family/tiramisu/base.py @@ -17,12 +17,13 @@ option_4 = StrOption(name="my_var", doc="my_var", default=Calculation(func.calc_ option_3 = OptionDescription(name="extra", doc="extra", children=[option_4]) option_9 = StrOption(name="engine", doc="engine", default="creole") option_10 = StrOption(name="group", doc="group", default="root") -option_11 = StrOption(name="mode", doc="mode", default="0644") -option_12 = FilenameOption(name="name", doc="name", default="/etc/file") -option_13 = StrOption(name="owner", doc="owner", default="root") -option_14 = StrOption(name="source", doc="source", default="file") -option_15 = BoolOption(name="activate", doc="activate", default=True) -option_8 = OptionDescription(name="file", doc="file", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_11 = StrOption(name="include", doc="include", default="no") +option_12 = StrOption(name="mode", doc="mode", default="0644") +option_13 = FilenameOption(name="name", doc="name", default="/etc/file") +option_14 = StrOption(name="owner", doc="owner", default="root") +option_15 = StrOption(name="source", doc="source", default="file") +option_16 = BoolOption(name="activate", doc="activate", default=True) +option_8 = OptionDescription(name="file", doc="file", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_7 = OptionDescription(name="files", doc="files", children=[option_8]) option_6 = OptionDescription(name="test", doc="test", children=[option_7]) option_5 = OptionDescription(name="services", doc="services", children=[option_6], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/60extra_group/makedict/base.json b/tests/dictionaries/60extra_group/makedict/base.json index 263c7033..cdc69559 100644 --- a/tests/dictionaries/60extra_group/makedict/base.json +++ b/tests/dictionaries/60extra_group/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "rougail.general.activer_ejabberd": "non", "extra.ejabberd.description.description": [{"extra.ejabberd.description.description": "test", "extra.ejabberd.description.mode": "pre"}], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": "/etc/mailname2", "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "rougail.general.activer_ejabberd": "non", "extra.ejabberd.description.description": [{"extra.ejabberd.description.description": "test", "extra.ejabberd.description.mode": "pre"}], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.include": "no", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": "/etc/mailname2", "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} diff --git a/tests/dictionaries/60extra_group/tiramisu/base.py b/tests/dictionaries/60extra_group/tiramisu/base.py index 7b63628b..e611493d 100644 --- a/tests/dictionaries/60extra_group/tiramisu/base.py +++ b/tests/dictionaries/60extra_group/tiramisu/base.py @@ -22,21 +22,23 @@ option_6 = OptionDescription(name="ejabberd", doc="ejabberd", children=[option_7 option_5 = OptionDescription(name="extra", doc="extra", children=[option_6]) option_14 = StrOption(name="engine", doc="engine", default="creole") option_15 = StrOption(name="group", doc="group", default="root") -option_16 = StrOption(name="mode", doc="mode", default="0644") -option_17 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_18 = StrOption(name="owner", doc="owner", default="root") -option_19 = StrOption(name="source", doc="source", default="mailname") -option_20 = BoolOption(name="activate", doc="activate", default=True) -option_13 = OptionDescription(name="mailname", doc="mailname", children=[option_14, option_15, option_16, option_17, option_18, option_19, option_20]) -option_22 = StrOption(name="engine", doc="engine", default="jinja2") -option_23 = StrOption(name="group", doc="group", default="root") -option_24 = StrOption(name="mode", doc="mode", default="0644") -option_25 = FilenameOption(name="name", doc="name", default="/etc/mailname2") -option_26 = StrOption(name="owner", doc="owner", default="root") -option_27 = StrOption(name="source", doc="source", default="mailname2") -option_28 = BoolOption(name="activate", doc="activate", default=True) -option_21 = OptionDescription(name="mailname2", doc="mailname2", children=[option_22, option_23, option_24, option_25, option_26, option_27, option_28]) -option_12 = OptionDescription(name="files", doc="files", children=[option_13, option_21]) +option_16 = StrOption(name="include", doc="include", default="no") +option_17 = StrOption(name="mode", doc="mode", default="0644") +option_18 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_19 = StrOption(name="owner", doc="owner", default="root") +option_20 = StrOption(name="source", doc="source", default="mailname") +option_21 = BoolOption(name="activate", doc="activate", default=True) +option_13 = OptionDescription(name="mailname", doc="mailname", children=[option_14, option_15, option_16, option_17, option_18, option_19, option_20, option_21]) +option_23 = StrOption(name="engine", doc="engine", default="jinja2") +option_24 = StrOption(name="group", doc="group", default="root") +option_25 = StrOption(name="include", doc="include", default="no") +option_26 = StrOption(name="mode", doc="mode", default="0644") +option_27 = FilenameOption(name="name", doc="name", default="/etc/mailname2") +option_28 = StrOption(name="owner", doc="owner", default="root") +option_29 = StrOption(name="source", doc="source", default="mailname2") +option_30 = BoolOption(name="activate", doc="activate", default=True) +option_22 = OptionDescription(name="mailname2", doc="mailname2", children=[option_23, option_24, option_25, option_26, option_27, option_28, option_29, option_30]) +option_12 = OptionDescription(name="files", doc="files", children=[option_13, option_22]) option_11 = OptionDescription(name="test", doc="test", children=[option_12]) option_10 = OptionDescription(name="services", doc="services", children=[option_11], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_5, option_10]) diff --git a/tests/dictionaries/60extra_help/makedict/base.json b/tests/dictionaries/60extra_help/makedict/base.json index 41624085..c2b591a6 100644 --- a/tests/dictionaries/60extra_help/makedict/base.json +++ b/tests/dictionaries/60extra_help/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "rougail.general.activer_ejabberd": "non", "extra.ejabberd.description": "Exportation de la base de ejabberd", "extra.ejabberd.day": null, "extra.ejabberd.mode": "pre", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "rougail.general.activer_ejabberd": "non", "extra.ejabberd.description": "Exportation de la base de ejabberd", "extra.ejabberd.day": null, "extra.ejabberd.mode": "pre", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true} diff --git a/tests/dictionaries/60extra_help/tiramisu/base.py b/tests/dictionaries/60extra_help/tiramisu/base.py index b76df2e0..c9fd0488 100644 --- a/tests/dictionaries/60extra_help/tiramisu/base.py +++ b/tests/dictionaries/60extra_help/tiramisu/base.py @@ -23,12 +23,13 @@ option_6 = OptionDescription(name="ejabberd", doc="ejabberd", children=[option_7 option_5 = OptionDescription(name="extra", doc="extra", children=[option_6]) option_14 = StrOption(name="engine", doc="engine", default="creole") option_15 = StrOption(name="group", doc="group", default="root") -option_16 = StrOption(name="mode", doc="mode", default="0644") -option_17 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_18 = StrOption(name="owner", doc="owner", default="root") -option_19 = StrOption(name="source", doc="source", default="mailname") -option_20 = BoolOption(name="activate", doc="activate", default=True) -option_13 = OptionDescription(name="mailname", doc="mailname", children=[option_14, option_15, option_16, option_17, option_18, option_19, option_20]) +option_16 = StrOption(name="include", doc="include", default="no") +option_17 = StrOption(name="mode", doc="mode", default="0644") +option_18 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_19 = StrOption(name="owner", doc="owner", default="root") +option_20 = StrOption(name="source", doc="source", default="mailname") +option_21 = BoolOption(name="activate", doc="activate", default=True) +option_13 = OptionDescription(name="mailname", doc="mailname", children=[option_14, option_15, option_16, option_17, option_18, option_19, option_20, option_21]) option_12 = OptionDescription(name="files", doc="files", children=[option_13]) option_11 = OptionDescription(name="test", doc="test", children=[option_12]) option_10 = OptionDescription(name="services", doc="services", children=[option_11], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/70container_files/makedict/base.json b/tests/dictionaries/70container_files/makedict/base.json index da4649ab..4387c95b 100644 --- a/tests/dictionaries/70container_files/makedict/base.json +++ b/tests/dictionaries/70container_files/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.rougail_conf.engine": "creole", "services.test.files.rougail_conf.group": "root", "services.test.files.rougail_conf.mode": "0644", "services.test.files.rougail_conf.name": "/rougail.conf", "services.test.files.rougail_conf.owner": "root", "services.test.files.rougail_conf.source": "rougail.conf", "services.test.files.rougail_conf.activate": true} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.rougail_conf.engine": "creole", "services.test.files.rougail_conf.group": "root", "services.test.files.rougail_conf.include": "no", "services.test.files.rougail_conf.mode": "0644", "services.test.files.rougail_conf.name": "/rougail.conf", "services.test.files.rougail_conf.owner": "root", "services.test.files.rougail_conf.source": "rougail.conf", "services.test.files.rougail_conf.activate": true} diff --git a/tests/dictionaries/70container_files/tiramisu/base.py b/tests/dictionaries/70container_files/tiramisu/base.py index f23861a1..302cafbb 100644 --- a/tests/dictionaries/70container_files/tiramisu/base.py +++ b/tests/dictionaries/70container_files/tiramisu/base.py @@ -16,21 +16,23 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3 option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="mailname") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="creole") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = FilenameOption(name="name", doc="name", default="/rougail.conf") -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="rougail.conf") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="rougail_conf", doc="rougail.conf", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="mailname") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="creole") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/rougail.conf") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="rougail.conf") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="rougail_conf", doc="rougail.conf", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/70container_files_symlink_multi/makedict/base.json b/tests/dictionaries/70container_files_symlink_multi/makedict/base.json index 2b759eeb..889589da 100644 --- a/tests/dictionaries/70container_files_symlink_multi/makedict/base.json +++ b/tests/dictionaries/70container_files_symlink_multi/makedict/base.json @@ -1 +1 @@ -{"rougail.file_name": ["/etc/mailname", "/etc/mailname2"], "rougail.file_name2": ["/etc/mailname3", "/etc/mailname4"], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": ["/etc/mailname3", "/etc/mailname4"], "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} +{"rougail.file_name": ["/etc/mailname", "/etc/mailname2"], "rougail.file_name2": ["/etc/mailname3", "/etc/mailname4"], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.include": "no", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": ["/etc/mailname3", "/etc/mailname4"], "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} diff --git a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py index 81b7088e..e5dbc4f2 100644 --- a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py @@ -16,21 +16,23 @@ option_3 = FilenameOption(name="file_name2", doc="file_name2", multi=True, defau option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = SymLinkOption(name="name", opt=option_2) -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="mailname") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="jinja2") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = SymLinkOption(name="name", opt=option_3) -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="mailname2") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="mailname2", doc="mailname2", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = SymLinkOption(name="name", opt=option_2) +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="mailname") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = SymLinkOption(name="name", opt=option_3) +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="mailname2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="mailname2", doc="mailname2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/70container_files_symlink_multi_variable/makedict/base.json b/tests/dictionaries/70container_files_symlink_multi_variable/makedict/base.json index c1680806..ec299637 100644 --- a/tests/dictionaries/70container_files_symlink_multi_variable/makedict/base.json +++ b/tests/dictionaries/70container_files_symlink_multi_variable/makedict/base.json @@ -1 +1 @@ -{"rougail.file_name": ["/etc/mailname", "/etc/mailname2"], "rougail.file_name2": ["/etc/mailname3", "/etc/mailname4"], "rougail.var": ["mailname", "mailname2"], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.variable": ["mailname", "mailname2"], "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": ["/etc/mailname3", "/etc/mailname4"], "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.variable": ["mailname", "mailname2"], "services.test.files.mailname2.activate": true} +{"rougail.file_name": ["/etc/mailname", "/etc/mailname2"], "rougail.file_name2": ["/etc/mailname3", "/etc/mailname4"], "rougail.var": ["mailname", "mailname2"], "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.variable": ["mailname", "mailname2"], "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "jinja2", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.include": "no", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": ["/etc/mailname3", "/etc/mailname4"], "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.variable": ["mailname", "mailname2"], "services.test.files.mailname2.activate": true} diff --git a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py index 53db93a4..03aa12ed 100644 --- a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py @@ -17,23 +17,25 @@ option_4 = StrOption(name="var", doc="var", multi=True, default=['mailname', 'ma option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, option_4]) option_9 = StrOption(name="engine", doc="engine", default="creole") option_10 = StrOption(name="group", doc="group", default="root") -option_11 = StrOption(name="mode", doc="mode", default="0644") -option_12 = SymLinkOption(name="name", opt=option_2) -option_13 = StrOption(name="owner", doc="owner", default="root") -option_14 = StrOption(name="source", doc="source", default="mailname") -option_15 = SymLinkOption(name="variable", opt=option_4) -option_16 = BoolOption(name="activate", doc="activate", default=True) -option_8 = OptionDescription(name="mailname", doc="mailname", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15, option_16]) -option_18 = StrOption(name="engine", doc="engine", default="jinja2") -option_19 = StrOption(name="group", doc="group", default="root") -option_20 = StrOption(name="mode", doc="mode", default="0644") -option_21 = SymLinkOption(name="name", opt=option_3) -option_22 = StrOption(name="owner", doc="owner", default="root") -option_23 = StrOption(name="source", doc="source", default="mailname2") -option_24 = SymLinkOption(name="variable", opt=option_4) -option_25 = BoolOption(name="activate", doc="activate", default=True) -option_17 = OptionDescription(name="mailname2", doc="mailname2", children=[option_18, option_19, option_20, option_21, option_22, option_23, option_24, option_25]) -option_7 = OptionDescription(name="files", doc="files", children=[option_8, option_17]) +option_11 = StrOption(name="include", doc="include", default="no") +option_12 = StrOption(name="mode", doc="mode", default="0644") +option_13 = SymLinkOption(name="name", opt=option_2) +option_14 = StrOption(name="owner", doc="owner", default="root") +option_15 = StrOption(name="source", doc="source", default="mailname") +option_16 = SymLinkOption(name="variable", opt=option_4) +option_17 = BoolOption(name="activate", doc="activate", default=True) +option_8 = OptionDescription(name="mailname", doc="mailname", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17]) +option_19 = StrOption(name="engine", doc="engine", default="jinja2") +option_20 = StrOption(name="group", doc="group", default="root") +option_21 = StrOption(name="include", doc="include", default="no") +option_22 = StrOption(name="mode", doc="mode", default="0644") +option_23 = SymLinkOption(name="name", opt=option_3) +option_24 = StrOption(name="owner", doc="owner", default="root") +option_25 = StrOption(name="source", doc="source", default="mailname2") +option_26 = SymLinkOption(name="variable", opt=option_4) +option_27 = BoolOption(name="activate", doc="activate", default=True) +option_18 = OptionDescription(name="mailname2", doc="mailname2", children=[option_19, option_20, option_21, option_22, option_23, option_24, option_25, option_26, option_27]) +option_7 = OptionDescription(name="files", doc="files", children=[option_8, option_18]) option_6 = OptionDescription(name="test", doc="test", children=[option_7]) option_5 = OptionDescription(name="services", doc="services", children=[option_6], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_5]) diff --git a/tests/dictionaries/70container_files_symlink_variable/makedict/base.json b/tests/dictionaries/70container_files_symlink_variable/makedict/base.json index 9fa41112..a901d1f0 100644 --- a/tests/dictionaries/70container_files_symlink_variable/makedict/base.json +++ b/tests/dictionaries/70container_files_symlink_variable/makedict/base.json @@ -1 +1 @@ -{"rougail.file_name": "/etc/mailname", "rougail.var": "mailname", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.variable": "mailname", "services.test.files.mailname.activate": true} +{"rougail.file_name": "/etc/mailname", "rougail.var": "mailname", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.variable": "mailname", "services.test.files.mailname.activate": true} diff --git a/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py index 583cb559..51c7001c 100644 --- a/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py @@ -16,13 +16,14 @@ option_3 = StrOption(name="var", doc="var", default="mailname", properties=froze option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = SymLinkOption(name="name", opt=option_2) -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="mailname") -option_14 = SymLinkOption(name="variable", opt=option_3) -option_15 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = SymLinkOption(name="name", opt=option_2) +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="mailname") +option_15 = SymLinkOption(name="variable", opt=option_3) +option_16 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15, option_16]) option_6 = OptionDescription(name="files", doc="files", children=[option_7]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/70container_files_twice/makedict/base.json b/tests/dictionaries/70container_files_twice/makedict/base.json index 590ce473..048621e9 100644 --- a/tests/dictionaries/70container_files_twice/makedict/base.json +++ b/tests/dictionaries/70container_files_twice/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname_1.engine": "creole", "services.test.files.mailname_1.group": "root", "services.test.files.mailname_1.mode": "0644", "services.test.files.mailname_1.name": "/etc/eole/mailname", "services.test.files.mailname_1.owner": "root", "services.test.files.mailname_1.source": "mailname", "services.test.files.mailname_1.activate": true, "services.test.files.rougail_conf.engine": "creole", "services.test.files.rougail_conf.group": "root", "services.test.files.rougail_conf.mode": "0644", "services.test.files.rougail_conf.name": "/rougail.conf", "services.test.files.rougail_conf.owner": "root", "services.test.files.rougail_conf.source": "rougail.conf", "services.test.files.rougail_conf.activate": true} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname_1.engine": "creole", "services.test.files.mailname_1.group": "root", "services.test.files.mailname_1.include": "no", "services.test.files.mailname_1.mode": "0644", "services.test.files.mailname_1.name": "/etc/eole/mailname", "services.test.files.mailname_1.owner": "root", "services.test.files.mailname_1.source": "mailname", "services.test.files.mailname_1.activate": true, "services.test.files.rougail_conf.engine": "creole", "services.test.files.rougail_conf.group": "root", "services.test.files.rougail_conf.include": "no", "services.test.files.rougail_conf.mode": "0644", "services.test.files.rougail_conf.name": "/rougail.conf", "services.test.files.rougail_conf.owner": "root", "services.test.files.rougail_conf.source": "rougail.conf", "services.test.files.rougail_conf.activate": true} diff --git a/tests/dictionaries/70container_files_twice/tiramisu/base.py b/tests/dictionaries/70container_files_twice/tiramisu/base.py index 00218657..86051524 100644 --- a/tests/dictionaries/70container_files_twice/tiramisu/base.py +++ b/tests/dictionaries/70container_files_twice/tiramisu/base.py @@ -16,29 +16,32 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3 option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="mailname") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="creole") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = FilenameOption(name="name", doc="name", default="/etc/eole/mailname") -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="mailname") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="mailname_1", doc="mailname_1", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_24 = StrOption(name="engine", doc="engine", default="creole") -option_25 = StrOption(name="group", doc="group", default="root") -option_26 = StrOption(name="mode", doc="mode", default="0644") -option_27 = FilenameOption(name="name", doc="name", default="/rougail.conf") -option_28 = StrOption(name="owner", doc="owner", default="root") -option_29 = StrOption(name="source", doc="source", default="rougail.conf") -option_30 = BoolOption(name="activate", doc="activate", default=True) -option_23 = OptionDescription(name="rougail_conf", doc="rougail.conf", children=[option_24, option_25, option_26, option_27, option_28, option_29, option_30]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15, option_23]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="mailname") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="creole") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/eole/mailname") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="mailname") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="mailname_1", doc="mailname_1", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_26 = StrOption(name="engine", doc="engine", default="creole") +option_27 = StrOption(name="group", doc="group", default="root") +option_28 = StrOption(name="include", doc="include", default="no") +option_29 = StrOption(name="mode", doc="mode", default="0644") +option_30 = FilenameOption(name="name", doc="name", default="/rougail.conf") +option_31 = StrOption(name="owner", doc="owner", default="root") +option_32 = StrOption(name="source", doc="source", default="rougail.conf") +option_33 = BoolOption(name="activate", doc="activate", default=True) +option_25 = OptionDescription(name="rougail_conf", doc="rougail.conf", children=[option_26, option_27, option_28, option_29, option_30, option_31, option_32, option_33]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16, option_25]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/70container_filesmulti/makedict/base.json b/tests/dictionaries/70container_filesmulti/makedict/base.json index 1446b24c..1b4247d5 100644 --- a/tests/dictionaries/70container_filesmulti/makedict/base.json +++ b/tests/dictionaries/70container_filesmulti/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "creole", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": "/etc/mailname2", "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.include": "no", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.activate": true, "services.test.files.mailname2.engine": "creole", "services.test.files.mailname2.group": "root", "services.test.files.mailname2.include": "no", "services.test.files.mailname2.mode": "0644", "services.test.files.mailname2.name": "/etc/mailname2", "services.test.files.mailname2.owner": "root", "services.test.files.mailname2.source": "mailname2", "services.test.files.mailname2.activate": true} diff --git a/tests/dictionaries/70container_filesmulti/tiramisu/base.py b/tests/dictionaries/70container_filesmulti/tiramisu/base.py index d3357eaa..45aa826b 100644 --- a/tests/dictionaries/70container_filesmulti/tiramisu/base.py +++ b/tests/dictionaries/70container_filesmulti/tiramisu/base.py @@ -16,21 +16,23 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3 option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="mailname") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) -option_16 = StrOption(name="engine", doc="engine", default="creole") -option_17 = StrOption(name="group", doc="group", default="root") -option_18 = StrOption(name="mode", doc="mode", default="0644") -option_19 = FilenameOption(name="name", doc="name", default="/etc/mailname2") -option_20 = StrOption(name="owner", doc="owner", default="root") -option_21 = StrOption(name="source", doc="source", default="mailname2") -option_22 = BoolOption(name="activate", doc="activate", default=True) -option_15 = OptionDescription(name="mailname2", doc="mailname2", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22]) -option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_15]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="mailname") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) +option_17 = StrOption(name="engine", doc="engine", default="creole") +option_18 = StrOption(name="group", doc="group", default="root") +option_19 = StrOption(name="include", doc="include", default="no") +option_20 = StrOption(name="mode", doc="mode", default="0644") +option_21 = FilenameOption(name="name", doc="name", default="/etc/mailname2") +option_22 = StrOption(name="owner", doc="owner", default="root") +option_23 = StrOption(name="source", doc="source", default="mailname2") +option_24 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="mailname2", doc="mailname2", children=[option_17, option_18, option_19, option_20, option_21, option_22, option_23, option_24]) +option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_16]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/70container_filesredefine/makedict/base.json b/tests/dictionaries/70container_filesredefine/makedict/base.json index 23c40f8a..99087ab5 100644 --- a/tests/dictionaries/70container_filesredefine/makedict/base.json +++ b/tests/dictionaries/70container_filesredefine/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname_new.engine": "creole", "services.test.files.mailname_new.group": "root", "services.test.files.mailname_new.mode": "0644", "services.test.files.mailname_new.name": "/etc/mailname", "services.test.files.mailname_new.owner": "root", "services.test.files.mailname_new.source": "mailname.new", "services.test.files.mailname_new.activate": true} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname_new.engine": "creole", "services.test.files.mailname_new.group": "root", "services.test.files.mailname_new.include": "no", "services.test.files.mailname_new.mode": "0644", "services.test.files.mailname_new.name": "/etc/mailname", "services.test.files.mailname_new.owner": "root", "services.test.files.mailname_new.source": "mailname.new", "services.test.files.mailname_new.activate": true} diff --git a/tests/dictionaries/70container_filesredefine/tiramisu/base.py b/tests/dictionaries/70container_filesredefine/tiramisu/base.py index a6996d4e..47170465 100644 --- a/tests/dictionaries/70container_filesredefine/tiramisu/base.py +++ b/tests/dictionaries/70container_filesredefine/tiramisu/base.py @@ -16,12 +16,13 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3 option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_8 = StrOption(name="engine", doc="engine", default="creole") option_9 = StrOption(name="group", doc="group", default="root") -option_10 = StrOption(name="mode", doc="mode", default="0644") -option_11 = FilenameOption(name="name", doc="name", default="/etc/mailname") -option_12 = StrOption(name="owner", doc="owner", default="root") -option_13 = StrOption(name="source", doc="source", default="mailname.new") -option_14 = BoolOption(name="activate", doc="activate", default=True) -option_7 = OptionDescription(name="mailname_new", doc="mailname.new", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14]) +option_10 = StrOption(name="include", doc="include", default="no") +option_11 = StrOption(name="mode", doc="mode", default="0644") +option_12 = FilenameOption(name="name", doc="name", default="/etc/mailname") +option_13 = StrOption(name="owner", doc="owner", default="root") +option_14 = StrOption(name="source", doc="source", default="mailname.new") +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="mailname_new", doc="mailname.new", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15]) option_6 = OptionDescription(name="files", doc="files", children=[option_7]) option_5 = OptionDescription(name="test", doc="test", children=[option_6]) option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"})) diff --git a/tests/dictionaries/70service_not_managed/makedict/base.json b/tests/dictionaries/70service_not_managed/makedict/base.json index 08e24b75..03a2d79b 100644 --- a/tests/dictionaries/70service_not_managed/makedict/base.json +++ b/tests/dictionaries/70service_not_managed/makedict/base.json @@ -1 +1 @@ -{"rougail.var": "mailname", "services.test.files.test.engine": "creole", "services.test.files.test.group": "root", "services.test.files.test.mode": "0644", "services.test.files.test.name": "/tmp/test", "services.test.files.test.owner": "root", "services.test.files.test.source": "test", "services.test.files.test.activate": true} +{"rougail.var": "mailname", "services.test.files.test.engine": "creole", "services.test.files.test.group": "root", "services.test.files.test.include": "no", "services.test.files.test.mode": "0644", "services.test.files.test.name": "/tmp/test", "services.test.files.test.owner": "root", "services.test.files.test.source": "test", "services.test.files.test.activate": true} diff --git a/tests/dictionaries/70service_not_managed/tiramisu/base.py b/tests/dictionaries/70service_not_managed/tiramisu/base.py index 273eec8d..499c0bd5 100644 --- a/tests/dictionaries/70service_not_managed/tiramisu/base.py +++ b/tests/dictionaries/70service_not_managed/tiramisu/base.py @@ -15,12 +15,13 @@ option_2 = StrOption(name="var", doc="var", default="mailname", properties=froze option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_7 = StrOption(name="engine", doc="engine", default="creole") option_8 = StrOption(name="group", doc="group", default="root") -option_9 = StrOption(name="mode", doc="mode", default="0644") -option_10 = FilenameOption(name="name", doc="name", default="/tmp/test") -option_11 = StrOption(name="owner", doc="owner", default="root") -option_12 = StrOption(name="source", doc="source", default="test") -option_13 = BoolOption(name="activate", doc="activate", default=True) -option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_8, option_9, option_10, option_11, option_12, option_13]) +option_9 = StrOption(name="include", doc="include", default="no") +option_10 = StrOption(name="mode", doc="mode", default="0644") +option_11 = FilenameOption(name="name", doc="name", default="/tmp/test") +option_12 = StrOption(name="owner", doc="owner", default="root") +option_13 = StrOption(name="source", doc="source", default="test") +option_14 = BoolOption(name="activate", doc="activate", default=True) +option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_8, option_9, option_10, option_11, option_12, option_13, option_14]) option_5 = OptionDescription(name="files", doc="files", children=[option_6]) option_4 = OptionDescription(name="test", doc="test", children=[option_5]) option_4.impl_set_information('manage', False) diff --git a/tests/test_3_template.py b/tests/test_3_template.py index 6f5eefed..a637cf0e 100644 --- a/tests/test_3_template.py +++ b/tests/test_3_template.py @@ -88,6 +88,6 @@ async def test_dictionary(test_dir): result_file = fh.read() with open(template_file, 'r') as fh: generated_file = fh.read() - assert result_file == generated_file + assert result_file == generated_file, f'{template_file} content : \n{generated_file}\nexpected: \nresult_file\n' rmtree(dest_dir) rmtree(tmp_dir)