From e6afef6a81ef90a261bfc88be28001592dea3dbc Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 21 Feb 2021 19:48:30 +0100 Subject: [PATCH] add servicelist --- doc/README.md | 1 - doc/condition/condition.md | 2 +- doc/condition/conditions.md | 2 +- doc/service/file.md | 2 +- doc/service/port.md | 65 ------------------- doc/service/service.md | 26 +++++++- doc/target/list.md | 16 ++--- src/rougail/annotator/service.py | 26 +++++++- src/rougail/data/rougail.dtd | 3 +- src/rougail/template/base.py | 11 +++- src/rougail/template/systemd.py | 14 ++-- tests/dictionaries/00empty/makedict/base.json | 1 + tests/dictionaries/00empty/tiramisu/base.py | 4 +- .../01base_file/makedict/base.json | 2 +- .../dictionaries/01base_file/tiramisu/base.py | 4 +- .../01base_file_include/makedict/base.json | 2 +- .../01base_file_include/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../01base_file_include_name/tiramisu/base.py | 4 +- .../01base_file_patch/makedict/base.json | 2 +- .../01base_file_patch/tiramisu/base.py | 4 +- .../01base_file_utfchar/makedict/base.json | 2 +- .../01base_file_utfchar/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../20notemplating/makedict/base.json | 2 +- .../20notemplating/tiramisu/base.py | 4 +- .../20override/makedict/base.json | 2 +- .../dictionaries/20override/tiramisu/base.py | 22 ++++--- .../makedict/base.json | 2 +- .../20override_no_templating/tiramisu/base.py | 4 +- .../20override_source/makedict/base.json | 2 +- .../20override_source/tiramisu/base.py | 4 +- .../40ifin_leadershipauto/makedict/base.json | 2 +- .../40ifin_leadershipauto/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../45extra_without_family/makedict/base.json | 2 +- .../45extra_without_family/tiramisu/base.py | 4 +- .../60extra_group/makedict/base.json | 2 +- .../60extra_group/tiramisu/base.py | 4 +- .../60extra_help/makedict/base.json | 2 +- .../60extra_help/tiramisu/base.py | 4 +- .../70container_files/makedict/base.json | 2 +- .../70container_files/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../70container_files_twice/tiramisu/base.py | 4 +- .../70container_filesmulti/makedict/base.json | 2 +- .../70container_filesmulti/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- .../70container_new/makedict/base.json | 2 +- .../70container_new/tiramisu/base.py | 4 +- .../70container_newnocont/makedict/base.json | 2 +- .../70container_newnocont/tiramisu/base.py | 4 +- .../70container_newwithip/makedict/base.json | 2 +- .../70container_newwithip/tiramisu/base.py | 4 +- .../70container_services/makedict/base.json | 1 - .../00-base.xml | 0 .../__init__.py | 0 .../70service_base/makedict/base.json | 1 + .../tiramisu/base.py | 4 +- .../70service_not_managed/makedict/base.json | 2 +- .../70service_not_managed/tiramisu/base.py | 5 +- .../70service_servicelist/00-base.xml | 22 +++++++ .../70service_servicelist/__init__.py | 0 .../70service_servicelist/makedict/base.json | 1 + .../70service_servicelist/tiramisu/base.py | 20 ++++++ .../70service_servicelist_file/00-base.xml | 24 +++++++ .../70service_servicelist_file/__init__.py | 0 .../makedict/base.json | 1 + .../result/systemd/system/test.service | 1 + .../result/tmpfiles.d/rougail.conf | 0 .../tiramisu/base.py | 31 +++++++++ .../70service_servicelist_file/tmpl/file | 1 + .../70service_servicelist_ip/00-base.xml | 24 +++++++ .../70service_servicelist_ip/__init__.py | 0 .../makedict/base.json | 1 + .../result/systemd/system/test.service | 1 + .../result/tmpfiles.d/rougail.conf | 0 .../70service_servicelist_ip/tiramisu/base.py | 25 +++++++ .../00-base.xml | 22 +++++++ .../__init__.py | 0 .../makedict/base.json | 1 + .../tiramisu/base.py | 20 ++++++ .../70services_ip/makedict/base.json | 2 +- .../70services_ip/tiramisu/base.py | 4 +- .../70services_ip_cidr/makedict/base.json | 2 +- .../70services_ip_cidr/tiramisu/base.py | 4 +- .../70services_ip_iplist/makedict/base.json | 2 +- .../70services_ip_iplist/tiramisu/base.py | 4 +- .../70services_ip_iplist2/makedict/base.json | 2 +- .../70services_ip_iplist2/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../70services_ip_leadership/tiramisu/base.py | 4 +- .../70services_ip_multi/makedict/base.json | 2 +- .../70services_ip_multi/tiramisu/base.py | 4 +- .../70services_ip_network/makedict/base.json | 2 +- .../70services_ip_network/tiramisu/base.py | 4 +- .../makedict/base.json | 2 +- .../tiramisu/base.py | 4 +- tests/test_3_template.py | 4 +- 144 files changed, 505 insertions(+), 204 deletions(-) delete mode 100644 doc/service/port.md create mode 100644 tests/dictionaries/00empty/makedict/base.json delete mode 100644 tests/dictionaries/70container_services/makedict/base.json rename tests/dictionaries/{70container_services => 70service_base}/00-base.xml (100%) rename tests/dictionaries/{70container_services => 70service_base}/__init__.py (100%) create mode 100644 tests/dictionaries/70service_base/makedict/base.json rename tests/dictionaries/{70container_services => 70service_base}/tiramisu/base.py (87%) create mode 100644 tests/dictionaries/70service_servicelist/00-base.xml create mode 100644 tests/dictionaries/70service_servicelist/__init__.py create mode 100644 tests/dictionaries/70service_servicelist/makedict/base.json create mode 100644 tests/dictionaries/70service_servicelist/tiramisu/base.py create mode 100644 tests/dictionaries/70service_servicelist_file/00-base.xml create mode 100644 tests/dictionaries/70service_servicelist_file/__init__.py create mode 100644 tests/dictionaries/70service_servicelist_file/makedict/base.json create mode 120000 tests/dictionaries/70service_servicelist_file/result/systemd/system/test.service create mode 100644 tests/dictionaries/70service_servicelist_file/result/tmpfiles.d/rougail.conf create mode 100644 tests/dictionaries/70service_servicelist_file/tiramisu/base.py create mode 100644 tests/dictionaries/70service_servicelist_file/tmpl/file create mode 100644 tests/dictionaries/70service_servicelist_ip/00-base.xml create mode 100644 tests/dictionaries/70service_servicelist_ip/__init__.py create mode 100644 tests/dictionaries/70service_servicelist_ip/makedict/base.json create mode 120000 tests/dictionaries/70service_servicelist_ip/result/systemd/system/test.service create mode 100644 tests/dictionaries/70service_servicelist_ip/result/tmpfiles.d/rougail.conf create mode 100644 tests/dictionaries/70service_servicelist_ip/tiramisu/base.py create mode 100644 tests/dictionaries/70service_servicelist_not_managed/00-base.xml create mode 100644 tests/dictionaries/70service_servicelist_not_managed/__init__.py create mode 100644 tests/dictionaries/70service_servicelist_not_managed/makedict/base.json create mode 100644 tests/dictionaries/70service_servicelist_not_managed/tiramisu/base.py diff --git a/doc/README.md b/doc/README.md index a9e5253a..0faf2312 100644 --- a/doc/README.md +++ b/doc/README.md @@ -21,7 +21,6 @@ Rougail est un bibliothèque python3 qui permet de charger des dictionnaires (fi - [La gestion d'un fichier](service/file.md) - [La gestion d'un fichier de service systemd](service/override.md) - - [La gestion d'un port](service/port.md) - [La gestion d'une ip](service/ip.md) ### Les contraintes diff --git a/doc/condition/condition.md b/doc/condition/condition.md index f667072e..37198d86 100644 --- a/doc/condition/condition.md +++ b/doc/condition/condition.md @@ -2,7 +2,7 @@ ## Un condition -Les conditions permettent d'ajouter ou de supprimer des propriétés à une [variable](../variable/README.md), une [famille](../family/README.md), un [fichier](../service/file.md), un [port](../service/port.md) ou une [ip](../service/ip.md) suivant le contexte. +Les conditions permettent d'ajouter ou de supprimer des propriétés à une [variable](../variable/README.md), une [famille](../family/README.md), un [service](../service/service.md), un [fichier](../service/file.md) ou une [ip](../service/ip.md) suivant le contexte. Nous allons nous concentrer ici sur la condition hidden_if_in, mais [il existe d'autre conditions](conditions.md). diff --git a/doc/condition/conditions.md b/doc/condition/conditions.md index f8f84a56..2dfc25f3 100644 --- a/doc/condition/conditions.md +++ b/doc/condition/conditions.md @@ -16,7 +16,7 @@ Il est possible de désactiver une [variable](../variable/README.md) ou une [fam ## Caché -Il est possible de cacher une [variable](../variable/README.md), une [famille](../family/README.md), un [fichier](../service/file.md), un [port](../service/port.md) ou une [ip](../service/ip.md) avec les conditions : +Il est possible de cacher une [variable](../variable/README.md), une [famille](../family/README.md), un [service](../service/service.md), un [fichier](../service/file.md) ou une [ip](../service/ip.md) avec les conditions : - hidden_if_in - hidden_if_not_in diff --git a/doc/service/file.md b/doc/service/file.md index 1b722f6a..d62697e5 100644 --- a/doc/service/file.md +++ b/doc/service/file.md @@ -124,7 +124,7 @@ Il est possible de définir une [condition](../condition/README.md) de type "dis ``` -Dans ce cas, tous les fichiers avec un attribut filelist à "squid" seront désactivé si la variable "condition" est False. +Dans ce cas, tous les fichiers avec un attribut filelist à "squid" seront désactivés si la variable "condition" est False. ## Redéfinir une fichier diff --git a/doc/service/port.md b/doc/service/port.md deleted file mode 100644 index 7a5b6f1d..00000000 --- a/doc/service/port.md +++ /dev/null @@ -1,65 +0,0 @@ -# La gestion d'un port - -## La balise port - -La gestion des ports se fait dans un conteneur de [service](service.md). - -La balise port permet d'associer un port à service : - -``` - - - 3128 - - -``` - -Il est possible de choisir le protocole TCP ou UDP (TCP par défaut) : - -``` -123 -``` - -## Les numéros de port dynamique - -Il est possible également de définir le port dans une variable : - -``` - - - my_variable - - - - - 123 - - -``` - -Attention, la variable doit être de type "port". - -## Désactiver le port - -Il est possible de définir une [condition](../condition/README.md) de type "disabled_if_in" ou "disabled_if_not_in" sur une balise port : - -``` - - - 3128 - - - - - - - - - - False - squid - - -``` - -Dans ce cas, tous les ports avec un attribut portlist à "squid" seront désactivé si la variable "condition" est False. diff --git a/doc/service/service.md b/doc/service/service.md index d79e2b22..06473ea8 100644 --- a/doc/service/service.md +++ b/doc/service/service.md @@ -1,8 +1,10 @@ # La gestion d'un service +## La base service + Un service est inclut dans un conteneur [services](../services.md). -Cette balise permet de définir tous les éléments (fichier, port, IP, ...) lié à un service ou à démon. +Cette balise permet de définir tous les éléments ([fichier](file.md), [IP](ip.md), ...) liés à un service ou à démon. Il faut, à la création du service, préciser son nom : @@ -24,3 +26,25 @@ Un service peut ne pas être géré : Un service non géré est généralement une service qui n'existe pas réellement (par exemple si on configure un client). Un service non géré ne peut conteneur que des fichiers. + +## Désactiver la génération d'un service + +Il est possible de définir une [condition](../condition/README.md) de type "disabled_if_in" ou "disabled_if_not_in" sur une balise service : + +``` + + + + + + + + + + False + test + + +``` + +Dans ce cas, tous les services et les éléments qu'il compose ([fichier](file.md), ...) avec un attribut servicelist à "test" seront désactivés si la variable "condition" est False. diff --git a/doc/target/list.md b/doc/target/list.md index eefb327d..bff8305f 100644 --- a/doc/target/list.md +++ b/doc/target/list.md @@ -2,6 +2,14 @@ ## Les différences cible de type \*.list +### servicelist + +Une cible peut être de type [service](../service/service.md) : + +``` +example +``` + ### filelist Une cible peut être de type [fichier](../service/file.md) : @@ -10,14 +18,6 @@ Une cible peut être de type [fichier](../service/file.md) : example ``` -### portlist - -Une cible peut être de type [port](../service/port.md) : - -``` -example -``` - ### iplist Une cible peut être de type [ip](../service/ip.md) : diff --git a/src/rougail/annotator/service.py b/src/rougail/annotator/service.py index 2639972b..e75c3170 100644 --- a/src/rougail/annotator/service.py +++ b/src/rougail/annotator/service.py @@ -70,10 +70,21 @@ class ServiceAnnotator: self.objectspace.space.services.doc = 'services' self.objectspace.space.services.path = 'services' for service_name, service in self.objectspace.space.services.service.items(): - if not service.manage: - service.information = self.objectspace.information(service.xmlfiles) - service.information.manage = service.manage + activate_obj = self._generate_element('boolean', + None, + None, + 'activate', + True, + service, + '.'.join(['services', normalize_family(service_name), 'activate']), + ) for elttype, values in dict(vars(service)).items(): + if elttype == 'servicelist': + self.objectspace.list_conditions.setdefault('servicelist', + {}).setdefault( + values, + []).append(activate_obj) + continue if not isinstance(values, (dict, list)) or elttype in ERASED_ATTRIBUTES: continue if not service.manage and elttype not in ALLOW_ATTRIBUT_NOT_MANAGE: @@ -96,6 +107,15 @@ class ServiceAnnotator: path, ) setattr(service, elttype, family) + manage = self._generate_element('boolean', + None, + None, + 'manage', + service.manage, + service, + '.'.join(['services', normalize_family(service_name), 'manage']), + ) + service.variable = [activate_obj, manage] service.doc = service.name def make_group_from_elts(self, diff --git a/src/rougail/data/rougail.dtd b/src/rougail/data/rougail.dtd index 1a9d0421..8fbb6c05 100644 --- a/src/rougail/data/rougail.dtd +++ b/src/rougail/data/rougail.dtd @@ -49,6 +49,7 @@ + @@ -126,7 +127,7 @@ - + diff --git a/src/rougail/template/base.py b/src/rougail/template/base.py index 7623daf5..35fe8232 100644 --- a/src/rougail/template/base.py +++ b/src/rougail/template/base.py @@ -289,7 +289,11 @@ class RougailBaseTemplate: for included 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'): + if await service_obj.option('activate').value.get() is False: + if included is False: + self.desactive_service(service_name) + continue + for fills in await service_obj.list('optiondescription'): type_ = await fills.option.name() for fill_obj in await fills.list('all'): fill = await fill_obj.value.dict() @@ -306,6 +310,11 @@ class RougailBaseTemplate: self.post_instance() chdir(ori_dir) + def desactive_service(self, + service_name: str, + ): + raise NotImplementedError(_('cannot desactivate a service')) + def post_instance(self): # pragma: no cover pass diff --git a/src/rougail/template/systemd.py b/src/rougail/template/systemd.py index 1693a90a..e5ec065e 100644 --- a/src/rougail/template/systemd.py +++ b/src/rougail/template/systemd.py @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from typing import Dict -from os import makedirs +from os import makedirs, symlink from os.path import dirname, isfile, join from ipaddress import ip_network @@ -45,9 +45,9 @@ z %%filename - - - - - %end if %end def %for %%service in %%services - %if %%hasattr(%%service, 'files') + %if %%service.activate is True and %%hasattr(%%service, 'files') %for %%file in %%service.files - %if %%file.activate == True and %%file.included != 'content' + %if %%file.activate is True and %%file.included != 'content' %if %%isinstance(%%file.name, list) %for %%filename in %%file.name %%display(%%file, %%filename)%slurp @@ -93,7 +93,6 @@ class RougailSystemdTemplate(RougailBaseTemplate): service_name = filevar['name'] return tmp_file, None, f'/systemd/system/{service_name}.service.d/rougail.conf', None - def _instance_ip(self, filevar: Dict, destfile, @@ -116,6 +115,13 @@ class RougailSystemdTemplate(RougailBaseTemplate): filevar['engine'] = 'creole' return None, ROUGAIL_IP_TEMPLATE, f'/systemd/system/{service_name}.service.d/rougail_ip.conf', variable + def desactive_service(self, + service_name: str, + ): + filename = f'{self.destinations_dir}/systemd/system/{service_name}.service' + makedirs(dirname(filename), exist_ok=True) + symlink('/dev/null', filename) + def post_instance(self): destfile = '/tmpfiles.d/rougail.conf' destfilename = join(self.destinations_dir, destfile[1:]) diff --git a/tests/dictionaries/00empty/makedict/base.json b/tests/dictionaries/00empty/makedict/base.json new file mode 100644 index 00000000..17c919d6 --- /dev/null +++ b/tests/dictionaries/00empty/makedict/base.json @@ -0,0 +1 @@ +{"services.tata.activate": true, "services.tata.manage": true} diff --git a/tests/dictionaries/00empty/tiramisu/base.py b/tests/dictionaries/00empty/tiramisu/base.py index 616d4586..fbf5613a 100644 --- a/tests/dictionaries/00empty/tiramisu/base.py +++ b/tests/dictionaries/00empty/tiramisu/base.py @@ -11,6 +11,8 @@ try: from tiramisu3 import * except: from tiramisu import * -option_2 = OptionDescription(name="tata", doc="tata", children=[]) +option_3 = BoolOption(name="activate", doc="activate", default=True) +option_4 = BoolOption(name="manage", doc="manage", default=True) +option_2 = OptionDescription(name="tata", doc="tata", children=[option_3, option_4]) option_1 = OptionDescription(name="services", doc="services", children=[option_2], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/01base_file/makedict/base.json b/tests/dictionaries/01base_file/makedict/base.json index 1d1bb389..65b06eec 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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/01base_file/tiramisu/base.py b/tests/dictionaries/01base_file/tiramisu/base.py index 4efa80ee..340e122d 100644 --- a/tests/dictionaries/01base_file/tiramisu/base.py +++ b/tests/dictionaries/01base_file/tiramisu/base.py @@ -33,6 +33,8 @@ 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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 1d1bb389..65b06eec 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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/01base_file_include/tiramisu/base.py b/tests/dictionaries/01base_file_include/tiramisu/base.py index 4efa80ee..340e122d 100644 --- a/tests/dictionaries/01base_file_include/tiramisu/base.py +++ b/tests/dictionaries/01base_file_include/tiramisu/base.py @@ -33,6 +33,8 @@ 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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/makedict/base.json b/tests/dictionaries/01base_file_include_content/makedict/base.json index 8d2c63ad..dfd8cb67 100644 --- a/tests/dictionaries/01base_file_include_content/makedict/base.json +++ b/tests/dictionaries/01base_file_include_content/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.included": "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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/01base_file_include_content/tiramisu/base.py b/tests/dictionaries/01base_file_include_content/tiramisu/base.py index a6da8128..9eb2c680 100644 --- a/tests/dictionaries/01base_file_include_content/tiramisu/base.py +++ b/tests/dictionaries/01base_file_include_content/tiramisu/base.py @@ -42,6 +42,8 @@ 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_34 = BoolOption(name="activate", doc="activate", default=True) +option_35 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_34, option_35]) 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/makedict/base.json b/tests/dictionaries/01base_file_include_name/makedict/base.json index 9d5a544f..7eee37db 100644 --- a/tests/dictionaries/01base_file_include_name/makedict/base.json +++ b/tests/dictionaries/01base_file_include_name/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.included": "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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/01base_file_include_name/tiramisu/base.py b/tests/dictionaries/01base_file_include_name/tiramisu/base.py index 7d5dc786..4fe855ae 100644 --- a/tests/dictionaries/01base_file_include_name/tiramisu/base.py +++ b/tests/dictionaries/01base_file_include_name/tiramisu/base.py @@ -42,6 +42,8 @@ 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_34 = BoolOption(name="activate", doc="activate", default=True) +option_35 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_34, option_35]) 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_patch/makedict/base.json b/tests/dictionaries/01base_file_patch/makedict/base.json index 1d1bb389..65b06eec 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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/01base_file_patch/tiramisu/base.py b/tests/dictionaries/01base_file_patch/tiramisu/base.py index 4efa80ee..340e122d 100644 --- a/tests/dictionaries/01base_file_patch/tiramisu/base.py +++ b/tests/dictionaries/01base_file_patch/tiramisu/base.py @@ -33,6 +33,8 @@ 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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_utfchar/makedict/base.json b/tests/dictionaries/01base_file_utfchar/makedict/base.json index 1b143810..caa2f4dc 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.included": "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.included": "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} +{"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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/01base_file_utfchar/tiramisu/base.py b/tests/dictionaries/01base_file_utfchar/tiramisu/base.py index 708125b7..9544822b 100644 --- a/tests/dictionaries/01base_file_utfchar/tiramisu/base.py +++ b/tests/dictionaries/01base_file_utfchar/tiramisu/base.py @@ -33,6 +33,8 @@ option_23 = StrOption(name="source", doc="source", default="systemd-makefs@dev-d 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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 9fa6fc6d..d9ca2c8e 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.included": "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} +{"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.included": "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.activate": true, "services.test.manage": 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 9e7ed8ec..ee02d03d 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_in_multi_param2/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param2/makedict/base.json index e912a36b..c1d375e0 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.included": "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} +{"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.included": "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.activate": true, "services.test.manage": 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 844af3b4..aa7b6a80 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_in_multi_param3/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param3/makedict/base.json index a8df4ffd..981ea298 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.included": "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} +{"rougail.general.condition": "no", "rougail.general.condition2": "no", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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, "services.test.activate": true, "services.test.manage": true} 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 923ebc48..ce3ae23b 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_in_multi_param4/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param4/makedict/base.json index f805d38b..cc8a3018 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.included": "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} +{"rougail.general.condition": "yes", "rougail.general.condition2": "no", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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.activate": true, "services.test.manage": 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 cb643fe2..09e2262f 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_in_multi_param5/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param5/makedict/base.json index 506580d8..ff296f1b 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.included": "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} +{"rougail.general.condition": "yes", "rougail.general.condition2": "yes", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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, "services.test.activate": true, "services.test.manage": true} 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 e23830dc..29027a3a 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_in_multi_param6/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param6/makedict/base.json index 1f4000b3..e8f83ea3 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.included": "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} +{"rougail.general.condition": "no", "rougail.general.condition2": "yes", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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, "services.test.activate": true, "services.test.manage": true} 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 b1240522..2669168b 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_in_multi_param_disabled/makedict/base.json b/tests/dictionaries/10load_disabled_if_in_multi_param_disabled/makedict/base.json index 09ba67b0..15068ac2 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.included": "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} +{"rougail.general.condition": "oui", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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, "services.test.activate": true, "services.test.manage": true} 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 b5b0fbfe..4f8ba148 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 @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/10load_disabled_if_not_in_fallback/makedict/base.json b/tests/dictionaries/10load_disabled_if_not_in_fallback/makedict/base.json index 7078b1f0..c654c2d0 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.included": "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} +{"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.included": "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.activate": true, "services.test.manage": 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 cb884345..170302ea 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 @@ -25,6 +25,8 @@ 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_17 = BoolOption(name="activate", doc="activate", default=True) +option_18 = BoolOption(name="manage", doc="manage", default=True) +option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_17, option_18]) 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/11disabled_if_in_filelist/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist/makedict/base.json index 0f87ab35..35415a54 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.included": "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} +{"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.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py index 1b5a5b19..e18a413c 100644 --- a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/11disabled_if_in_filelist_boolean/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_boolean/makedict/base.json index bde10991..80ae7c66 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.included": "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} +{"rougail.general.condition": true, "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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, "services.test.activate": true, "services.test.manage": true} 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 98a12f2b..886e0b0e 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_boolean/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_boolean/tiramisu/base.py @@ -24,6 +24,8 @@ 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_16 = BoolOption(name="activate", doc="activate", default=True) +option_17 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_16, option_17]) 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/11disabled_if_in_filelist_boolean2/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_boolean2/makedict/base.json index 7f404fa4..39dc850f 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.included": "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} +{"rougail.general.condition": false, "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.included": "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.activate": true, "services.test.manage": 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 e941deae..85c4017b 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_boolean2/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_boolean2/tiramisu/base.py @@ -24,6 +24,8 @@ 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_16 = BoolOption(name="activate", doc="activate", default=True) +option_17 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_16, option_17]) 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/11disabled_if_in_filelist_disabled/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_disabled/makedict/base.json index 5963379a..e3e0a34f 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.included": "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} +{"rougail.general.condition": "oui", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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, "services.test.activate": true, "services.test.manage": true} 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 50c0fd55..8162b1f3 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/11disabled_if_in_filelist_multi/makedict/base.json b/tests/dictionaries/11disabled_if_in_filelist_multi/makedict/base.json index d37411d7..6eee3998 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.included": "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.included": "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} +{"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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": 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 620f03f4..1834cf14 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py @@ -35,6 +35,8 @@ 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_27 = BoolOption(name="activate", doc="activate", default=True) +option_28 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_27, option_28]) 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 6fc66b82..60576b02 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.included": "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} +{"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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py index 79a9d754..60c349da 100644 --- a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/11disabledifnotin_filelist_notexist/makedict/base.json b/tests/dictionaries/11disabledifnotin_filelist_notexist/makedict/base.json index 6fc66b82..60576b02 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.included": "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} +{"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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py index 79a9d754..60c349da 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/11disabledifnotin_filelist_notexist_multi/makedict/base.json b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/makedict/base.json index 6fc66b82..60576b02 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.included": "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} +{"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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py index 0d119ec0..41408f0f 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/11disabledifnotin_filelist_notexist_validenum/makedict/base.json b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/makedict/base.json index 6fc66b82..60576b02 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.included": "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} +{"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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py index 2664c56a..4c08cfca 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py @@ -26,6 +26,8 @@ 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_18 = BoolOption(name="activate", doc="activate", default=True) +option_19 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="test", doc="test", children=[option_8, option_18, option_19]) 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/11multi_disabled_if_in_filelist/makedict/base.json b/tests/dictionaries/11multi_disabled_if_in_filelist/makedict/base.json index 950fa7cf..f6f29e5f 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.included": "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} +{"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.included": "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, "services.test.activate": true, "services.test.manage": true} 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 931431f4..4e1e374d 100644 --- a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py @@ -25,6 +25,8 @@ 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_17 = BoolOption(name="activate", doc="activate", default=True) +option_18 = BoolOption(name="manage", doc="manage", default=True) +option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_17, option_18]) 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/20notemplating/makedict/base.json b/tests/dictionaries/20notemplating/makedict/base.json index 8d50ae21..118174dc 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.included": "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} +{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.engine": "none", "services.test.files.file.group": "root", "services.test.files.file.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/20notemplating/tiramisu/base.py b/tests/dictionaries/20notemplating/tiramisu/base.py index 4bd9d6d4..615ba96a 100644 --- a/tests/dictionaries/20notemplating/tiramisu/base.py +++ b/tests/dictionaries/20notemplating/tiramisu/base.py @@ -24,6 +24,8 @@ 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_16 = BoolOption(name="activate", doc="activate", default=True) +option_17 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_16, option_17]) 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/20override/makedict/base.json b/tests/dictionaries/20override/makedict/base.json index f919d625..9b9f194a 100644 --- a/tests/dictionaries/20override/makedict/base.json +++ b/tests/dictionaries/20override/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.overrides.test_service.engine": "creole", "services.test.overrides.test_service.name": "test", "services.test.overrides.test_service.source": "test.service", "services.test.overrides.test_service.activate": true, "services.test2.overrides.test2_service.engine": "jinja2", "services.test2.overrides.test2_service.name": "test2", "services.test2.overrides.test2_service.source": "test2.service", "services.test2.overrides.test2_service.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.overrides.test_service.engine": "creole", "services.test.overrides.test_service.name": "test", "services.test.overrides.test_service.source": "test.service", "services.test.overrides.test_service.activate": true, "services.test.activate": true, "services.test.manage": true, "services.test2.overrides.test2_service.engine": "jinja2", "services.test2.overrides.test2_service.name": "test2", "services.test2.overrides.test2_service.source": "test2.service", "services.test2.overrides.test2_service.activate": true, "services.test2.activate": true, "services.test2.manage": true} diff --git a/tests/dictionaries/20override/tiramisu/base.py b/tests/dictionaries/20override/tiramisu/base.py index cc6b9910..c0bae6a5 100644 --- a/tests/dictionaries/20override/tiramisu/base.py +++ b/tests/dictionaries/20override/tiramisu/base.py @@ -20,13 +20,17 @@ option_10 = StrOption(name="source", doc="source", default="test.service") option_11 = BoolOption(name="activate", doc="activate", default=True) option_7 = OptionDescription(name="test_service", doc="test.service", children=[option_8, option_9, option_10, option_11]) option_6 = OptionDescription(name="overrides", doc="overrides", children=[option_7]) -option_5 = OptionDescription(name="test", doc="test", children=[option_6]) -option_15 = StrOption(name="engine", doc="engine", default="jinja2") -option_16 = StrOption(name="name", doc="name", default="test2") -option_17 = StrOption(name="source", doc="source", default="test2.service") -option_18 = BoolOption(name="activate", doc="activate", default=True) -option_14 = OptionDescription(name="test2_service", doc="test2.service", children=[option_15, option_16, option_17, option_18]) -option_13 = OptionDescription(name="overrides", doc="overrides", children=[option_14]) -option_12 = OptionDescription(name="test2", doc="test2", children=[option_13]) -option_4 = OptionDescription(name="services", doc="services", children=[option_5, option_12], properties=frozenset({"hidden"})) +option_12 = BoolOption(name="activate", doc="activate", default=True) +option_13 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_12, option_13]) +option_17 = StrOption(name="engine", doc="engine", default="jinja2") +option_18 = StrOption(name="name", doc="name", default="test2") +option_19 = StrOption(name="source", doc="source", default="test2.service") +option_20 = BoolOption(name="activate", doc="activate", default=True) +option_16 = OptionDescription(name="test2_service", doc="test2.service", children=[option_17, option_18, option_19, option_20]) +option_15 = OptionDescription(name="overrides", doc="overrides", children=[option_16]) +option_21 = BoolOption(name="activate", doc="activate", default=True) +option_22 = BoolOption(name="manage", doc="manage", default=True) +option_14 = OptionDescription(name="test2", doc="test2", children=[option_15, option_21, option_22]) +option_4 = OptionDescription(name="services", doc="services", children=[option_5, option_14], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4]) diff --git a/tests/dictionaries/20override_no_templating/makedict/base.json b/tests/dictionaries/20override_no_templating/makedict/base.json index 84d3ee6f..3283f09c 100644 --- a/tests/dictionaries/20override_no_templating/makedict/base.json +++ b/tests/dictionaries/20override_no_templating/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.overrides.test_service.engine": "none", "services.test.overrides.test_service.name": "test", "services.test.overrides.test_service.source": "test.service", "services.test.overrides.test_service.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.overrides.test_service.engine": "none", "services.test.overrides.test_service.name": "test", "services.test.overrides.test_service.source": "test.service", "services.test.overrides.test_service.activate": true, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/20override_no_templating/tiramisu/base.py b/tests/dictionaries/20override_no_templating/tiramisu/base.py index 5325ff0e..3de45df9 100644 --- a/tests/dictionaries/20override_no_templating/tiramisu/base.py +++ b/tests/dictionaries/20override_no_templating/tiramisu/base.py @@ -20,6 +20,8 @@ option_10 = StrOption(name="source", doc="source", default="test.service") option_11 = BoolOption(name="activate", doc="activate", default=True) option_7 = OptionDescription(name="test_service", doc="test.service", children=[option_8, option_9, option_10, option_11]) option_6 = OptionDescription(name="overrides", doc="overrides", children=[option_7]) -option_5 = OptionDescription(name="test", doc="test", children=[option_6]) +option_12 = BoolOption(name="activate", doc="activate", default=True) +option_13 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_12, option_13]) 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/20override_source/makedict/base.json b/tests/dictionaries/20override_source/makedict/base.json index f177d42d..8672bb97 100644 --- a/tests/dictionaries/20override_source/makedict/base.json +++ b/tests/dictionaries/20override_source/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non", "services.test.overrides.test2_service.engine": "creole", "services.test.overrides.test2_service.name": "test", "services.test.overrides.test2_service.source": "test2.service", "services.test.overrides.test2_service.activate": true} +{"rougail.general.mode_conteneur_actif": "non", "services.test.overrides.test2_service.engine": "creole", "services.test.overrides.test2_service.name": "test", "services.test.overrides.test2_service.source": "test2.service", "services.test.overrides.test2_service.activate": true, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/20override_source/tiramisu/base.py b/tests/dictionaries/20override_source/tiramisu/base.py index 991e7eaa..4e7dcc66 100644 --- a/tests/dictionaries/20override_source/tiramisu/base.py +++ b/tests/dictionaries/20override_source/tiramisu/base.py @@ -20,6 +20,8 @@ option_10 = StrOption(name="source", doc="source", default="test2.service") option_11 = BoolOption(name="activate", doc="activate", default=True) option_7 = OptionDescription(name="test2_service", doc="test2.service", children=[option_8, option_9, option_10, option_11]) option_6 = OptionDescription(name="overrides", doc="overrides", children=[option_7]) -option_5 = OptionDescription(name="test", doc="test", children=[option_6]) +option_12 = BoolOption(name="activate", doc="activate", default=True) +option_13 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_12, option_13]) 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/40ifin_leadershipauto/makedict/base.json b/tests/dictionaries/40ifin_leadershipauto/makedict/base.json index 19d1d5d6..5e1a706b 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.included": "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} +{"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.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py index a82d0919..1e0df8df 100644 --- a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py @@ -29,6 +29,8 @@ 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_21 = BoolOption(name="activate", doc="activate", default=True) +option_22 = BoolOption(name="manage", doc="manage", default=True) +option_10 = OptionDescription(name="test", doc="test", children=[option_11, option_21, option_22]) 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/40ifin_leadershipauto_follower/makedict/base.json b/tests/dictionaries/40ifin_leadershipauto_follower/makedict/base.json index 38edfa4d..cd209af3 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.included": "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.included": "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} +{"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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py index 1e25e7ce..32ae5f4c 100644 --- a/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py @@ -38,6 +38,8 @@ 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_30 = BoolOption(name="activate", doc="activate", default=True) +option_31 = BoolOption(name="manage", doc="manage", default=True) +option_10 = OptionDescription(name="test", doc="test", children=[option_11, option_30, option_31]) 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 1f8b6af6..fd4af5ed 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.included": "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} +{"rougail.my_var": "rougail", "extra.my_var": null, "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/45extra_without_family/tiramisu/base.py b/tests/dictionaries/45extra_without_family/tiramisu/base.py index 007e3c22..92eaec88 100644 --- a/tests/dictionaries/45extra_without_family/tiramisu/base.py +++ b/tests/dictionaries/45extra_without_family/tiramisu/base.py @@ -25,6 +25,8 @@ 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_17 = BoolOption(name="activate", doc="activate", default=True) +option_18 = BoolOption(name="manage", doc="manage", default=True) +option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_17, option_18]) option_5 = OptionDescription(name="services", doc="services", children=[option_6], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3, option_5]) diff --git a/tests/dictionaries/60extra_group/makedict/base.json b/tests/dictionaries/60extra_group/makedict/base.json index 399599af..54eb0f87 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.included": "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.included": "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} +{"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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/60extra_group/tiramisu/base.py b/tests/dictionaries/60extra_group/tiramisu/base.py index e4b66544..48bbaf6a 100644 --- a/tests/dictionaries/60extra_group/tiramisu/base.py +++ b/tests/dictionaries/60extra_group/tiramisu/base.py @@ -39,6 +39,8 @@ 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_31 = BoolOption(name="activate", doc="activate", default=True) +option_32 = BoolOption(name="manage", doc="manage", default=True) +option_11 = OptionDescription(name="test", doc="test", children=[option_12, option_31, option_32]) 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 b547da3d..e7ce63c0 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.included": "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} +{"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.included": "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.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/60extra_help/tiramisu/base.py b/tests/dictionaries/60extra_help/tiramisu/base.py index 957f0cbf..fe6f95c3 100644 --- a/tests/dictionaries/60extra_help/tiramisu/base.py +++ b/tests/dictionaries/60extra_help/tiramisu/base.py @@ -31,6 +31,8 @@ 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_22 = BoolOption(name="activate", doc="activate", default=True) +option_23 = BoolOption(name="manage", doc="manage", default=True) +option_11 = OptionDescription(name="test", doc="test", children=[option_12, option_22, option_23]) 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/70container_files/makedict/base.json b/tests/dictionaries/70container_files/makedict/base.json index 5c1982e6..a282ce2a 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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_files/tiramisu/base.py b/tests/dictionaries/70container_files/tiramisu/base.py index 0acabdb4..da69b45c 100644 --- a/tests/dictionaries/70container_files/tiramisu/base.py +++ b/tests/dictionaries/70container_files/tiramisu/base.py @@ -33,6 +33,8 @@ 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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 8cfd02e9..5a6d32c4 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.included": "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.included": "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} +{"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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py index c9fcc836..9e7595d9 100644 --- a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py @@ -33,6 +33,8 @@ 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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 033c82ba..3538f49e 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.included": "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.included": "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} +{"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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": 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 56484d2b..d5633dff 100644 --- a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py @@ -36,6 +36,8 @@ 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_28 = BoolOption(name="activate", doc="activate", default=True) +option_29 = BoolOption(name="manage", doc="manage", default=True) +option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_28, option_29]) 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 76d2eb22..74235a0b 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.included": "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} +{"rougail.file_name": "/etc/mailname", "rougail.var": "mailname", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py index 471af7af..f23e7903 100644 --- a/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py @@ -25,6 +25,8 @@ 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_17 = BoolOption(name="activate", doc="activate", default=True) +option_18 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_17, option_18]) 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_twice/makedict/base.json b/tests/dictionaries/70container_files_twice/makedict/base.json index e5a25611..bd97710f 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.included": "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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.included": "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.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_files_twice/tiramisu/base.py b/tests/dictionaries/70container_files_twice/tiramisu/base.py index 3ae65529..82a665d0 100644 --- a/tests/dictionaries/70container_files_twice/tiramisu/base.py +++ b/tests/dictionaries/70container_files_twice/tiramisu/base.py @@ -42,6 +42,8 @@ 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_34 = BoolOption(name="activate", doc="activate", default=True) +option_35 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_34, option_35]) 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 b550e233..4ea58299 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.included": "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.included": "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} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.files.mailname.engine": "creole", "services.test.files.mailname.group": "root", "services.test.files.mailname.included": "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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_filesmulti/tiramisu/base.py b/tests/dictionaries/70container_filesmulti/tiramisu/base.py index 56e85914..27d5b8c6 100644 --- a/tests/dictionaries/70container_filesmulti/tiramisu/base.py +++ b/tests/dictionaries/70container_filesmulti/tiramisu/base.py @@ -33,6 +33,8 @@ 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_25 = BoolOption(name="activate", doc="activate", default=True) +option_26 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_25, option_26]) 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 cf75774e..3ffb0e06 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.included": "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} +{"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.included": "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, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_filesredefine/tiramisu/base.py b/tests/dictionaries/70container_filesredefine/tiramisu/base.py index 13430e4c..685264a4 100644 --- a/tests/dictionaries/70container_filesredefine/tiramisu/base.py +++ b/tests/dictionaries/70container_filesredefine/tiramisu/base.py @@ -24,6 +24,8 @@ 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_16 = BoolOption(name="activate", doc="activate", default=True) +option_17 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_16, option_17]) 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_new/makedict/base.json b/tests/dictionaries/70container_new/makedict/base.json index eb10bec4..0ecf390c 100644 --- a/tests/dictionaries/70container_new/makedict/base.json +++ b/tests/dictionaries/70container_new/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "oui"} +{"rougail.general.mode_conteneur_actif": "oui", "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_new/tiramisu/base.py b/tests/dictionaries/70container_new/tiramisu/base.py index 9b97268a..09c5d721 100644 --- a/tests/dictionaries/70container_new/tiramisu/base.py +++ b/tests/dictionaries/70container_new/tiramisu/base.py @@ -14,6 +14,8 @@ except: option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) -option_5 = OptionDescription(name="test", doc="test", children=[]) +option_6 = BoolOption(name="activate", doc="activate", default=True) +option_7 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_7]) 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_newnocont/makedict/base.json b/tests/dictionaries/70container_newnocont/makedict/base.json index 797595b0..e894f5f6 100644 --- a/tests/dictionaries/70container_newnocont/makedict/base.json +++ b/tests/dictionaries/70container_newnocont/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "non"} +{"rougail.general.mode_conteneur_actif": "non", "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_newnocont/tiramisu/base.py b/tests/dictionaries/70container_newnocont/tiramisu/base.py index 621b70cf..34a9ad0e 100644 --- a/tests/dictionaries/70container_newnocont/tiramisu/base.py +++ b/tests/dictionaries/70container_newnocont/tiramisu/base.py @@ -14,6 +14,8 @@ except: option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) -option_5 = OptionDescription(name="test", doc="test", children=[]) +option_6 = BoolOption(name="activate", doc="activate", default=True) +option_7 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_7]) 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_newwithip/makedict/base.json b/tests/dictionaries/70container_newwithip/makedict/base.json index 7d28fa93..7b52a6a6 100644 --- a/tests/dictionaries/70container_newwithip/makedict/base.json +++ b/tests/dictionaries/70container_newwithip/makedict/base.json @@ -1 +1 @@ -{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.adresse_ip_test": null} +{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.adresse_ip_test": null, "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70container_newwithip/tiramisu/base.py b/tests/dictionaries/70container_newwithip/tiramisu/base.py index e5b8fb5d..41c1d6cf 100644 --- a/tests/dictionaries/70container_newwithip/tiramisu/base.py +++ b/tests/dictionaries/70container_newwithip/tiramisu/base.py @@ -15,6 +15,8 @@ option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui" option_4 = IPOption(name="adresse_ip_test", doc="No change", allow_reserved=True, properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) -option_6 = OptionDescription(name="test", doc="test", children=[]) +option_7 = BoolOption(name="activate", doc="activate", default=True) +option_8 = BoolOption(name="manage", doc="manage", default=True) +option_6 = OptionDescription(name="test", doc="test", children=[option_7, option_8]) 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_services/makedict/base.json b/tests/dictionaries/70container_services/makedict/base.json deleted file mode 100644 index eb10bec4..00000000 --- a/tests/dictionaries/70container_services/makedict/base.json +++ /dev/null @@ -1 +0,0 @@ -{"rougail.general.mode_conteneur_actif": "oui"} diff --git a/tests/dictionaries/70container_services/00-base.xml b/tests/dictionaries/70service_base/00-base.xml similarity index 100% rename from tests/dictionaries/70container_services/00-base.xml rename to tests/dictionaries/70service_base/00-base.xml diff --git a/tests/dictionaries/70container_services/__init__.py b/tests/dictionaries/70service_base/__init__.py similarity index 100% rename from tests/dictionaries/70container_services/__init__.py rename to tests/dictionaries/70service_base/__init__.py diff --git a/tests/dictionaries/70service_base/makedict/base.json b/tests/dictionaries/70service_base/makedict/base.json new file mode 100644 index 00000000..bf877dda --- /dev/null +++ b/tests/dictionaries/70service_base/makedict/base.json @@ -0,0 +1 @@ +{"rougail.general.mode_conteneur_actif": "oui", "services.testsrv.activate": true, "services.testsrv.manage": true} diff --git a/tests/dictionaries/70container_services/tiramisu/base.py b/tests/dictionaries/70service_base/tiramisu/base.py similarity index 87% rename from tests/dictionaries/70container_services/tiramisu/base.py rename to tests/dictionaries/70service_base/tiramisu/base.py index 6683d20a..84476b71 100644 --- a/tests/dictionaries/70container_services/tiramisu/base.py +++ b/tests/dictionaries/70service_base/tiramisu/base.py @@ -14,6 +14,8 @@ except: option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) -option_5 = OptionDescription(name="testsrv", doc="testsrv", children=[]) +option_6 = BoolOption(name="activate", doc="activate", default=True) +option_7 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="testsrv", doc="testsrv", children=[option_6, option_7]) 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/70service_not_managed/makedict/base.json b/tests/dictionaries/70service_not_managed/makedict/base.json index 92216d08..cd8226be 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.included": "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} +{"rougail.var": "mailname", "services.test.files.test.engine": "creole", "services.test.files.test.group": "root", "services.test.files.test.included": "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, "services.test.activate": true, "services.test.manage": false} diff --git a/tests/dictionaries/70service_not_managed/tiramisu/base.py b/tests/dictionaries/70service_not_managed/tiramisu/base.py index 5bd8829a..7c51f1d8 100644 --- a/tests/dictionaries/70service_not_managed/tiramisu/base.py +++ b/tests/dictionaries/70service_not_managed/tiramisu/base.py @@ -23,7 +23,8 @@ 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) +option_15 = BoolOption(name="activate", doc="activate", default=True) +option_16 = BoolOption(name="manage", doc="manage", default=False) +option_4 = OptionDescription(name="test", doc="test", children=[option_5, option_15, option_16]) option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/dictionaries/70service_servicelist/00-base.xml b/tests/dictionaries/70service_servicelist/00-base.xml new file mode 100644 index 00000000..e06cbe6b --- /dev/null +++ b/tests/dictionaries/70service_servicelist/00-base.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + no + + + + + yes + test + + + + diff --git a/tests/dictionaries/70service_servicelist/__init__.py b/tests/dictionaries/70service_servicelist/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/70service_servicelist/makedict/base.json b/tests/dictionaries/70service_servicelist/makedict/base.json new file mode 100644 index 00000000..c53768ff --- /dev/null +++ b/tests/dictionaries/70service_servicelist/makedict/base.json @@ -0,0 +1 @@ +{"rougail.condition": "no", "services.test.activate": true, "services.test.manage": true} diff --git a/tests/dictionaries/70service_servicelist/tiramisu/base.py b/tests/dictionaries/70service_servicelist/tiramisu/base.py new file mode 100644 index 00000000..51dee229 --- /dev/null +++ b/tests/dictionaries/70service_servicelist/tiramisu/base.py @@ -0,0 +1,20 @@ +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_2 = StrOption(name="condition", doc="condition", default="no", properties=frozenset({"mandatory", "normal"})) +option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) +option_5 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2), 'expected_0': ParamValue("yes")}))) +option_6 = BoolOption(name="manage", doc="manage", default=True) +option_4 = OptionDescription(name="test", doc="test", children=[option_5, option_6]) +option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/dictionaries/70service_servicelist_file/00-base.xml b/tests/dictionaries/70service_servicelist_file/00-base.xml new file mode 100644 index 00000000..8136e01d --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/00-base.xml @@ -0,0 +1,24 @@ + + + + + /etc/file + + + + + no + + + 192.168.0.1 + + + + + no + test + + + + diff --git a/tests/dictionaries/70service_servicelist_file/__init__.py b/tests/dictionaries/70service_servicelist_file/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/70service_servicelist_file/makedict/base.json b/tests/dictionaries/70service_servicelist_file/makedict/base.json new file mode 100644 index 00000000..696512dc --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/makedict/base.json @@ -0,0 +1 @@ +{"rougail.condition": "no", "rougail.nut_monitor_host": "192.168.0.1", "services.test.files.file.engine": "creole", "services.test.files.file.group": "root", "services.test.files.file.included": "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.activate": false, "services.test.manage": true} diff --git a/tests/dictionaries/70service_servicelist_file/result/systemd/system/test.service b/tests/dictionaries/70service_servicelist_file/result/systemd/system/test.service new file mode 120000 index 00000000..dc1dc0cd --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/result/systemd/system/test.service @@ -0,0 +1 @@ +/dev/null \ No newline at end of file diff --git a/tests/dictionaries/70service_servicelist_file/result/tmpfiles.d/rougail.conf b/tests/dictionaries/70service_servicelist_file/result/tmpfiles.d/rougail.conf new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/70service_servicelist_file/tiramisu/base.py b/tests/dictionaries/70service_servicelist_file/tiramisu/base.py new file mode 100644 index 00000000..2709b532 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/tiramisu/base.py @@ -0,0 +1,31 @@ +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_2 = StrOption(name="condition", doc="condition", default="no", properties=frozenset({"mandatory", "normal"})) +option_3 = IPOption(name="nut_monitor_host", doc="nut_monitor_host", default="192.168.0.1", allow_reserved=True, properties=frozenset({"mandatory", "normal"})) +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="included", doc="included", 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_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2), 'expected_0': ParamValue("no")}))) +option_17 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_16, option_17]) +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/70service_servicelist_file/tmpl/file b/tests/dictionaries/70service_servicelist_file/tmpl/file new file mode 100644 index 00000000..7ecb56eb --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/tmpl/file @@ -0,0 +1 @@ +no diff --git a/tests/dictionaries/70service_servicelist_ip/00-base.xml b/tests/dictionaries/70service_servicelist_ip/00-base.xml new file mode 100644 index 00000000..0eee58a5 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_ip/00-base.xml @@ -0,0 +1,24 @@ + + + + + nut_monitor_host + + + + + no + + + 192.168.0.1 + + + + + no + test + + + + diff --git a/tests/dictionaries/70service_servicelist_ip/__init__.py b/tests/dictionaries/70service_servicelist_ip/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/70service_servicelist_ip/makedict/base.json b/tests/dictionaries/70service_servicelist_ip/makedict/base.json new file mode 100644 index 00000000..099b2ab3 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_ip/makedict/base.json @@ -0,0 +1 @@ +{"rougail.condition": "no", "rougail.nut_monitor_host": "192.168.0.1", "services.test.ip.nut_monitor_host.name": "192.168.0.1", "services.test.ip.nut_monitor_host.activate": true, "services.test.activate": false, "services.test.manage": true} diff --git a/tests/dictionaries/70service_servicelist_ip/result/systemd/system/test.service b/tests/dictionaries/70service_servicelist_ip/result/systemd/system/test.service new file mode 120000 index 00000000..dc1dc0cd --- /dev/null +++ b/tests/dictionaries/70service_servicelist_ip/result/systemd/system/test.service @@ -0,0 +1 @@ +/dev/null \ No newline at end of file diff --git a/tests/dictionaries/70service_servicelist_ip/result/tmpfiles.d/rougail.conf b/tests/dictionaries/70service_servicelist_ip/result/tmpfiles.d/rougail.conf new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/70service_servicelist_ip/tiramisu/base.py b/tests/dictionaries/70service_servicelist_ip/tiramisu/base.py new file mode 100644 index 00000000..26cbfc85 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_ip/tiramisu/base.py @@ -0,0 +1,25 @@ +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_2 = StrOption(name="condition", doc="condition", default="no", properties=frozenset({"mandatory", "normal"})) +option_3 = IPOption(name="nut_monitor_host", doc="nut_monitor_host", default="192.168.0.1", allow_reserved=True, properties=frozenset({"mandatory", "normal"})) +option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) +option_8 = SymLinkOption(name="name", opt=option_3) +option_9 = BoolOption(name="activate", doc="activate", default=True) +option_7 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_8, option_9]) +option_6 = OptionDescription(name="ip", doc="ip", children=[option_7]) +option_10 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2), 'expected_0': ParamValue("no")}))) +option_11 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="test", doc="test", children=[option_6, option_10, option_11]) +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/70service_servicelist_not_managed/00-base.xml b/tests/dictionaries/70service_servicelist_not_managed/00-base.xml new file mode 100644 index 00000000..f9fc0eb5 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_not_managed/00-base.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + no + + + + + yes + test + + + + diff --git a/tests/dictionaries/70service_servicelist_not_managed/__init__.py b/tests/dictionaries/70service_servicelist_not_managed/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/70service_servicelist_not_managed/makedict/base.json b/tests/dictionaries/70service_servicelist_not_managed/makedict/base.json new file mode 100644 index 00000000..f8798a39 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_not_managed/makedict/base.json @@ -0,0 +1 @@ +{"rougail.condition": "no", "services.test.activate": true, "services.test.manage": false} diff --git a/tests/dictionaries/70service_servicelist_not_managed/tiramisu/base.py b/tests/dictionaries/70service_servicelist_not_managed/tiramisu/base.py new file mode 100644 index 00000000..dc47598e --- /dev/null +++ b/tests/dictionaries/70service_servicelist_not_managed/tiramisu/base.py @@ -0,0 +1,20 @@ +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_2 = StrOption(name="condition", doc="condition", default="no", properties=frozenset({"mandatory", "normal"})) +option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) +option_5 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2), 'expected_0': ParamValue("yes")}))) +option_6 = BoolOption(name="manage", doc="manage", default=False) +option_4 = OptionDescription(name="test", doc="test", children=[option_5, option_6]) +option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/dictionaries/70services_ip/makedict/base.json b/tests/dictionaries/70services_ip/makedict/base.json index 74e4766a..df145db7 100644 --- a/tests/dictionaries/70services_ip/makedict/base.json +++ b/tests/dictionaries/70services_ip/makedict/base.json @@ -1 +1 @@ -{"rougail.nut_monitor_host": "192.168.0.1", "services.nut.ip.nut_monitor_host.name": "192.168.0.1", "services.nut.ip.nut_monitor_host.activate": true} +{"rougail.nut_monitor_host": "192.168.0.1", "services.nut.ip.nut_monitor_host.name": "192.168.0.1", "services.nut.ip.nut_monitor_host.activate": true, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip/tiramisu/base.py b/tests/dictionaries/70services_ip/tiramisu/base.py index 0e134fd1..33b61ad6 100644 --- a/tests/dictionaries/70services_ip/tiramisu/base.py +++ b/tests/dictionaries/70services_ip/tiramisu/base.py @@ -17,6 +17,8 @@ option_7 = SymLinkOption(name="name", opt=option_2) option_8 = BoolOption(name="activate", doc="activate", default=True) option_6 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_7, option_8]) option_5 = OptionDescription(name="ip", doc="ip", children=[option_6]) -option_4 = OptionDescription(name="nut", doc="nut", children=[option_5]) +option_9 = BoolOption(name="activate", doc="activate", default=True) +option_10 = BoolOption(name="manage", doc="manage", default=True) +option_4 = OptionDescription(name="nut", doc="nut", children=[option_5, option_9, option_10]) option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/dictionaries/70services_ip_cidr/makedict/base.json b/tests/dictionaries/70services_ip_cidr/makedict/base.json index 36dc5789..cc6e1280 100644 --- a/tests/dictionaries/70services_ip_cidr/makedict/base.json +++ b/tests/dictionaries/70services_ip_cidr/makedict/base.json @@ -1 +1 @@ -{"rougail.nut_monitor_host": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.name": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.activate": true} +{"rougail.nut_monitor_host": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.name": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.activate": true, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip_cidr/tiramisu/base.py b/tests/dictionaries/70services_ip_cidr/tiramisu/base.py index 0ecd07a9..1f5ca44d 100644 --- a/tests/dictionaries/70services_ip_cidr/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_cidr/tiramisu/base.py @@ -17,6 +17,8 @@ option_7 = SymLinkOption(name="name", opt=option_2) option_8 = BoolOption(name="activate", doc="activate", default=True) option_6 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_7, option_8]) option_5 = OptionDescription(name="ip", doc="ip", children=[option_6]) -option_4 = OptionDescription(name="nut", doc="nut", children=[option_5]) +option_9 = BoolOption(name="activate", doc="activate", default=True) +option_10 = BoolOption(name="manage", doc="manage", default=True) +option_4 = OptionDescription(name="nut", doc="nut", children=[option_5, option_9, option_10]) option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/dictionaries/70services_ip_iplist/makedict/base.json b/tests/dictionaries/70services_ip_iplist/makedict/base.json index cba8fcc6..4cdf6f51 100644 --- a/tests/dictionaries/70services_ip_iplist/makedict/base.json +++ b/tests/dictionaries/70services_ip_iplist/makedict/base.json @@ -1 +1 @@ -{"rougail.condition": "no", "rougail.nut_monitor_host": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.name": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.activate": true} +{"rougail.condition": "no", "rougail.nut_monitor_host": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.name": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.activate": true, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip_iplist/tiramisu/base.py b/tests/dictionaries/70services_ip_iplist/tiramisu/base.py index f5bfbfea..d13f6ed7 100644 --- a/tests/dictionaries/70services_ip_iplist/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_iplist/tiramisu/base.py @@ -18,6 +18,8 @@ option_8 = SymLinkOption(name="name", opt=option_3) option_9 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2), 'expected_0': ParamValue("yes")}))) option_7 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_8, option_9]) option_6 = OptionDescription(name="ip", doc="ip", children=[option_7]) -option_5 = OptionDescription(name="nut", doc="nut", children=[option_6]) +option_10 = BoolOption(name="activate", doc="activate", default=True) +option_11 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="nut", doc="nut", children=[option_6, option_10, option_11]) 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/70services_ip_iplist2/makedict/base.json b/tests/dictionaries/70services_ip_iplist2/makedict/base.json index a65ce884..3d3a13a2 100644 --- a/tests/dictionaries/70services_ip_iplist2/makedict/base.json +++ b/tests/dictionaries/70services_ip_iplist2/makedict/base.json @@ -1 +1 @@ -{"rougail.condition": "yes", "rougail.nut_monitor_host": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.name": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.activate": false} +{"rougail.condition": "yes", "rougail.nut_monitor_host": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.name": "192.168.0.0/24", "services.nut.ip.nut_monitor_host.activate": false, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip_iplist2/tiramisu/base.py b/tests/dictionaries/70services_ip_iplist2/tiramisu/base.py index 76252065..de18fcf7 100644 --- a/tests/dictionaries/70services_ip_iplist2/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_iplist2/tiramisu/base.py @@ -18,6 +18,8 @@ option_8 = SymLinkOption(name="name", opt=option_3) option_9 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2), 'expected_0': ParamValue("yes")}))) option_7 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_8, option_9]) option_6 = OptionDescription(name="ip", doc="ip", children=[option_7]) -option_5 = OptionDescription(name="nut", doc="nut", children=[option_6]) +option_10 = BoolOption(name="activate", doc="activate", default=True) +option_11 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="nut", doc="nut", children=[option_6, option_10, option_11]) 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/70services_ip_leadership/makedict/base.json b/tests/dictionaries/70services_ip_leadership/makedict/base.json index 52a897a6..c09ba74a 100644 --- a/tests/dictionaries/70services_ip_leadership/makedict/base.json +++ b/tests/dictionaries/70services_ip_leadership/makedict/base.json @@ -1 +1 @@ -{"rougail.general.nut_monitor_netmask.nut_monitor_netmask": [{"rougail.general.nut_monitor_netmask.nut_monitor_netmask": "255.255.255.0", "rougail.general.nut_monitor_netmask.nut_monitor_host": "192.168.1.0"}], "services.ntp.ip.nut_monitor_host.name": ["192.168.1.0"], "services.ntp.ip.nut_monitor_host.netmask": ["255.255.255.0"], "services.ntp.ip.nut_monitor_host.activate": true} +{"rougail.general.nut_monitor_netmask.nut_monitor_netmask": [{"rougail.general.nut_monitor_netmask.nut_monitor_netmask": "255.255.255.0", "rougail.general.nut_monitor_netmask.nut_monitor_host": "192.168.1.0"}], "services.ntp.ip.nut_monitor_host.name": ["192.168.1.0"], "services.ntp.ip.nut_monitor_host.netmask": ["255.255.255.0"], "services.ntp.ip.nut_monitor_host.activate": true, "services.ntp.activate": true, "services.ntp.manage": true} diff --git a/tests/dictionaries/70services_ip_leadership/tiramisu/base.py b/tests/dictionaries/70services_ip_leadership/tiramisu/base.py index 55440d9f..94ae54e7 100644 --- a/tests/dictionaries/70services_ip_leadership/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_leadership/tiramisu/base.py @@ -21,6 +21,8 @@ option_11 = SymLinkOption(name="netmask", opt=option_4) option_12 = BoolOption(name="activate", doc="activate", default=True) option_9 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_10, option_11, option_12]) option_8 = OptionDescription(name="ip", doc="ip", children=[option_9]) -option_7 = OptionDescription(name="ntp", doc="ntp", children=[option_8]) +option_13 = BoolOption(name="activate", doc="activate", default=True) +option_14 = BoolOption(name="manage", doc="manage", default=True) +option_7 = OptionDescription(name="ntp", doc="ntp", children=[option_8, option_13, option_14]) 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/70services_ip_multi/makedict/base.json b/tests/dictionaries/70services_ip_multi/makedict/base.json index ca9e7792..62d6534c 100644 --- a/tests/dictionaries/70services_ip_multi/makedict/base.json +++ b/tests/dictionaries/70services_ip_multi/makedict/base.json @@ -1 +1 @@ -{"rougail.nut_monitor_host": ["192.168.0.1", "192.168.0.2"], "services.nut.ip.nut_monitor_host.name": ["192.168.0.1", "192.168.0.2"], "services.nut.ip.nut_monitor_host.activate": true} +{"rougail.nut_monitor_host": ["192.168.0.1", "192.168.0.2"], "services.nut.ip.nut_monitor_host.name": ["192.168.0.1", "192.168.0.2"], "services.nut.ip.nut_monitor_host.activate": true, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip_multi/tiramisu/base.py b/tests/dictionaries/70services_ip_multi/tiramisu/base.py index a0789ee5..e4c17c0c 100644 --- a/tests/dictionaries/70services_ip_multi/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_multi/tiramisu/base.py @@ -17,6 +17,8 @@ option_7 = SymLinkOption(name="name", opt=option_2) option_8 = BoolOption(name="activate", doc="activate", default=True) option_6 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_7, option_8]) option_5 = OptionDescription(name="ip", doc="ip", children=[option_6]) -option_4 = OptionDescription(name="nut", doc="nut", children=[option_5]) +option_9 = BoolOption(name="activate", doc="activate", default=True) +option_10 = BoolOption(name="manage", doc="manage", default=True) +option_4 = OptionDescription(name="nut", doc="nut", children=[option_5, option_9, option_10]) option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/dictionaries/70services_ip_network/makedict/base.json b/tests/dictionaries/70services_ip_network/makedict/base.json index 1ca4cbe1..7ba68352 100644 --- a/tests/dictionaries/70services_ip_network/makedict/base.json +++ b/tests/dictionaries/70services_ip_network/makedict/base.json @@ -1 +1 @@ -{"rougail.nut_monitor_netmask": "255.255.255.0", "rougail.nut_monitor_host": "192.168.0.0", "services.nut.ip.nut_monitor_host.name": "192.168.0.0", "services.nut.ip.nut_monitor_host.netmask": "255.255.255.0", "services.nut.ip.nut_monitor_host.activate": true} +{"rougail.nut_monitor_netmask": "255.255.255.0", "rougail.nut_monitor_host": "192.168.0.0", "services.nut.ip.nut_monitor_host.name": "192.168.0.0", "services.nut.ip.nut_monitor_host.netmask": "255.255.255.0", "services.nut.ip.nut_monitor_host.activate": true, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip_network/tiramisu/base.py b/tests/dictionaries/70services_ip_network/tiramisu/base.py index 41afffd5..992b4c29 100644 --- a/tests/dictionaries/70services_ip_network/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_network/tiramisu/base.py @@ -19,6 +19,8 @@ option_9 = SymLinkOption(name="netmask", opt=option_2) option_10 = BoolOption(name="activate", doc="activate", default=True) option_7 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_8, option_9, option_10]) option_6 = OptionDescription(name="ip", doc="ip", children=[option_7]) -option_5 = OptionDescription(name="nut", doc="nut", children=[option_6]) +option_11 = BoolOption(name="activate", doc="activate", default=True) +option_12 = BoolOption(name="manage", doc="manage", default=True) +option_5 = OptionDescription(name="nut", doc="nut", children=[option_6, option_11, option_12]) 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/70services_ip_not_mandatory/makedict/base.json b/tests/dictionaries/70services_ip_not_mandatory/makedict/base.json index 65c9c77a..81ff5591 100644 --- a/tests/dictionaries/70services_ip_not_mandatory/makedict/base.json +++ b/tests/dictionaries/70services_ip_not_mandatory/makedict/base.json @@ -1 +1 @@ -{"rougail.nut_monitor_host": null, "services.nut.ip.nut_monitor_host.name": null, "services.nut.ip.nut_monitor_host.activate": true} +{"rougail.nut_monitor_host": null, "services.nut.ip.nut_monitor_host.name": null, "services.nut.ip.nut_monitor_host.activate": true, "services.nut.activate": true, "services.nut.manage": true} diff --git a/tests/dictionaries/70services_ip_not_mandatory/tiramisu/base.py b/tests/dictionaries/70services_ip_not_mandatory/tiramisu/base.py index 52078d73..e71c0c20 100644 --- a/tests/dictionaries/70services_ip_not_mandatory/tiramisu/base.py +++ b/tests/dictionaries/70services_ip_not_mandatory/tiramisu/base.py @@ -17,6 +17,8 @@ option_7 = SymLinkOption(name="name", opt=option_2) option_8 = BoolOption(name="activate", doc="activate", default=True) option_6 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_7, option_8]) option_5 = OptionDescription(name="ip", doc="ip", children=[option_6]) -option_4 = OptionDescription(name="nut", doc="nut", children=[option_5]) +option_9 = BoolOption(name="activate", doc="activate", default=True) +option_10 = BoolOption(name="manage", doc="manage", default=True) +option_4 = OptionDescription(name="nut", doc="nut", children=[option_5, option_9, option_10]) option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3]) diff --git a/tests/test_3_template.py b/tests/test_3_template.py index a637cf0e..1bb423df 100644 --- a/tests/test_3_template.py +++ b/tests/test_3_template.py @@ -1,5 +1,5 @@ from os import listdir, mkdir -from os.path import join, isdir, isfile +from os.path import join, isdir, isfile, islink from shutil import rmtree from pytest import fixture, mark from lxml.etree import parse @@ -82,6 +82,8 @@ async def test_dictionary(test_dir): assert list_templates == list_results for result in list_results: template_file = join(dest_dir, result) + if islink(template_file) and islink(join(test_dir, 'result', result)): + continue if not isfile(template_file): raise Exception(f'{template_file} is not generated') with open(join(test_dir, 'result', result), 'r') as fh: