diff --git a/doc/variable/simple.md b/doc/variable/simple.md index 60792e0b..3d12c788 100644 --- a/doc/variable/simple.md +++ b/doc/variable/simple.md @@ -198,12 +198,12 @@ Une [variable meneuse ou suiveuse](leadership.md) ne peut pas avoir la propriét ## Variable à valeur en lecture seule automatique -Une variable avec valeur en lecture seule automatique est une variable dont la valeur ne sera plus modifiable par l'utilisateur quand la [variable "instanciated_module" passe à "True"](../dev/config.md). +Une variable avec valeur en lecture seule automatique est une variable dont la valeur ne sera plus modifiable par l'utilisateur quand la [variable "server_deployed" passe à "True"](../dev/config.md). Voici un variable à valeur en lecture seule automatique : ``` - + False diff --git a/src/rougail/annotator/check.py b/src/rougail/annotator/check.py index a902efcf..fda7f8f3 100644 --- a/src/rougail/annotator/check.py +++ b/src/rougail/annotator/check.py @@ -165,11 +165,10 @@ class CheckAnnotator(TargetAnnotator, ParamAnnotator): variable.values.append(choice) if has_variable: return None - for target in check.target: - self.objectspace.valid_enums[target.name.path] = {'type': variable.ori_type, - 'values': values, - 'xmlfiles': check.xmlfiles, - } + self.objectspace.valid_enums[variable.path] = {'type': variable.ori_type, + 'values': values, + 'xmlfiles': check.xmlfiles, + } return values @staticmethod diff --git a/src/rougail/annotator/condition.py b/src/rougail/annotator/condition.py index 8272705a..6abad827 100644 --- a/src/rougail/annotator/condition.py +++ b/src/rougail/annotator/condition.py @@ -77,11 +77,11 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk): if variable.namespace != self.objectspace.rougailconfig['variable_namespace']: msg = _(f'auto_freeze is not allowed in extra "{variable.namespace}"') raise DictConsistencyError(msg, 49, variable.xmlfiles) + variable.force_store_value = True + if variable.auto_save: + continue new_condition = self.objectspace.condition(variable.xmlfiles) - if variable.auto_freeze: - new_condition.name = 'auto_frozen_if_not_in' - else: - new_condition.name = 'auto_saved_if_not_in' + new_condition.name = 'auto_frozen_if_not_in' new_condition.namespace = variable.namespace new_condition.source = self.objectspace.rougailconfig['auto_freeze_variable'] new_param = self.objectspace.param(variable.xmlfiles) @@ -150,9 +150,7 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk): if condition_name.startswith('hidden_if_'): return ['hidden', 'frozen', 'force_default_on_freeze'] if condition_name == 'auto_frozen_if_not_in': - return ['force_store_value', 'frozen'] - if condition_name == 'auto_saved_if_not_in': - return ['force_store_value'] + return ['frozen'] return [condition_name.split('_', 1)[0]] def _get_family_variables_from_target(self, diff --git a/src/rougail/annotator/group.py b/src/rougail/annotator/group.py index d6d13618..8c32ca1a 100644 --- a/src/rougail/annotator/group.py +++ b/src/rougail/annotator/group.py @@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from ..i18n import _ from ..error import DictConsistencyError +from ..utils import normalize_family class GroupAnnotator: @@ -83,7 +84,7 @@ class GroupAnnotator: leader_space, ) # this variable is not more in ori_leader_family - ori_leader_family.variable.pop(variable.name) + ori_leader_family.variable.pop(normalize_family(variable.name)) if follower_names == []: # no more follower break @@ -104,9 +105,10 @@ class GroupAnnotator: msg = _(f'the variable "{variable.name}" in a group must be multi') raise DictConsistencyError(msg, 32, variable.xmlfiles) if hasattr(group, 'name'): - leadership_name = group.name + ori_leadership_name = group.name else: - leadership_name = variable.name + ori_leadership_name = variable.name + leadership_name = normalize_family(ori_leadership_name) leader_space = self.objectspace.leadership(variable.xmlfiles) leader_space.variable = [] leader_space.name = leadership_name @@ -120,18 +122,18 @@ class GroupAnnotator: elif variable.name == leadership_name and hasattr(variable, 'description'): leader_space.doc = variable.description else: - leader_space.doc = leadership_name + leader_space.doc = ori_leadership_name leadership_path = ori_leader_family.path + '.' + leadership_name self.objectspace.paths.add_leadership(variable.namespace, leadership_path, leader_space, ) - ori_leader_family.variable[variable.name] = leader_space + ori_leader_family.variable[normalize_family(variable.name)] = leader_space leader_space.variable.append(variable) self.objectspace.paths.set_leader(variable.namespace, ori_leader_family.path, leadership_name, - variable.name, + normalize_family(variable.name), ) return leader_space @@ -150,7 +152,7 @@ class GroupAnnotator: self.objectspace.paths.set_leader(variable.namespace, leader_family_name, leader_space.name, - variable.name, + normalize_family(variable.name), ) if leader_space.hidden: variable.frozen = True diff --git a/src/rougail/annotator/param.py b/src/rougail/annotator/param.py index b1b71c38..1b874bfe 100644 --- a/src/rougail/annotator/param.py +++ b/src/rougail/annotator/param.py @@ -64,6 +64,7 @@ class ParamAnnotator: try: path, suffix = self.objectspace.paths.get_variable_path(param.text, obj.namespace, + param.xmlfiles, ) param.text = self.objectspace.paths.get_variable(path) if variable_type and param.text.type != variable_type: diff --git a/src/rougail/annotator/property.py b/src/rougail/annotator/property.py index f81207da..9669d6ba 100644 --- a/src/rougail/annotator/property.py +++ b/src/rougail/annotator/property.py @@ -71,7 +71,7 @@ class PropertyAnnotator(Walk): if 'force_store_value' in variable.properties and \ 'force_default_on_freeze' in variable.properties: # pragma: no cover # should not appened - msg = _('cannot have auto_freeze or auto_store with the hidden ' + msg = _('cannot have auto_freeze or auto_save with the hidden ' f'variable "{variable.name}"') raise DictConsistencyError(msg, 50, variable.xmlfiles) if not variable.properties: diff --git a/src/rougail/annotator/service.py b/src/rougail/annotator/service.py index e09260e9..61e82d11 100644 --- a/src/rougail/annotator/service.py +++ b/src/rougail/annotator/service.py @@ -292,9 +292,9 @@ class ServiceAnnotator: 'please use a variable multiple if you want have more than one IP') raise DictConsistencyError(msg, 67, ip.xmlfiles) self.uniq_ip.append(service_name) - variable = self.objectspace.paths.get_variable(ip.name) + variable = self.objectspace.paths.get_variable(ip.name, ip.xmlfiles) if variable.type not in ['ip', 'network', 'network_cidr']: - msg = _('ip cannot be linked to "{variable.type}" variable') + msg = _(f'ip cannot be linked to "{variable.type}" variable "{ip.name}"') raise DictConsistencyError(msg, 70, ip.xmlfiles) if variable.type in ['ip', 'network_cidr'] and hasattr(ip, 'netmask'): msg = _(f'ip with ip_type "{variable.type}" must not have netmask') diff --git a/src/rougail/annotator/variable.py b/src/rougail/annotator/variable.py index 46ffabe5..1949b441 100644 --- a/src/rougail/annotator/variable.py +++ b/src/rougail/annotator/variable.py @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from ..i18n import _ from ..error import DictConsistencyError from ..objspace import convert_boolean +from ..utils import normalize_family CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int), @@ -170,6 +171,7 @@ class VariableAnnotator(Walk): # pylint: disable=R0903 if not variable.value: del variable.value variable.doc = variable.description + variable.name = normalize_family(variable.name) del variable.description if variable_type == 'follower': if variable.multi is True: diff --git a/src/rougail/config.py b/src/rougail/config.py index b9690dee..c5fd735b 100644 --- a/src/rougail/config.py +++ b/src/rougail/config.py @@ -41,7 +41,7 @@ RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')], 'dtdfilename': join(DTDDIR, 'rougail.dtd'), 'functions_file': join(ROUGAILROOT, 'functions.py'), 'variable_namespace': 'rougail', - 'auto_freeze_variable': 'instanciated_module', + 'auto_freeze_variable': 'server_deployed', 'default_engine': 'creole', 'internal_functions': [], 'modes_level': ['basic', 'normal', 'expert'], diff --git a/src/rougail/data/rougail.dtd b/src/rougail/data/rougail.dtd index ddf92e3f..f74ee7e9 100644 --- a/src/rougail/data/rougail.dtd +++ b/src/rougail/data/rougail.dtd @@ -37,7 +37,7 @@ - + diff --git a/src/rougail/objspace.py b/src/rougail/objspace.py index 48d56a8b..b7b2878f 100644 --- a/src/rougail/objspace.py +++ b/src/rougail/objspace.py @@ -328,7 +328,7 @@ class RougailObjSpace: if redefine is True: # cannot redefine an inexistant object msg = _(f'Redefined object: "{name}" does not exist yet') - raise DictConsistencyError(msg, 46, xmlfile) + raise DictConsistencyError(msg, 46, [xmlfile]) tag = FORCE_TAG.get(child.tag, child.tag) if tag not in vars(space): setattr(space, tag, {}) @@ -352,7 +352,7 @@ class RougailObjSpace: return None old_family_name = self.paths.get_variable_family_path(name) if space.path != old_family_name: - msg = _(f'Variable was previously create in family "{old_family_name}", ' + msg = _(f'Variable "{name}" was previously create in family "{old_family_name}", ' f'now it is in "{space.path}"') raise DictConsistencyError(msg, 47, space.xmlfiles) return self.paths.get_variable(name) diff --git a/src/rougail/path.py b/src/rougail/path.py index acfdebe1..ba2c43a0 100644 --- a/src/rougail/path.py +++ b/src/rougail/path.py @@ -24,6 +24,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ +from typing import List from .i18n import _ from .error import DictConsistencyError from .utils import normalize_family @@ -175,10 +176,11 @@ class Path: def get_variable(self, name: str, + xmlfiles: List[str]=[], ) -> 'Variable': # pylint: disable=C0111 """Get variable object from a path """ - variable, suffix = self._get_variable(name, with_suffix=True) + variable, suffix = self._get_variable(name, with_suffix=True, xmlfiles=xmlfiles) if suffix: raise DictConsistencyError(_(f"{name} is a dynamic variable"), 36, []) return variable['variableobj'] @@ -193,18 +195,20 @@ class Path: def get_variable_path(self, name: str, current_namespace: str, + xmlfiles: List[str]=[], ) -> str: # pylint: disable=C0111 """get full path of a variable """ dico, suffix = self._get_variable(name, with_suffix=True, + xmlfiles=xmlfiles, ) namespace = dico['variableobj'].namespace if namespace not in [self.variable_namespace, 'services'] and \ current_namespace != namespace: msg = _(f'A variable located in the "{namespace}" namespace shall not be used ' f'in the "{current_namespace}" namespace') - raise DictConsistencyError(msg, 41, []) + raise DictConsistencyError(msg, 41, xmlfiles) return dico['variableobj'].path, suffix def path_is_defined(self, @@ -226,6 +230,7 @@ class Path: def _get_variable(self, name: str, with_suffix: bool=False, + xmlfiles: List[str]=[], ) -> str: name = '.'.join([normalize_family(subname) for subname in name.split('.')]) if name not in self.variables: @@ -238,7 +243,7 @@ class Path: if variable['is_dynamic']: return variable, name[len(var_name):] if name not in self.variables: - raise DictConsistencyError(_(f'unknown option {name}'), 42, []) + raise DictConsistencyError(_(f'unknown option "{name}"'), 42, xmlfiles) if with_suffix: return self.variables[name], None return self.variables[name] diff --git a/tests/dictionaries/00empty/makedict/after.json b/tests/dictionaries/00empty/makedict/after.json new file mode 100644 index 00000000..fd94145f --- /dev/null +++ b/tests/dictionaries/00empty/makedict/after.json @@ -0,0 +1,10 @@ +{ + "services.tata.activate": { + "owner": "default", + "value": true + }, + "services.tata.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/00empty/makedict/before.json b/tests/dictionaries/00empty/makedict/before.json new file mode 100644 index 00000000..fd94145f --- /dev/null +++ b/tests/dictionaries/00empty/makedict/before.json @@ -0,0 +1,10 @@ +{ + "services.tata.activate": { + "owner": "default", + "value": true + }, + "services.tata.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/00load_autofreeze/00-base.xml b/tests/dictionaries/00load_autofreeze/00-base.xml index 21cfd3c2..119c729b 100644 --- a/tests/dictionaries/00load_autofreeze/00-base.xml +++ b/tests/dictionaries/00load_autofreeze/00-base.xml @@ -4,7 +4,7 @@ no - + False diff --git a/tests/dictionaries/00load_autofreeze/makedict/after.json b/tests/dictionaries/00load_autofreeze/makedict/after.json new file mode 100644 index 00000000..36e336b2 --- /dev/null +++ b/tests/dictionaries/00load_autofreeze/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.myvar": { + "owner": "forced", + "value": "no" + }, + "rougail.server_deployed": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/00load_autofreeze/makedict/base.json b/tests/dictionaries/00load_autofreeze/makedict/base.json index 3dfb67b1..92b8b010 100644 --- a/tests/dictionaries/00load_autofreeze/makedict/base.json +++ b/tests/dictionaries/00load_autofreeze/makedict/base.json @@ -1,4 +1,4 @@ { "rougail.myvar": "no", - "rougail.instanciated_module": false + "rougail.server_deployed": false } diff --git a/tests/dictionaries/00load_autofreeze/makedict/before.json b/tests/dictionaries/00load_autofreeze/makedict/before.json new file mode 100644 index 00000000..eaf8d2ec --- /dev/null +++ b/tests/dictionaries/00load_autofreeze/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.myvar": { + "owner": "default", + "value": "no" + }, + "rougail.server_deployed": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/00load_autofreeze/tiramisu/base.py b/tests/dictionaries/00load_autofreeze/tiramisu/base.py index d8e34b87..34e32b85 100644 --- a/tests/dictionaries/00load_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/00load_autofreeze/tiramisu/base.py @@ -11,7 +11,7 @@ try: from tiramisu3 import * except: from tiramisu import * -option_3 = BoolOption(name="instanciated_module", doc="instanciated_module", default=False, properties=frozenset({"mandatory", "normal"})) -option_2 = StrOption(name="myvar", doc="myvar", default="no", properties=frozenset({"basic", "mandatory", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_3 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"})) +option_2 = StrOption(name="myvar", doc="myvar", default="no", properties=frozenset({"basic", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/00load_autofreezeexpert/00-base.xml b/tests/dictionaries/00load_autofreezeexpert/00-base.xml index 4441553d..d4f59f6e 100644 --- a/tests/dictionaries/00load_autofreezeexpert/00-base.xml +++ b/tests/dictionaries/00load_autofreezeexpert/00-base.xml @@ -4,7 +4,7 @@ no - + False diff --git a/tests/dictionaries/00load_autofreezeexpert/makedict/after.json b/tests/dictionaries/00load_autofreezeexpert/makedict/after.json new file mode 100644 index 00000000..1082f86a --- /dev/null +++ b/tests/dictionaries/00load_autofreezeexpert/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.my_var": { + "owner": "forced", + "value": "no" + }, + "rougail.server_deployed": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/00load_autofreezeexpert/makedict/base.json b/tests/dictionaries/00load_autofreezeexpert/makedict/base.json index fcfea3be..911baaae 100644 --- a/tests/dictionaries/00load_autofreezeexpert/makedict/base.json +++ b/tests/dictionaries/00load_autofreezeexpert/makedict/base.json @@ -1,4 +1,4 @@ { "rougail.my_var": "no", - "rougail.instanciated_module": false + "rougail.server_deployed": false } diff --git a/tests/dictionaries/00load_autofreezeexpert/makedict/before.json b/tests/dictionaries/00load_autofreezeexpert/makedict/before.json new file mode 100644 index 00000000..7c8f380b --- /dev/null +++ b/tests/dictionaries/00load_autofreezeexpert/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.my_var": { + "owner": "default", + "value": "no" + }, + "rougail.server_deployed": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py b/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py index c4dd11b4..5e93d41d 100644 --- a/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py +++ b/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py @@ -11,7 +11,7 @@ try: from tiramisu3 import * except: from tiramisu import * -option_3 = BoolOption(name="instanciated_module", doc="instanciated_module", default=False, properties=frozenset({"mandatory", "normal"})) -option_2 = StrOption(name="my_var", doc="my_var", default="no", properties=frozenset({"expert", "mandatory", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_3 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"})) +option_2 = StrOption(name="my_var", doc="my_var", default="no", properties=frozenset({"expert", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/00load_autosave/00-base.xml b/tests/dictionaries/00load_autosave/00-base.xml index 216d5cd5..882ec86f 100644 --- a/tests/dictionaries/00load_autosave/00-base.xml +++ b/tests/dictionaries/00load_autosave/00-base.xml @@ -1,7 +1,7 @@ - + non diff --git a/tests/dictionaries/00load_autosave/makedict/after.json b/tests/dictionaries/00load_autosave/makedict/after.json new file mode 100644 index 00000000..b749ddd8 --- /dev/null +++ b/tests/dictionaries/00load_autosave/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": true + }, + "rougail.general.mode_conteneur_actif": { + "owner": "forced", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_autosave/makedict/base.json b/tests/dictionaries/00load_autosave/makedict/base.json index dfcc8f87..90c5c76d 100644 --- a/tests/dictionaries/00load_autosave/makedict/base.json +++ b/tests/dictionaries/00load_autosave/makedict/base.json @@ -1,4 +1,4 @@ { - "rougail.instanciated_module": true, + "rougail.server_deployed": true, "rougail.general.mode_conteneur_actif": "non" } diff --git a/tests/dictionaries/00load_autosave/makedict/before.json b/tests/dictionaries/00load_autosave/makedict/before.json new file mode 100644 index 00000000..91cd78bc --- /dev/null +++ b/tests/dictionaries/00load_autosave/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": true + }, + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_autosave/tiramisu/base.py b/tests/dictionaries/00load_autosave/tiramisu/base.py index cd1929b0..4771b8bb 100644 --- a/tests/dictionaries/00load_autosave/tiramisu/base.py +++ b/tests/dictionaries/00load_autosave/tiramisu/base.py @@ -11,8 +11,8 @@ try: from tiramisu3 import * except: from tiramisu import * -option_2 = BoolOption(name="instanciated_module", doc="instanciated_module", default=True, properties=frozenset({"mandatory", "normal"})) -option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "mandatory", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"})) +option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "force_store_value", "mandatory"})) option_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"basic"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/00load_autosaveexpert/00-base.xml b/tests/dictionaries/00load_autosaveexpert/00-base.xml index 66db324d..b2450b1d 100644 --- a/tests/dictionaries/00load_autosaveexpert/00-base.xml +++ b/tests/dictionaries/00load_autosaveexpert/00-base.xml @@ -1,7 +1,7 @@ - + non diff --git a/tests/dictionaries/00load_autosaveexpert/makedict/after.json b/tests/dictionaries/00load_autosaveexpert/makedict/after.json new file mode 100644 index 00000000..b749ddd8 --- /dev/null +++ b/tests/dictionaries/00load_autosaveexpert/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": true + }, + "rougail.general.mode_conteneur_actif": { + "owner": "forced", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_autosaveexpert/makedict/base.json b/tests/dictionaries/00load_autosaveexpert/makedict/base.json index dfcc8f87..90c5c76d 100644 --- a/tests/dictionaries/00load_autosaveexpert/makedict/base.json +++ b/tests/dictionaries/00load_autosaveexpert/makedict/base.json @@ -1,4 +1,4 @@ { - "rougail.instanciated_module": true, + "rougail.server_deployed": true, "rougail.general.mode_conteneur_actif": "non" } diff --git a/tests/dictionaries/00load_autosaveexpert/makedict/before.json b/tests/dictionaries/00load_autosaveexpert/makedict/before.json new file mode 100644 index 00000000..91cd78bc --- /dev/null +++ b/tests/dictionaries/00load_autosaveexpert/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": true + }, + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py b/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py index b4cf6221..2e1082a1 100644 --- a/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py +++ b/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py @@ -11,8 +11,8 @@ try: from tiramisu3 import * except: from tiramisu import * -option_2 = BoolOption(name="instanciated_module", doc="instanciated_module", default=True, properties=frozenset({"mandatory", "normal"})) -option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"})) +option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "force_store_value", "mandatory"})) option_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"expert"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/00load_comment/makedict/after.json b/tests/dictionaries/00load_comment/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/00load_comment/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_comment/makedict/before.json b/tests/dictionaries/00load_comment/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/00load_comment/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_notype/makedict/after.json b/tests/dictionaries/00load_notype/makedict/after.json new file mode 100644 index 00000000..89640e57 --- /dev/null +++ b/tests/dictionaries/00load_notype/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.without_type": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_notype/makedict/before.json b/tests/dictionaries/00load_notype/makedict/before.json new file mode 100644 index 00000000..89640e57 --- /dev/null +++ b/tests/dictionaries/00load_notype/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.without_type": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_save/makedict/after.json b/tests/dictionaries/00load_save/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/00load_save/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_save/makedict/before.json b/tests/dictionaries/00load_save/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/00load_save/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_subfolder/makedict/after.json b/tests/dictionaries/00load_subfolder/makedict/after.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/00load_subfolder/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/00load_subfolder/makedict/before.json b/tests/dictionaries/00load_subfolder/makedict/before.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/00load_subfolder/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01auto_autofreeze/00-base.xml b/tests/dictionaries/01auto_autofreeze/00-base.xml index 8f9e693c..7ce63e7d 100644 --- a/tests/dictionaries/01auto_autofreeze/00-base.xml +++ b/tests/dictionaries/01auto_autofreeze/00-base.xml @@ -1,7 +1,7 @@ - + no diff --git a/tests/dictionaries/01fill_autofreeze/makedict/after.json b/tests/dictionaries/01fill_autofreeze/makedict/after.json new file mode 100644 index 00000000..0a833677 --- /dev/null +++ b/tests/dictionaries/01fill_autofreeze/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.my_var1": { + "owner": "forced", + "value": "no" + }, + "rougail.my_var2": { + "owner": "default", + "value": "no" + }, + "rougail.server_deployed": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/01fill_autofreeze/makedict/base.json b/tests/dictionaries/01fill_autofreeze/makedict/base.json index 2f399273..3f79625c 100644 --- a/tests/dictionaries/01fill_autofreeze/makedict/base.json +++ b/tests/dictionaries/01fill_autofreeze/makedict/base.json @@ -1,5 +1,5 @@ { "rougail.my_var1": "no", "rougail.my_var2": "no", - "rougail.instanciated_module": false + "rougail.server_deployed": false } diff --git a/tests/dictionaries/01fill_autofreeze/makedict/before.json b/tests/dictionaries/01fill_autofreeze/makedict/before.json new file mode 100644 index 00000000..101266cd --- /dev/null +++ b/tests/dictionaries/01fill_autofreeze/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.my_var1": { + "owner": "default", + "value": "no" + }, + "rougail.my_var2": { + "owner": "default", + "value": "no" + }, + "rougail.server_deployed": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/01fill_autofreeze/tiramisu/base.py b/tests/dictionaries/01fill_autofreeze/tiramisu/base.py index c129f050..fab82d64 100644 --- a/tests/dictionaries/01fill_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/01fill_autofreeze/tiramisu/base.py @@ -12,7 +12,7 @@ try: except: from tiramisu import * option_3 = StrOption(name="my_var2", doc="my_var2", default="no", properties=frozenset({"mandatory", "normal"})) -option_4 = BoolOption(name="instanciated_module", doc="instanciated_module", default=False, properties=frozenset({"mandatory", "normal"})) -option_2 = StrOption(name="my_var1", doc="my_var1", default=Calculation(func.calc_val, Params((ParamOption(option_3)))), properties=frozenset({"basic", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_4 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"})) +option_2 = StrOption(name="my_var1", doc="my_var1", default=Calculation(func.calc_val, Params((ParamOption(option_3)))), properties=frozenset({"basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, option_4]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/01fill_autosave/00-base.xml b/tests/dictionaries/01fill_autosave/00-base.xml index fb85eacb..823d4187 100644 --- a/tests/dictionaries/01fill_autosave/00-base.xml +++ b/tests/dictionaries/01fill_autosave/00-base.xml @@ -1,7 +1,7 @@ - + non diff --git a/tests/dictionaries/01fill_autosave/makedict/after.json b/tests/dictionaries/01fill_autosave/makedict/after.json new file mode 100644 index 00000000..8ac6b9a1 --- /dev/null +++ b/tests/dictionaries/01fill_autosave/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": true + }, + "rougail.general.mode_conteneur_actif": { + "owner": "forced", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_autosave/makedict/base.json b/tests/dictionaries/01fill_autosave/makedict/base.json index 2cff867e..f380de6e 100644 --- a/tests/dictionaries/01fill_autosave/makedict/base.json +++ b/tests/dictionaries/01fill_autosave/makedict/base.json @@ -1,5 +1,5 @@ { - "rougail.instanciated_module": true, + "rougail.server_deployed": true, "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non" } diff --git a/tests/dictionaries/01fill_autosave/makedict/before.json b/tests/dictionaries/01fill_autosave/makedict/before.json new file mode 100644 index 00000000..c4f382b5 --- /dev/null +++ b/tests/dictionaries/01fill_autosave/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": true + }, + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_autosave/tiramisu/base.py b/tests/dictionaries/01fill_autosave/tiramisu/base.py index 7bfb4956..4bea789d 100644 --- a/tests/dictionaries/01fill_autosave/tiramisu/base.py +++ b/tests/dictionaries/01fill_autosave/tiramisu/base.py @@ -11,9 +11,9 @@ try: from tiramisu3 import * except: from tiramisu import * -option_2 = BoolOption(name="instanciated_module", doc="instanciated_module", default=True, properties=frozenset({"mandatory", "normal"})) +option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"})) option_5 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) -option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_5)))), properties=frozenset({"basic", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_5)))), properties=frozenset({"basic", "force_store_value"})) option_3 = OptionDescription(name="general", doc="general", children=[option_4, option_5], properties=frozenset({"basic"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/01fill_base/makedict/after.json b/tests/dictionaries/01fill_base/makedict/after.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_base/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_base/makedict/before.json b/tests/dictionaries/01fill_base/makedict/before.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_base/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_baseaccent/makedict/after.json b/tests/dictionaries/01fill_baseaccent/makedict/after.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_baseaccent/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_baseaccent/makedict/before.json b/tests/dictionaries/01fill_baseaccent/makedict/before.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_baseaccent/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_mandatory/makedict/after.json b/tests/dictionaries/01fill_mandatory/makedict/after.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_mandatory/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_mandatory/makedict/before.json b/tests/dictionaries/01fill_mandatory/makedict/before.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_mandatory/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_number/makedict/after.json b/tests/dictionaries/01fill_number/makedict/after.json new file mode 100644 index 00000000..65a98ebb --- /dev/null +++ b/tests/dictionaries/01fill_number/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": 3 + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_number/makedict/before.json b/tests/dictionaries/01fill_number/makedict/before.json new file mode 100644 index 00000000..65a98ebb --- /dev/null +++ b/tests/dictionaries/01fill_number/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": 3 + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_only_optional/makedict/after.json b/tests/dictionaries/01fill_only_optional/makedict/after.json new file mode 100644 index 00000000..477ccc55 --- /dev/null +++ b/tests/dictionaries/01fill_only_optional/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": null + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_only_optional/makedict/before.json b/tests/dictionaries/01fill_only_optional/makedict/before.json new file mode 100644 index 00000000..477ccc55 --- /dev/null +++ b/tests/dictionaries/01fill_only_optional/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": null + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_optional/makedict/after.json b/tests/dictionaries/01fill_optional/makedict/after.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_optional/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_optional/makedict/before.json b/tests/dictionaries/01fill_optional/makedict/before.json new file mode 100644 index 00000000..6ebfbbe9 --- /dev/null +++ b/tests/dictionaries/01fill_optional/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_quote/makedict/after.json b/tests/dictionaries/01fill_quote/makedict/after.json new file mode 100644 index 00000000..f0b262c4 --- /dev/null +++ b/tests/dictionaries/01fill_quote/makedict/after.json @@ -0,0 +1,18 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "quote'" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "quote\"" + }, + "rougail.general.mode_conteneur_actif2": { + "owner": "default", + "value": "quote\"'" + }, + "rougail.general.mode_conteneur_actif3": { + "owner": "default", + "value": "quote\"\\'" + } +} diff --git a/tests/dictionaries/01fill_quote/makedict/before.json b/tests/dictionaries/01fill_quote/makedict/before.json new file mode 100644 index 00000000..f0b262c4 --- /dev/null +++ b/tests/dictionaries/01fill_quote/makedict/before.json @@ -0,0 +1,18 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "quote'" + }, + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "quote\"" + }, + "rougail.general.mode_conteneur_actif2": { + "owner": "default", + "value": "quote\"'" + }, + "rougail.general.mode_conteneur_actif3": { + "owner": "default", + "value": "quote\"\\'" + } +} diff --git a/tests/dictionaries/01fill_target_optional/makedict/after.json b/tests/dictionaries/01fill_target_optional/makedict/after.json new file mode 100644 index 00000000..45961373 --- /dev/null +++ b/tests/dictionaries/01fill_target_optional/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01fill_target_optional/makedict/before.json b/tests/dictionaries/01fill_target_optional/makedict/before.json new file mode 100644 index 00000000..45961373 --- /dev/null +++ b/tests/dictionaries/01fill_target_optional/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif1": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01hidden_if_in_autofreeze/00-base.xml b/tests/dictionaries/01hidden_if_in_autofreeze/00-base.xml index c5377eb7..c8e9e8be 100644 --- a/tests/dictionaries/01hidden_if_in_autofreeze/00-base.xml +++ b/tests/dictionaries/01hidden_if_in_autofreeze/00-base.xml @@ -1,7 +1,7 @@ - + False @@ -13,7 +13,7 @@ yes my_var - + True my_var diff --git a/tests/dictionaries/01hidden_if_in_autofreeze/makedict/after.json b/tests/dictionaries/01hidden_if_in_autofreeze/makedict/after.json new file mode 100644 index 00000000..bb359545 --- /dev/null +++ b/tests/dictionaries/01hidden_if_in_autofreeze/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": false + }, + "rougail.my_var": { + "owner": "forced", + "value": "yes" + } +} diff --git a/tests/dictionaries/01hidden_if_in_autofreeze/makedict/base.json b/tests/dictionaries/01hidden_if_in_autofreeze/makedict/base.json index 87584b21..465c3cba 100644 --- a/tests/dictionaries/01hidden_if_in_autofreeze/makedict/base.json +++ b/tests/dictionaries/01hidden_if_in_autofreeze/makedict/base.json @@ -1,4 +1,4 @@ { - "rougail.instanciated_module": false, + "rougail.server_deployed": false, "rougail.my_var": "yes" } diff --git a/tests/dictionaries/01hidden_if_in_autofreeze/makedict/before.json b/tests/dictionaries/01hidden_if_in_autofreeze/makedict/before.json new file mode 100644 index 00000000..a35981a8 --- /dev/null +++ b/tests/dictionaries/01hidden_if_in_autofreeze/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.server_deployed": { + "owner": "default", + "value": false + }, + "rougail.my_var": { + "owner": "default", + "value": "yes" + } +} diff --git a/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py b/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py index 7f8f70c6..7cb46046 100644 --- a/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py @@ -11,7 +11,7 @@ try: from tiramisu3 import * except: from tiramisu import * -option_2 = BoolOption(name="instanciated_module", doc="instanciated_module", default=False, properties=frozenset({"mandatory", "normal"})) -option_3 = StrOption(name="my_var", doc="my_var", default=Calculation(func.calc_val, Params((ParamValue("yes")))), properties=frozenset({"basic", Calculation(func.calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"})) +option_3 = StrOption(name="my_var", doc="my_var", default=Calculation(func.calc_val, Params((ParamValue("yes")))), properties=frozenset({"basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_2, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/01test/makedict/after.json b/tests/dictionaries/01test/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test/makedict/before.json b/tests/dictionaries/01test/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_multi/makedict/after.json b/tests/dictionaries/01test_multi/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_multi/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_multi/makedict/before.json b/tests/dictionaries/01test_multi/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_multi/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_multi_none/makedict/after.json b/tests/dictionaries/01test_multi_none/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_multi_none/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_multi_none/makedict/before.json b/tests/dictionaries/01test_multi_none/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_multi_none/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_redefine/makedict/after.json b/tests/dictionaries/01test_redefine/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_redefine/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_redefine/makedict/before.json b/tests/dictionaries/01test_redefine/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_redefine/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_redefine_base/makedict/after.json b/tests/dictionaries/01test_redefine_base/makedict/after.json new file mode 100644 index 00000000..bd891042 --- /dev/null +++ b/tests/dictionaries/01test_redefine_base/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.my_variable": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/01test_redefine_base/makedict/before.json b/tests/dictionaries/01test_redefine_base/makedict/before.json new file mode 100644 index 00000000..bd891042 --- /dev/null +++ b/tests/dictionaries/01test_redefine_base/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.my_variable": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/01test_redefine_remove/makedict/after.json b/tests/dictionaries/01test_redefine_remove/makedict/after.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_redefine_remove/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/01test_redefine_remove/makedict/before.json b/tests/dictionaries/01test_redefine_remove/makedict/before.json new file mode 100644 index 00000000..2e6c541d --- /dev/null +++ b/tests/dictionaries/01test_redefine_remove/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + } +} diff --git a/tests/dictionaries/02autosave_hidden_frozenifin/00-base.xml b/tests/dictionaries/02autosave_hidden_frozenifin/00-base.xml index a11fb61b..bd6972f8 100644 --- a/tests/dictionaries/02autosave_hidden_frozenifin/00-base.xml +++ b/tests/dictionaries/02autosave_hidden_frozenifin/00-base.xml @@ -1,7 +1,7 @@ - + diff --git a/tests/dictionaries/60extra_externalspacecondition/makedict/after.json b/tests/dictionaries/60extra_externalspacecondition/makedict/after.json new file mode 100644 index 00000000..b2dd92d1 --- /dev/null +++ b/tests/dictionaries/60extra_externalspacecondition/makedict/after.json @@ -0,0 +1,30 @@ +{ + "rougail.general.my_var": { + "owner": "forced", + "value": "no" + }, + "rougail.general.my_var1": { + "owner": "default", + "value": "no" + }, + "rougail.general.server_deployed": { + "owner": "default", + "value": false + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": "none" + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + }, + "extra1.external.description": { + "owner": "default", + "value": "test" + } +} diff --git a/tests/dictionaries/60extra_externalspacecondition/makedict/base.json b/tests/dictionaries/60extra_externalspacecondition/makedict/base.json index 86a2ac86..1c500131 100644 --- a/tests/dictionaries/60extra_externalspacecondition/makedict/base.json +++ b/tests/dictionaries/60extra_externalspacecondition/makedict/base.json @@ -1,7 +1,7 @@ { "rougail.general.my_var": "no", "rougail.general.my_var1": "no", - "rougail.general.instanciated_module": false, + "rougail.general.server_deployed": false, "extra.ejabberd.description": "Exportation de la base de ejabberd", "extra.ejabberd.day": "none", "extra.ejabberd.mode": "pre", diff --git a/tests/dictionaries/60extra_externalspacecondition/makedict/before.json b/tests/dictionaries/60extra_externalspacecondition/makedict/before.json new file mode 100644 index 00000000..c979ff36 --- /dev/null +++ b/tests/dictionaries/60extra_externalspacecondition/makedict/before.json @@ -0,0 +1,30 @@ +{ + "rougail.general.my_var": { + "owner": "default", + "value": "no" + }, + "rougail.general.my_var1": { + "owner": "default", + "value": "no" + }, + "rougail.general.server_deployed": { + "owner": "default", + "value": false + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": "none" + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + }, + "extra1.external.description": { + "owner": "default", + "value": "test" + } +} diff --git a/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py b/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py index 34785a5f..3a3b21ea 100644 --- a/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py +++ b/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py @@ -11,8 +11,8 @@ try: from tiramisu3 import * except: from tiramisu import * -option_5 = BoolOption(name="instanciated_module", doc="instanciated_module", default=False, properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) -option_3 = StrOption(name="my_var", doc="my_var", default="no", properties=frozenset({"basic", "mandatory", Calculation(func.calc_value, Params(ParamValue('force_store_value'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)})), Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) +option_5 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) +option_3 = StrOption(name="my_var", doc="my_var", default="no", properties=frozenset({"basic", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue(True), 'reverse_condition': ParamValue(True)}))})) option_4 = StrOption(name="my_var1", doc="my_var1", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) diff --git a/tests/dictionaries/60extra_group/makedict/after.json b/tests/dictionaries/60extra_group/makedict/after.json new file mode 100644 index 00000000..9aa0c6bf --- /dev/null +++ b/tests/dictionaries/60extra_group/makedict/after.json @@ -0,0 +1,96 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description.description": { + "owner": "default", + "value": [ + "test" + ] + }, + "extra.ejabberd.description.mode": { + "owner": [ + "default" + ], + "value": [ + "pre" + ] + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "jinja2" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": "/etc/mailname2" + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/60extra_group/makedict/before.json b/tests/dictionaries/60extra_group/makedict/before.json new file mode 100644 index 00000000..9aa0c6bf --- /dev/null +++ b/tests/dictionaries/60extra_group/makedict/before.json @@ -0,0 +1,96 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description.description": { + "owner": "default", + "value": [ + "test" + ] + }, + "extra.ejabberd.description.mode": { + "owner": [ + "default" + ], + "value": [ + "pre" + ] + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "jinja2" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": "/etc/mailname2" + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/60extra_help/makedict/after.json b/tests/dictionaries/60extra_help/makedict/after.json new file mode 100644 index 00000000..5b40c269 --- /dev/null +++ b/tests/dictionaries/60extra_help/makedict/after.json @@ -0,0 +1,62 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/60extra_help/makedict/before.json b/tests/dictionaries/60extra_help/makedict/before.json new file mode 100644 index 00000000..5b40c269 --- /dev/null +++ b/tests/dictionaries/60extra_help/makedict/before.json @@ -0,0 +1,62 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/60extra_load/makedict/after.json b/tests/dictionaries/60extra_load/makedict/after.json new file mode 100644 index 00000000..383ce093 --- /dev/null +++ b/tests/dictionaries/60extra_load/makedict/after.json @@ -0,0 +1,22 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_load/makedict/before.json b/tests/dictionaries/60extra_load/makedict/before.json new file mode 100644 index 00000000..383ce093 --- /dev/null +++ b/tests/dictionaries/60extra_load/makedict/before.json @@ -0,0 +1,22 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_mandatory/makedict/after.json b/tests/dictionaries/60extra_mandatory/makedict/after.json new file mode 100644 index 00000000..bd4b713a --- /dev/null +++ b/tests/dictionaries/60extra_mandatory/makedict/after.json @@ -0,0 +1,26 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + }, + "extra.ejabberd.var1": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/60extra_mandatory/makedict/before.json b/tests/dictionaries/60extra_mandatory/makedict/before.json new file mode 100644 index 00000000..bd4b713a --- /dev/null +++ b/tests/dictionaries/60extra_mandatory/makedict/before.json @@ -0,0 +1,26 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + }, + "extra.ejabberd.var1": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/60extra_name_family/makedict/after.json b/tests/dictionaries/60extra_name_family/makedict/after.json new file mode 100644 index 00000000..19d92883 --- /dev/null +++ b/tests/dictionaries/60extra_name_family/makedict/after.json @@ -0,0 +1,22 @@ +{ + "rougail.extra.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.extra.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_name_family/makedict/before.json b/tests/dictionaries/60extra_name_family/makedict/before.json new file mode 100644 index 00000000..19d92883 --- /dev/null +++ b/tests/dictionaries/60extra_name_family/makedict/before.json @@ -0,0 +1,22 @@ +{ + "rougail.extra.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.extra.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_no_condition/makedict/after.json b/tests/dictionaries/60extra_no_condition/makedict/after.json new file mode 100644 index 00000000..0b78d652 --- /dev/null +++ b/tests/dictionaries/60extra_no_condition/makedict/after.json @@ -0,0 +1,26 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "rougail.general.module_instancie": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": "none" + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_no_condition/makedict/before.json b/tests/dictionaries/60extra_no_condition/makedict/before.json new file mode 100644 index 00000000..0b78d652 --- /dev/null +++ b/tests/dictionaries/60extra_no_condition/makedict/before.json @@ -0,0 +1,26 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "rougail.general.module_instancie": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": "none" + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_redefine/makedict/after.json b/tests/dictionaries/60extra_redefine/makedict/after.json new file mode 100644 index 00000000..383ce093 --- /dev/null +++ b/tests/dictionaries/60extra_redefine/makedict/after.json @@ -0,0 +1,22 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_redefine/makedict/before.json b/tests/dictionaries/60extra_redefine/makedict/before.json new file mode 100644 index 00000000..383ce093 --- /dev/null +++ b/tests/dictionaries/60extra_redefine/makedict/before.json @@ -0,0 +1,22 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.ejabberd.description": { + "owner": "default", + "value": "Exportation de la base de ejabberd" + }, + "extra.ejabberd.day": { + "owner": "default", + "value": null + }, + "extra.ejabberd.mode": { + "owner": "default", + "value": "pre" + } +} diff --git a/tests/dictionaries/60extra_variable_name_extra/makedict/after.json b/tests/dictionaries/60extra_variable_name_extra/makedict/after.json new file mode 100644 index 00000000..12c84953 --- /dev/null +++ b/tests/dictionaries/60extra_variable_name_extra/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.extra": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/60extra_variable_name_extra/makedict/before.json b/tests/dictionaries/60extra_variable_name_extra/makedict/before.json new file mode 100644 index 00000000..12c84953 --- /dev/null +++ b/tests/dictionaries/60extra_variable_name_extra/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "rougail.general.activer_ejabberd": { + "owner": "default", + "value": "non" + }, + "extra.extra": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/60familyaction/makedict/after.json b/tests/dictionaries/60familyaction/makedict/after.json new file mode 100644 index 00000000..00d8ee8c --- /dev/null +++ b/tests/dictionaries/60familyaction/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "extra.test.delay": { + "owner": "default", + "value": 0 + } +} diff --git a/tests/dictionaries/60familyaction/makedict/before.json b/tests/dictionaries/60familyaction/makedict/before.json new file mode 100644 index 00000000..00d8ee8c --- /dev/null +++ b/tests/dictionaries/60familyaction/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "extra.test.delay": { + "owner": "default", + "value": 0 + } +} diff --git a/tests/dictionaries/60familyaction_accent/makedict/after.json b/tests/dictionaries/60familyaction_accent/makedict/after.json new file mode 100644 index 00000000..00d8ee8c --- /dev/null +++ b/tests/dictionaries/60familyaction_accent/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "extra.test.delay": { + "owner": "default", + "value": 0 + } +} diff --git a/tests/dictionaries/60familyaction_accent/makedict/before.json b/tests/dictionaries/60familyaction_accent/makedict/before.json new file mode 100644 index 00000000..00d8ee8c --- /dev/null +++ b/tests/dictionaries/60familyaction_accent/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "extra.test.delay": { + "owner": "default", + "value": 0 + } +} diff --git a/tests/dictionaries/60familyaction_mandatory/makedict/after.json b/tests/dictionaries/60familyaction_mandatory/makedict/after.json new file mode 100644 index 00000000..8ba0e34e --- /dev/null +++ b/tests/dictionaries/60familyaction_mandatory/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "extra.test.delay": { + "owner": "default", + "value": 0 + }, + "extra.test.day": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/60familyaction_mandatory/makedict/before.json b/tests/dictionaries/60familyaction_mandatory/makedict/before.json new file mode 100644 index 00000000..8ba0e34e --- /dev/null +++ b/tests/dictionaries/60familyaction_mandatory/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "extra.test.delay": { + "owner": "default", + "value": 0 + }, + "extra.test.day": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/61extra_dyn/makedict/after.json b/tests/dictionaries/61extra_dyn/makedict/after.json new file mode 100644 index 00000000..648ee5b1 --- /dev/null +++ b/tests/dictionaries/61extra_dyn/makedict/after.json @@ -0,0 +1,12 @@ +{ + "rougail.general.varname": { + "owner": "default", + "value": [ + "a" + ] + }, + "extra.ejabberda.modea": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/61extra_dyn/makedict/before.json b/tests/dictionaries/61extra_dyn/makedict/before.json new file mode 100644 index 00000000..648ee5b1 --- /dev/null +++ b/tests/dictionaries/61extra_dyn/makedict/before.json @@ -0,0 +1,12 @@ +{ + "rougail.general.varname": { + "owner": "default", + "value": [ + "a" + ] + }, + "extra.ejabberda.modea": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/61extra_dyn_extra/makedict/after.json b/tests/dictionaries/61extra_dyn_extra/makedict/after.json new file mode 100644 index 00000000..a14294f6 --- /dev/null +++ b/tests/dictionaries/61extra_dyn_extra/makedict/after.json @@ -0,0 +1,18 @@ +{ + "rougail.general.varname": { + "owner": "default", + "value": [ + "a" + ] + }, + "extra.general.varname": { + "owner": "default", + "value": [ + "a" + ] + }, + "extra.ejabberda.modea": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/61extra_dyn_extra/makedict/before.json b/tests/dictionaries/61extra_dyn_extra/makedict/before.json new file mode 100644 index 00000000..a14294f6 --- /dev/null +++ b/tests/dictionaries/61extra_dyn_extra/makedict/before.json @@ -0,0 +1,18 @@ +{ + "rougail.general.varname": { + "owner": "default", + "value": [ + "a" + ] + }, + "extra.general.varname": { + "owner": "default", + "value": [ + "a" + ] + }, + "extra.ejabberda.modea": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/70container_files/makedict/after.json b/tests/dictionaries/70container_files/makedict/after.json new file mode 100644 index 00000000..5c192e2b --- /dev/null +++ b/tests/dictionaries/70container_files/makedict/after.json @@ -0,0 +1,78 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.rougail_conf.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.rougail_conf.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.rougail_conf.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.rougail_conf.name": { + "owner": "default", + "value": "/rougail.conf" + }, + "services.test.files.rougail_conf.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.source": { + "owner": "default", + "value": "rougail.conf" + }, + "services.test.files.rougail_conf.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files/makedict/before.json b/tests/dictionaries/70container_files/makedict/before.json new file mode 100644 index 00000000..5c192e2b --- /dev/null +++ b/tests/dictionaries/70container_files/makedict/before.json @@ -0,0 +1,78 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.rougail_conf.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.rougail_conf.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.rougail_conf.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.rougail_conf.name": { + "owner": "default", + "value": "/rougail.conf" + }, + "services.test.files.rougail_conf.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.source": { + "owner": "default", + "value": "rougail.conf" + }, + "services.test.files.rougail_conf.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_symlink_multi/makedict/after.json b/tests/dictionaries/70container_files_symlink_multi/makedict/after.json new file mode 100644 index 00000000..e3a6bf88 --- /dev/null +++ b/tests/dictionaries/70container_files_symlink_multi/makedict/after.json @@ -0,0 +1,94 @@ +{ + "rougail.file_name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "rougail.file_name2": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "jinja2" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_symlink_multi/makedict/before.json b/tests/dictionaries/70container_files_symlink_multi/makedict/before.json new file mode 100644 index 00000000..e3a6bf88 --- /dev/null +++ b/tests/dictionaries/70container_files_symlink_multi/makedict/before.json @@ -0,0 +1,94 @@ +{ + "rougail.file_name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "rougail.file_name2": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "jinja2" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_symlink_multi_variable/makedict/after.json b/tests/dictionaries/70container_files_symlink_multi_variable/makedict/after.json new file mode 100644 index 00000000..6711d294 --- /dev/null +++ b/tests/dictionaries/70container_files_symlink_multi_variable/makedict/after.json @@ -0,0 +1,115 @@ +{ + "rougail.file_name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "rougail.file_name2": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "rougail.var": { + "owner": "default", + "value": [ + "mailname", + "mailname2" + ] + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.variable": { + "owner": "default", + "value": [ + "mailname", + "mailname2" + ] + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "jinja2" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.variable": { + "owner": "default", + "value": [ + "mailname", + "mailname2" + ] + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_symlink_multi_variable/makedict/before.json b/tests/dictionaries/70container_files_symlink_multi_variable/makedict/before.json new file mode 100644 index 00000000..6711d294 --- /dev/null +++ b/tests/dictionaries/70container_files_symlink_multi_variable/makedict/before.json @@ -0,0 +1,115 @@ +{ + "rougail.file_name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "rougail.file_name2": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "rougail.var": { + "owner": "default", + "value": [ + "mailname", + "mailname2" + ] + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": [ + "/etc/mailname", + "/etc/mailname2" + ] + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.variable": { + "owner": "default", + "value": [ + "mailname", + "mailname2" + ] + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "jinja2" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": [ + "/etc/mailname3", + "/etc/mailname4" + ] + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.variable": { + "owner": "default", + "value": [ + "mailname", + "mailname2" + ] + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_symlink_variable/makedict/after.json b/tests/dictionaries/70container_files_symlink_variable/makedict/after.json new file mode 100644 index 00000000..e48099e4 --- /dev/null +++ b/tests/dictionaries/70container_files_symlink_variable/makedict/after.json @@ -0,0 +1,54 @@ +{ + "rougail.file_name": { + "owner": "default", + "value": "/etc/mailname" + }, + "rougail.var": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.variable": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_symlink_variable/makedict/before.json b/tests/dictionaries/70container_files_symlink_variable/makedict/before.json new file mode 100644 index 00000000..e48099e4 --- /dev/null +++ b/tests/dictionaries/70container_files_symlink_variable/makedict/before.json @@ -0,0 +1,54 @@ +{ + "rougail.file_name": { + "owner": "default", + "value": "/etc/mailname" + }, + "rougail.var": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.variable": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_twice/makedict/after.json b/tests/dictionaries/70container_files_twice/makedict/after.json new file mode 100644 index 00000000..2cd2d9ea --- /dev/null +++ b/tests/dictionaries/70container_files_twice/makedict/after.json @@ -0,0 +1,110 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname_1.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname_1.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_1.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname_1.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname_1.name": { + "owner": "default", + "value": "/etc/eole/mailname" + }, + "services.test.files.mailname_1.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_1.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname_1.activate": { + "owner": "default", + "value": true + }, + "services.test.files.rougail_conf.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.rougail_conf.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.rougail_conf.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.rougail_conf.name": { + "owner": "default", + "value": "/rougail.conf" + }, + "services.test.files.rougail_conf.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.source": { + "owner": "default", + "value": "rougail.conf" + }, + "services.test.files.rougail_conf.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_files_twice/makedict/before.json b/tests/dictionaries/70container_files_twice/makedict/before.json new file mode 100644 index 00000000..2cd2d9ea --- /dev/null +++ b/tests/dictionaries/70container_files_twice/makedict/before.json @@ -0,0 +1,110 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname_1.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname_1.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_1.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname_1.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname_1.name": { + "owner": "default", + "value": "/etc/eole/mailname" + }, + "services.test.files.mailname_1.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_1.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname_1.activate": { + "owner": "default", + "value": true + }, + "services.test.files.rougail_conf.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.rougail_conf.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.rougail_conf.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.rougail_conf.name": { + "owner": "default", + "value": "/rougail.conf" + }, + "services.test.files.rougail_conf.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.rougail_conf.source": { + "owner": "default", + "value": "rougail.conf" + }, + "services.test.files.rougail_conf.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_filesmulti/makedict/after.json b/tests/dictionaries/70container_filesmulti/makedict/after.json new file mode 100644 index 00000000..1a7923ae --- /dev/null +++ b/tests/dictionaries/70container_filesmulti/makedict/after.json @@ -0,0 +1,78 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": "/etc/mailname2" + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_filesmulti/makedict/before.json b/tests/dictionaries/70container_filesmulti/makedict/before.json new file mode 100644 index 00000000..1a7923ae --- /dev/null +++ b/tests/dictionaries/70container_filesmulti/makedict/before.json @@ -0,0 +1,78 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname.source": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.mailname.activate": { + "owner": "default", + "value": true + }, + "services.test.files.mailname2.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname2.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname2.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname2.name": { + "owner": "default", + "value": "/etc/mailname2" + }, + "services.test.files.mailname2.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname2.source": { + "owner": "default", + "value": "mailname2" + }, + "services.test.files.mailname2.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_filesredefine/makedict/after.json b/tests/dictionaries/70container_filesredefine/makedict/after.json new file mode 100644 index 00000000..74cbb06d --- /dev/null +++ b/tests/dictionaries/70container_filesredefine/makedict/after.json @@ -0,0 +1,46 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname_new.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname_new.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_new.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname_new.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname_new.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname_new.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_new.source": { + "owner": "default", + "value": "mailname.new" + }, + "services.test.files.mailname_new.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_filesredefine/makedict/before.json b/tests/dictionaries/70container_filesredefine/makedict/before.json new file mode 100644 index 00000000..74cbb06d --- /dev/null +++ b/tests/dictionaries/70container_filesredefine/makedict/before.json @@ -0,0 +1,46 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.files.mailname_new.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.mailname_new.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_new.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.mailname_new.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.mailname_new.name": { + "owner": "default", + "value": "/etc/mailname" + }, + "services.test.files.mailname_new.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.mailname_new.source": { + "owner": "default", + "value": "mailname.new" + }, + "services.test.files.mailname_new.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_new/makedict/after.json b/tests/dictionaries/70container_new/makedict/after.json new file mode 100644 index 00000000..07fda6ef --- /dev/null +++ b/tests/dictionaries/70container_new/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_new/makedict/before.json b/tests/dictionaries/70container_new/makedict/before.json new file mode 100644 index 00000000..07fda6ef --- /dev/null +++ b/tests/dictionaries/70container_new/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_newnocont/makedict/after.json b/tests/dictionaries/70container_newnocont/makedict/after.json new file mode 100644 index 00000000..b7f1fd9e --- /dev/null +++ b/tests/dictionaries/70container_newnocont/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_newnocont/makedict/before.json b/tests/dictionaries/70container_newnocont/makedict/before.json new file mode 100644 index 00000000..b7f1fd9e --- /dev/null +++ b/tests/dictionaries/70container_newnocont/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "non" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_newwithip/makedict/after.json b/tests/dictionaries/70container_newwithip/makedict/after.json new file mode 100644 index 00000000..cfa1cc50 --- /dev/null +++ b/tests/dictionaries/70container_newwithip/makedict/after.json @@ -0,0 +1,18 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "rougail.general.adresse_ip_test": { + "owner": "default", + "value": null + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_newwithip/makedict/before.json b/tests/dictionaries/70container_newwithip/makedict/before.json new file mode 100644 index 00000000..cfa1cc50 --- /dev/null +++ b/tests/dictionaries/70container_newwithip/makedict/before.json @@ -0,0 +1,18 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "rougail.general.adresse_ip_test": { + "owner": "default", + "value": null + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70container_save/makedict/after.json b/tests/dictionaries/70container_save/makedict/after.json new file mode 100644 index 00000000..3a4c0953 --- /dev/null +++ b/tests/dictionaries/70container_save/makedict/after.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + } +} diff --git a/tests/dictionaries/70container_save/makedict/before.json b/tests/dictionaries/70container_save/makedict/before.json new file mode 100644 index 00000000..3a4c0953 --- /dev/null +++ b/tests/dictionaries/70container_save/makedict/before.json @@ -0,0 +1,6 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + } +} diff --git a/tests/dictionaries/70service_base/makedict/after.json b/tests/dictionaries/70service_base/makedict/after.json new file mode 100644 index 00000000..c8847b43 --- /dev/null +++ b/tests/dictionaries/70service_base/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.testsrv.activate": { + "owner": "default", + "value": true + }, + "services.testsrv.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_base/makedict/before.json b/tests/dictionaries/70service_base/makedict/before.json new file mode 100644 index 00000000..c8847b43 --- /dev/null +++ b/tests/dictionaries/70service_base/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.general.mode_conteneur_actif": { + "owner": "default", + "value": "oui" + }, + "services.testsrv.activate": { + "owner": "default", + "value": true + }, + "services.testsrv.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_not_managed/makedict/after.json b/tests/dictionaries/70service_not_managed/makedict/after.json new file mode 100644 index 00000000..03f90b20 --- /dev/null +++ b/tests/dictionaries/70service_not_managed/makedict/after.json @@ -0,0 +1,46 @@ +{ + "rougail.var": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.test.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.test.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.test.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.test.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.test.name": { + "owner": "default", + "value": "/tmp/test" + }, + "services.test.files.test.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.test.source": { + "owner": "default", + "value": "test" + }, + "services.test.files.test.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/70service_not_managed/makedict/before.json b/tests/dictionaries/70service_not_managed/makedict/before.json new file mode 100644 index 00000000..03f90b20 --- /dev/null +++ b/tests/dictionaries/70service_not_managed/makedict/before.json @@ -0,0 +1,46 @@ +{ + "rougail.var": { + "owner": "default", + "value": "mailname" + }, + "services.test.files.test.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.test.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.test.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.test.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.test.name": { + "owner": "default", + "value": "/tmp/test" + }, + "services.test.files.test.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.test.source": { + "owner": "default", + "value": "test" + }, + "services.test.files.test.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/70service_servicelist/makedict/after.json b/tests/dictionaries/70service_servicelist/makedict/after.json new file mode 100644 index 00000000..70056b4a --- /dev/null +++ b/tests/dictionaries/70service_servicelist/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_servicelist/makedict/before.json b/tests/dictionaries/70service_servicelist/makedict/before.json new file mode 100644 index 00000000..70056b4a --- /dev/null +++ b/tests/dictionaries/70service_servicelist/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_servicelist_file/makedict/after.json b/tests/dictionaries/70service_servicelist_file/makedict/after.json new file mode 100644 index 00000000..0df03129 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/makedict/after.json @@ -0,0 +1,50 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.test.files.file.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.file.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.file.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.file.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.file.name": { + "owner": "default", + "value": "/etc/file" + }, + "services.test.files.file.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.file.source": { + "owner": "default", + "value": "file" + }, + "services.test.files.file.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": false + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_servicelist_file/makedict/before.json b/tests/dictionaries/70service_servicelist_file/makedict/before.json new file mode 100644 index 00000000..0df03129 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_file/makedict/before.json @@ -0,0 +1,50 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.test.files.file.engine": { + "owner": "default", + "value": "creole" + }, + "services.test.files.file.group": { + "owner": "default", + "value": "root" + }, + "services.test.files.file.included": { + "owner": "default", + "value": "no" + }, + "services.test.files.file.mode": { + "owner": "default", + "value": "0644" + }, + "services.test.files.file.name": { + "owner": "default", + "value": "/etc/file" + }, + "services.test.files.file.owner": { + "owner": "default", + "value": "root" + }, + "services.test.files.file.source": { + "owner": "default", + "value": "file" + }, + "services.test.files.file.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": false + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_servicelist_ip/makedict/after.json b/tests/dictionaries/70service_servicelist_ip/makedict/after.json new file mode 100644 index 00000000..73263cb6 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_ip/makedict/after.json @@ -0,0 +1,26 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.test.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.test.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": false + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_servicelist_ip/makedict/before.json b/tests/dictionaries/70service_servicelist_ip/makedict/before.json new file mode 100644 index 00000000..73263cb6 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_ip/makedict/before.json @@ -0,0 +1,26 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.test.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.test.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.test.activate": { + "owner": "default", + "value": false + }, + "services.test.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70service_servicelist_not_managed/makedict/after.json b/tests/dictionaries/70service_servicelist_not_managed/makedict/after.json new file mode 100644 index 00000000..983c1185 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_not_managed/makedict/after.json @@ -0,0 +1,14 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/70service_servicelist_not_managed/makedict/before.json b/tests/dictionaries/70service_servicelist_not_managed/makedict/before.json new file mode 100644 index 00000000..983c1185 --- /dev/null +++ b/tests/dictionaries/70service_servicelist_not_managed/makedict/before.json @@ -0,0 +1,14 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "services.test.activate": { + "owner": "default", + "value": true + }, + "services.test.manage": { + "owner": "default", + "value": false + } +} diff --git a/tests/dictionaries/70services_ip/makedict/after.json b/tests/dictionaries/70services_ip/makedict/after.json new file mode 100644 index 00000000..7090ae97 --- /dev/null +++ b/tests/dictionaries/70services_ip/makedict/after.json @@ -0,0 +1,22 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip/makedict/before.json b/tests/dictionaries/70services_ip/makedict/before.json new file mode 100644 index 00000000..7090ae97 --- /dev/null +++ b/tests/dictionaries/70services_ip/makedict/before.json @@ -0,0 +1,22 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.1" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_cidr/makedict/after.json b/tests/dictionaries/70services_ip_cidr/makedict/after.json new file mode 100644 index 00000000..f9eedc89 --- /dev/null +++ b/tests/dictionaries/70services_ip_cidr/makedict/after.json @@ -0,0 +1,22 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_cidr/makedict/before.json b/tests/dictionaries/70services_ip_cidr/makedict/before.json new file mode 100644 index 00000000..f9eedc89 --- /dev/null +++ b/tests/dictionaries/70services_ip_cidr/makedict/before.json @@ -0,0 +1,22 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_iplist/makedict/after.json b/tests/dictionaries/70services_ip_iplist/makedict/after.json new file mode 100644 index 00000000..e182cf46 --- /dev/null +++ b/tests/dictionaries/70services_ip_iplist/makedict/after.json @@ -0,0 +1,26 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_iplist/makedict/before.json b/tests/dictionaries/70services_ip_iplist/makedict/before.json new file mode 100644 index 00000000..e182cf46 --- /dev/null +++ b/tests/dictionaries/70services_ip_iplist/makedict/before.json @@ -0,0 +1,26 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "no" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_iplist2/makedict/after.json b/tests/dictionaries/70services_ip_iplist2/makedict/after.json new file mode 100644 index 00000000..75059141 --- /dev/null +++ b/tests/dictionaries/70services_ip_iplist2/makedict/after.json @@ -0,0 +1,26 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "yes" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": false + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_iplist2/makedict/before.json b/tests/dictionaries/70services_ip_iplist2/makedict/before.json new file mode 100644 index 00000000..75059141 --- /dev/null +++ b/tests/dictionaries/70services_ip_iplist2/makedict/before.json @@ -0,0 +1,26 @@ +{ + "rougail.condition": { + "owner": "default", + "value": "yes" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0/24" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": false + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_leadership/makedict/after.json b/tests/dictionaries/70services_ip_leadership/makedict/after.json new file mode 100644 index 00000000..5a0141a7 --- /dev/null +++ b/tests/dictionaries/70services_ip_leadership/makedict/after.json @@ -0,0 +1,42 @@ +{ + "rougail.general.nut_monitor_netmask.nut_monitor_netmask": { + "owner": "default", + "value": [ + "255.255.255.0" + ] + }, + "rougail.general.nut_monitor_netmask.nut_monitor_host": { + "owner": [ + "default" + ], + "value": [ + "192.168.1.0" + ] + }, + "services.ntp.ip.nut_monitor_host.name": { + "owner": [ + "default" + ], + "value": [ + "192.168.1.0" + ] + }, + "services.ntp.ip.nut_monitor_host.netmask": { + "owner": "default", + "value": [ + "255.255.255.0" + ] + }, + "services.ntp.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.ntp.activate": { + "owner": "default", + "value": true + }, + "services.ntp.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_leadership/makedict/before.json b/tests/dictionaries/70services_ip_leadership/makedict/before.json new file mode 100644 index 00000000..5a0141a7 --- /dev/null +++ b/tests/dictionaries/70services_ip_leadership/makedict/before.json @@ -0,0 +1,42 @@ +{ + "rougail.general.nut_monitor_netmask.nut_monitor_netmask": { + "owner": "default", + "value": [ + "255.255.255.0" + ] + }, + "rougail.general.nut_monitor_netmask.nut_monitor_host": { + "owner": [ + "default" + ], + "value": [ + "192.168.1.0" + ] + }, + "services.ntp.ip.nut_monitor_host.name": { + "owner": [ + "default" + ], + "value": [ + "192.168.1.0" + ] + }, + "services.ntp.ip.nut_monitor_host.netmask": { + "owner": "default", + "value": [ + "255.255.255.0" + ] + }, + "services.ntp.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.ntp.activate": { + "owner": "default", + "value": true + }, + "services.ntp.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_multi/makedict/after.json b/tests/dictionaries/70services_ip_multi/makedict/after.json new file mode 100644 index 00000000..c8561374 --- /dev/null +++ b/tests/dictionaries/70services_ip_multi/makedict/after.json @@ -0,0 +1,28 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": [ + "192.168.0.1", + "192.168.0.2" + ] + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": [ + "192.168.0.1", + "192.168.0.2" + ] + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_multi/makedict/before.json b/tests/dictionaries/70services_ip_multi/makedict/before.json new file mode 100644 index 00000000..c8561374 --- /dev/null +++ b/tests/dictionaries/70services_ip_multi/makedict/before.json @@ -0,0 +1,28 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": [ + "192.168.0.1", + "192.168.0.2" + ] + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": [ + "192.168.0.1", + "192.168.0.2" + ] + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_network/makedict/after.json b/tests/dictionaries/70services_ip_network/makedict/after.json new file mode 100644 index 00000000..64270526 --- /dev/null +++ b/tests/dictionaries/70services_ip_network/makedict/after.json @@ -0,0 +1,30 @@ +{ + "rougail.nut_monitor_netmask": { + "owner": "default", + "value": "255.255.255.0" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0" + }, + "services.nut.ip.nut_monitor_host.netmask": { + "owner": "default", + "value": "255.255.255.0" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_network/makedict/before.json b/tests/dictionaries/70services_ip_network/makedict/before.json new file mode 100644 index 00000000..64270526 --- /dev/null +++ b/tests/dictionaries/70services_ip_network/makedict/before.json @@ -0,0 +1,30 @@ +{ + "rougail.nut_monitor_netmask": { + "owner": "default", + "value": "255.255.255.0" + }, + "rougail.nut_monitor_host": { + "owner": "default", + "value": "192.168.0.0" + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": "192.168.0.0" + }, + "services.nut.ip.nut_monitor_host.netmask": { + "owner": "default", + "value": "255.255.255.0" + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_not_mandatory/makedict/after.json b/tests/dictionaries/70services_ip_not_mandatory/makedict/after.json new file mode 100644 index 00000000..048ea242 --- /dev/null +++ b/tests/dictionaries/70services_ip_not_mandatory/makedict/after.json @@ -0,0 +1,22 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": null + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": null + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/70services_ip_not_mandatory/makedict/before.json b/tests/dictionaries/70services_ip_not_mandatory/makedict/before.json new file mode 100644 index 00000000..048ea242 --- /dev/null +++ b/tests/dictionaries/70services_ip_not_mandatory/makedict/before.json @@ -0,0 +1,22 @@ +{ + "rougail.nut_monitor_host": { + "owner": "default", + "value": null + }, + "services.nut.ip.nut_monitor_host.name": { + "owner": "default", + "value": null + }, + "services.nut.ip.nut_monitor_host.activate": { + "owner": "default", + "value": true + }, + "services.nut.activate": { + "owner": "default", + "value": true + }, + "services.nut.manage": { + "owner": "default", + "value": true + } +} diff --git a/tests/dictionaries/80leadership_auto_save/00-base.xml b/tests/dictionaries/80leadership_auto_save/00-base.xml index 57eacdf7..be9f75ad 100644 --- a/tests/dictionaries/80leadership_auto_save/00-base.xml +++ b/tests/dictionaries/80leadership_auto_save/00-base.xml @@ -1,7 +1,7 @@ - + non diff --git a/tests/dictionaries/80leadership_autofreeze/00-base.xml b/tests/dictionaries/80leadership_autofreeze/00-base.xml index 35741c0b..41349632 100644 --- a/tests/dictionaries/80leadership_autofreeze/00-base.xml +++ b/tests/dictionaries/80leadership_autofreeze/00-base.xml @@ -2,7 +2,7 @@ - + diff --git a/tests/dictionaries/80mode_conflict/00-base.xml b/tests/dictionaries/80mode_conflict/00-base.xml index 657937ca..52f4562b 100644 --- a/tests/dictionaries/80mode_conflict/00-base.xml +++ b/tests/dictionaries/80mode_conflict/00-base.xml @@ -1,7 +1,7 @@ - + non diff --git a/tests/test_2_makedict.py b/tests/test_2_makedict.py index db5069ca..9a042630 100644 --- a/tests/test_2_makedict.py +++ b/tests/test_2_makedict.py @@ -5,6 +5,7 @@ from os import listdir, mkdir from json import dump, load, dumps, loads from tiramisu import Config +from tiramisu.error import PropertiesOptionError dico_dirs = 'tests/dictionaries' @@ -37,30 +38,77 @@ def test_dir(request): async def launch_flattener(test_dir): makedict_dir = join(test_dir, 'makedict') makedict_file = join(makedict_dir, 'base.json') + makedict_before = join(makedict_dir, 'before.json') + makedict_after = join(makedict_dir, 'after.json') modulepath = test_dir.replace('/', '.') + '.tiramisu.base' mod = __import__(modulepath) for token in modulepath.split(".")[1:]: mod = getattr(mod, token) config = await Config(mod.option_0) + # change default rights + ro_origin = await config.property.getdefault('read_only', 'append') + ro_append = frozenset(ro_origin - {'force_store_value'}) + rw_origin = await config.property.getdefault('read_write', 'append') + rw_append = frozenset(rw_origin - {'force_store_value'}) + await config.property.setdefault(ro_append, 'read_only', 'append') + await config.property.setdefault(rw_append, 'read_write', 'append') + await config.information.set('test_information', 'value') await config.property.read_only() await config.property.pop('mandatory') await config.information.set('info', 'value') config_dict = await config.value.dict(leader_to_list=True) - if config_dict: - if not isdir(makedict_dir): - mkdir(makedict_dir) - if not isfile(makedict_file) or debug: - with open(makedict_file, 'w') as fh: - dump(config_dict, fh, indent=4) - fh.write('\n') + if not isdir(makedict_dir): + mkdir(makedict_dir) + if not isfile(makedict_file) or debug: + with open(makedict_file, 'w') as fh: + dump(config_dict, fh, indent=4) + fh.write('\n') if not isfile(makedict_file): - if config_dict: - raise Exception('dict is not empty') - else: - with open(makedict_file, 'r') as fh: - assert load(fh) == loads(dumps(config_dict)) + raise Exception('dict is not empty') + with open(makedict_file, 'r') as fh: + assert load(fh) == loads(dumps(config_dict)) + # + await value_owner(makedict_before, config) + # deploy + ro = await config.property.getdefault('read_only', 'append') + ro = frozenset(list(ro) + ['force_store_value']) + await config.property.setdefault(ro, 'read_only', 'append') + rw = await config.property.getdefault('read_write', 'append') + rw = frozenset(list(rw) + ['force_store_value']) + await config.property.setdefault(rw, 'read_write', 'append') + await config.property.add('force_store_value') + # + await value_owner(makedict_after, config) + +async def value_owner(makedict_value_owner, config): + ret = {} + for key in await config.option.list(recursive=True): + path = await key.option.path() + if await key.option.isfollower(): + value = [] + owner = [] + for idx in range(0, await key.value.len()): + try: + option = config.option(path, idx) + value.append(await option.value.get()) + owner.append(await option.owner.get()) + except PropertiesOptionError as err: + value.append(str(err)) + owner.append('error') + else: + value = await key.value.get() + owner = await key.owner.get() + ret[path] = {'owner': owner, + 'value': value, + } + if not isfile(makedict_value_owner) or debug: + with open(makedict_value_owner, 'w') as fh: + dump(ret, fh, indent=4) + fh.write('\n') + with open(makedict_value_owner, 'r') as fh: + assert load(fh) == loads(dumps(ret)) @mark.asyncio