loads multipe machine for one config

This commit is contained in:
Emmanuel Garette 2022-10-01 22:27:22 +02:00
parent a058d4a20d
commit f6143e843c
638 changed files with 18243 additions and 5086 deletions

View file

@ -100,7 +100,7 @@ Dans ce cas, tous les services et les éléments qu'il compose avec un attribut
La désactivation du service va créé un lien symbolique vers /dev/null.
Si vous ne voulez juste pas créé le fichier de service et ne pas faire de lien symbolique, il faut utiliser l'attribut undisable :
Si vous ne voulez juste pas créer le fichier de service et ne pas faire de lien symbolique, il faut utiliser l'attribut undisable :
```
<service name="test" disabled="True" undisable="True"/>

View file

@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
from .variable import CONVERT_OPTION
import importlib.resources
from os.path import dirname, join
from os.path import dirname, join, isfile
from ..utils import load_modules
@ -83,6 +83,7 @@ class SpaceAnnotator: # pylint: disable=R0903
annotators = sorted(annotators, key=get_level)
functions = []
for eosfunc_file in eosfunc_files:
if isfile(eosfunc_file):
functions.extend(dir(load_modules(eosfunc_file)))
for annotator in annotators:
annotator(objectspace,

View file

@ -44,30 +44,31 @@ class Annotator(TargetAnnotator, ParamAnnotator):
functions,
*args,
):
if not hasattr(objectspace.space, 'constraints') or \
not hasattr(objectspace.space.constraints, 'check'):
return
self.objectspace = objectspace
self.let_none = True
self.only_variable = True
self.target_is_uniq = False
self.allow_function = True
self.functions = copy(functions)
self.functions.extend(INTERNAL_FUNCTIONS)
self.functions.extend(self.objectspace.rougailconfig['internal_functions'])
self.target_is_uniq = False
self.allow_function = True
self.convert_target(self.objectspace.space.constraints.check)
self.convert_param(self.objectspace.space.constraints.check)
self.check_check()
self.check_change_warning()
self.convert_valid_entier()
self.convert_check()
del objectspace.space.constraints.check
for path_prefix, constraints in self.get_constraints():
if not hasattr(constraints, 'check'):
continue
self.convert_target(constraints.check, path_prefix)
self.convert_param(constraints.check, path_prefix)
self.check_check(constraints)
self.check_change_warning(constraints)
self.convert_valid_entier(constraints)
self.convert_check(constraints)
del constraints.check
def check_check(self): # pylint: disable=R0912
def check_check(self,
constraints,
): # pylint: disable=R0912
"""valid and manage <check>
"""
remove_indexes = []
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
for check_idx, check in enumerate(constraints.check):
if not check.name in self.functions:
msg = _(f'cannot find check function "{check.name}"')
raise DictConsistencyError(msg, 1, check.xmlfiles)
@ -75,20 +76,24 @@ class Annotator(TargetAnnotator, ParamAnnotator):
remove_indexes.append(check_idx)
remove_indexes.sort(reverse=True)
for idx in remove_indexes:
del self.objectspace.space.constraints.check[idx]
del constraints.check[idx]
def check_change_warning(self):
def check_change_warning(self,
constraints,
):
"""convert level to "warnings_only"
"""
for check in self.objectspace.space.constraints.check:
for check in constraints.check:
check.warnings_only = check.level == 'warning'
check.level = None
def convert_valid_entier(self) -> None:
def convert_valid_entier(self,
constraints,
) -> None:
"""valid and manage <check>
"""
remove_indexes = []
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
for check_idx, check in enumerate(constraints.check):
if not check.name == 'valid_entier':
continue
remove_indexes.append(check_idx)
@ -111,12 +116,14 @@ class Annotator(TargetAnnotator, ParamAnnotator):
raise DictConsistencyError(msg, 19, check.xmlfiles)
remove_indexes.sort(reverse=True)
for idx in remove_indexes:
del self.objectspace.space.constraints.check[idx]
del constraints.check[idx]
def convert_check(self) -> None:
def convert_check(self,
constraints,
) -> None:
"""valid and manage <check>
"""
for check in self.objectspace.space.constraints.check:
for check in constraints.check:
for target in check.target:
if not hasattr(target.name, 'validators'):
target.name.validators = []

View file

@ -44,24 +44,24 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
*args,
):
self.objectspace = objectspace
self.force_service_value = {}
if hasattr(objectspace.space, 'variables'):
self.convert_auto_freeze()
if not hasattr(objectspace.space, 'constraints') or \
not hasattr(self.objectspace.space.constraints, 'condition'):
return
self.target_is_uniq = False
self.only_variable = False
self.allow_function = False
self.convert_target(self.objectspace.space.constraints.condition)
self.check_condition_optional()
self.convert_condition_source()
self.convert_param(self.objectspace.space.constraints.condition)
self.check_source_target()
self.convert_xxxlist()
self.check_choice_option_condition()
self.remove_condition_with_empty_target()
self.convert_condition()
self.force_service_value = {}
if hasattr(objectspace.space, 'variables'):
self.convert_auto_freeze()
for path_prefix, constraints in self.get_constraints():
if not hasattr(constraints, 'condition'):
continue
self.convert_target(constraints.condition, path_prefix)
self.check_condition_optional(constraints, path_prefix)
self.convert_condition_source(constraints, path_prefix)
self.convert_param(constraints.condition, path_prefix)
self.check_source_target(constraints)
self.convert_xxxlist(constraints, path_prefix)
self.check_choice_option_condition(constraints, path_prefix)
self.remove_condition_with_empty_target(constraints)
self.convert_condition(constraints, path_prefix)
def valid_type_validation(self,
obj,
@ -84,7 +84,10 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
if variable.auto_save:
continue
auto_freeze_variable = self.objectspace.rougailconfig['auto_freeze_variable']
if not self.objectspace.paths.path_is_defined(auto_freeze_variable):
if not self.objectspace.paths.path_is_defined(auto_freeze_variable,
self.objectspace.rougailconfig['variable_namespace'],
variable.path_prefix,
):
msg = _(f'the variable "{variable.name}" is auto_freeze but there is no variable "{auto_freeze_variable}"')
raise DictConsistencyError(msg, 81, variable.xmlfiles)
new_condition = self.objectspace.condition(variable.xmlfiles)
@ -96,18 +99,22 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
new_condition.param = [new_param]
new_target = self.objectspace.target(variable.xmlfiles)
new_target.type = 'variable'
new_target.name = variable.path
path = variable.path
if variable.path_prefix:
path = path.split('.', 1)[-1]
new_target.name = path
new_condition.target = [new_target]
if not hasattr(self.objectspace.space, 'constraints'):
self.objectspace.space.constraints = self.objectspace.constraints(variable.xmlfiles)
if not hasattr(self.objectspace.space.constraints, 'condition'):
self.objectspace.space.constraints.condition = []
self.objectspace.space.constraints.condition.append(new_condition)
path_prefix, constraints = next(self.get_constraints(create=True,
path_prefix=variable.path_prefix,
))
if not hasattr(constraints, 'condition'):
constraints.condition = []
constraints.condition.append(new_condition)
def check_source_target(self):
def check_source_target(self, constraints):
"""verify that source != target in condition
"""
for condition in self.objectspace.space.constraints.condition:
for condition in constraints.condition:
for target in condition.target:
if target.type == 'variable' and \
condition.source.path == target.name.path:
@ -115,25 +122,34 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
f'{condition.source.path}')
raise DictConsistencyError(msg, 11, condition.xmlfiles)
def check_condition_optional(self):
def check_condition_optional(self,
constraints,
path_prefix,
):
"""a condition with a optional **and** the source variable doesn't exist
"""
remove_conditions = []
for idx, condition in enumerate(self.objectspace.space.constraints.condition):
for idx, condition in enumerate(constraints.condition):
if condition.optional is False or \
self.objectspace.paths.path_is_defined(condition.source):
self.objectspace.paths.path_is_defined(condition.source,
condition.namespace,
path_prefix,
):
continue
remove_conditions.append(idx)
if (hasattr(condition, 'apply_on_fallback') and condition.apply_on_fallback) or \
(not hasattr(condition, 'apply_on_fallback') and \
condition.name.endswith('_if_in')):
self.force_actions_to_variable(condition)
self.force_actions_to_variable(condition,
path_prefix,
)
remove_conditions.sort(reverse=True)
for idx in remove_conditions:
self.objectspace.space.constraints.condition.pop(idx)
constraints.condition.pop(idx)
def force_actions_to_variable(self,
condition: 'self.objectspace.condition',
path_prefix,
) -> None:
"""force property to a variable
for example disabled_if_not_in => variable.disabled = True
@ -144,7 +160,9 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
if target.type.endswith('list'):
self.force_service_value[target.name] = main_action != 'disabled'
continue
leader_or_var, variables = self._get_family_variables_from_target(target)
leader_or_var, variables = self._get_family_variables_from_target(target,
path_prefix,
)
setattr(leader_or_var, main_action, True)
for action in actions[1:]:
for variable in variables:
@ -162,35 +180,41 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
def _get_family_variables_from_target(self,
target,
path_prefix,
):
if target.type == 'variable':
if not self.objectspace.paths.is_leader(target.name.path):
if not self.objectspace.paths.is_leader(target.name):
return target.name, [target.name]
# it's a leader, so apply property to leadership
family_name = self.objectspace.paths.get_variable_family_path(target.name.path)
namespace = target.name.namespace
family_name = self.objectspace.paths.get_variable_family_path(target.name.path,
namespace,
force_path_prefix=path_prefix,
)
else:
family_name = target.name.path
namespace = target.namespace
variable = self.objectspace.paths.get_family(family_name,
namespace,
path_prefix,
)
if hasattr(variable, 'variable'):
return variable, list(variable.variable.values())
return variable, []
def convert_xxxlist(self):
def convert_xxxlist(self, constraints, path_prefix):
"""transform *list to variable or family
"""
fills = {}
for condition in self.objectspace.space.constraints.condition:
for condition in constraints.condition:
remove_targets = []
for target_idx, target in enumerate(condition.target):
if target.type.endswith('list'):
listvars = self.objectspace.list_conditions.get(target.type,
listvars = self.objectspace.paths.list_conditions[path_prefix].get(target.type,
{}).get(target.name)
if listvars:
self._convert_xxxlist_to_fill(condition,
self._convert_xxxlist_to_fill(constraints,
condition,
target,
listvars,
fills,
@ -204,6 +228,7 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
condition.target.pop(target_idx)
def _convert_xxxlist_to_fill(self,
constraints,
condition: 'self.objectspace.condition',
target: 'self.objectspace.target',
listvars: list,
@ -211,9 +236,11 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
):
for listvar in listvars:
if target.name in self.force_service_value:
# do not add fill, just change default value
listvar.default = self.force_service_value[target.name]
continue
if listvar.path in fills:
# a fill is already set for this path
fill = fills[listvar.path]
or_needed = True
for param in fill.param:
@ -225,14 +252,17 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
else:
fill = self.objectspace.fill(target.xmlfiles)
new_target = self.objectspace.target(target.xmlfiles)
new_target.name = listvar.path
path = listvar.path
if listvar.path_prefix:
path = path.split('.', 1)[-1]
new_target.name = path
fill.target = [new_target]
fill.name = 'calc_value'
fill.namespace = 'services'
fill.index = 0
if not hasattr(self.objectspace.space.constraints, 'fill'):
self.objectspace.space.constraints.fill = []
self.objectspace.space.constraints.fill.append(fill)
if not hasattr(constraints, 'fill'):
constraints.fill = []
constraints.fill.append(fill)
fills[listvar.path] = fill
param1 = self.objectspace.param(target.xmlfiles)
param1.text = False
@ -255,7 +285,10 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
param3 = self.objectspace.param(target.xmlfiles)
param3.name = f'condition_{fill.index}'
param3.type = 'variable'
param3.text = condition.source.path
path = condition.source.path
if condition.source.path_prefix:
path = path.split('.', 1)[-1]
param3.text = path
param3.propertyerror = False
fill.param.append(param3)
param4 = self.objectspace.param(target.xmlfiles)
@ -275,12 +308,17 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
param6.text = 'OR'
fill.param.append(param6)
def convert_condition_source(self):
def convert_condition_source(self, constraints, path_prefix):
"""remove condition for ChoiceOption that don't have param
"""
for condition in self.objectspace.space.constraints.condition:
for condition in constraints.condition:
try:
condition.source = self.objectspace.paths.get_variable(condition.source)
condition.source = self.objectspace.paths.get_variable(condition.source,
condition.namespace,
allow_variable_namespace=True,
force_path_prefix=path_prefix,
add_path_prefix=True,
)
except DictConsistencyError as err:
if err.errno == 36:
msg = _(f'the source "{condition.source}" in condition cannot be a dynamic '
@ -291,13 +329,21 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
raise DictConsistencyError(msg, 23, condition.xmlfiles) from err
raise err from err # pragma: no cover
def check_choice_option_condition(self):
def check_choice_option_condition(self,
constraints,
path_prefix,
):
"""remove condition of ChoiceOption that doesn't match
"""
remove_conditions = []
for condition_idx, condition in enumerate(self.objectspace.space.constraints.condition):
if condition.source.path in self.objectspace.valid_enums:
valid_enum = self.objectspace.valid_enums[condition.source.path]['values']
for condition_idx, condition in enumerate(constraints.condition):
if not self.objectspace.paths.has_valid_enums(condition.source.path,
condition.source.path_prefix,
):
continue
valid_enum = self.objectspace.paths.get_valid_enums(condition.source.path,
condition.source.path_prefix,
)
remove_param = [param_idx for param_idx, param in enumerate(condition.param) \
if param.type != 'variable' and param.text not in valid_enum]
if not remove_param:
@ -306,31 +352,35 @@ class Annotator(TargetAnnotator, ParamAnnotator, Walk):
for idx in remove_param:
del condition.param[idx]
if not condition.param and condition.name.endswith('_if_not_in'):
self.force_actions_to_variable(condition)
self.force_actions_to_variable(condition,
path_prefix,
)
remove_conditions.append(condition_idx)
remove_conditions.sort(reverse=True)
for idx in remove_conditions:
self.objectspace.space.constraints.condition.pop(idx)
constraints.condition.pop(idx)
def remove_condition_with_empty_target(self):
def remove_condition_with_empty_target(self, constraints):
"""remove condition with empty target
"""
# optional target are remove, condition could be empty
remove_conditions = [condition_idx for condition_idx, condition in \
enumerate(self.objectspace.space.constraints.condition) \
enumerate(constraints.condition) \
if not condition.target]
remove_conditions.sort(reverse=True)
for idx in remove_conditions:
self.objectspace.space.constraints.condition.pop(idx)
constraints.condition.pop(idx)
def convert_condition(self):
def convert_condition(self, constraints, path_prefix):
"""valid and manage <condition>
"""
for condition in self.objectspace.space.constraints.condition:
for condition in constraints.condition:
actions = self.get_actions_from_condition(condition.name)
for param in condition.param:
for target in condition.target:
leader_or_variable, variables = self._get_family_variables_from_target(target)
leader_or_variable, variables = self._get_family_variables_from_target(target,
path_prefix,
)
# if option is already disable, do not apply disable_if_in
# check only the first action (example of multiple actions:
# 'hidden', 'frozen', 'force_default_on_freeze')

View file

@ -61,6 +61,17 @@ class Annotator(Walk):
self.dynamic_families()
self.convert_help()
def remove_empty_families(self) -> None:
"""Remove all families without any variable
"""
removed_families = {}
for family, parent in self.get_families(with_parent=True):
if isinstance(family, self.objectspace.family) and not self._has_variable(family):
removed_families.setdefault(parent, []).append(family)
for parent, families in removed_families.items():
for family in families:
del parent.variable[family.name]
def _has_variable(self,
family: 'self.objectspace.family',
) -> bool:
@ -73,18 +84,6 @@ class Annotator(Walk):
return True
return False
def remove_empty_families(self) -> None:
"""Remove all families without any variable
"""
#FIXME pas sous family
for families in self.objectspace.space.variables.values():
removed_families = []
for family_name, family in families.variable.items():
if isinstance(family, self.objectspace.family) and not self._has_variable(family):
removed_families.append(family_name)
for family_name in removed_families:
del families.variable[family_name]
def family_names(self) -> None:
"""Set doc, path, ... to family
"""
@ -268,7 +267,13 @@ class Annotator(Walk):
for family in self.get_families():
if 'dynamic' not in vars(family):
continue
family.suffixes = self.objectspace.paths.get_variable(family.dynamic, family.xmlfiles)
family.suffixes = self.objectspace.paths.get_variable(family.dynamic,
family.namespace,
xmlfiles=family.xmlfiles,
allow_variable_namespace=True,
force_path_prefix=family.path_prefix,
add_path_prefix=True,
)
del family.dynamic
if not family.suffixes.multi:
msg = _(f'dynamic family "{family.name}" must be linked '

View file

@ -44,9 +44,6 @@ class Annotator(TargetAnnotator, ParamAnnotator):
functions,
*args,
):
if not hasattr(objectspace.space, 'constraints') or \
not hasattr(objectspace.space.constraints, 'fill'):
return
self.objectspace = objectspace
self.functions = copy(functions)
self.functions.extend(self.objectspace.rougailconfig['internal_functions'])
@ -55,10 +52,13 @@ class Annotator(TargetAnnotator, ParamAnnotator):
self.target_is_uniq = True
self.only_variable = True
self.allow_function = False
self.convert_target(self.objectspace.space.constraints.fill)
self.convert_param(self.objectspace.space.constraints.fill)
self.fill_to_value()
del self.objectspace.space.constraints.fill
for path_prefix, constraints in self.get_constraints():
if not hasattr(constraints, 'fill'):
continue
self.convert_target(constraints.fill, path_prefix)
self.convert_param(constraints.fill, path_prefix)
self.fill_to_value(constraints)
del constraints.fill
def calc_is_multi(self, variable: 'self.objectspace.variable') -> bool:
multi = variable.multi
@ -66,12 +66,12 @@ class Annotator(TargetAnnotator, ParamAnnotator):
return multi
if multi == 'submulti':
return True
return not self.objectspace.paths.is_follower(variable.path)
return not self.objectspace.paths.is_follower(variable)
def fill_to_value(self) -> None:
def fill_to_value(self, constraints) -> None:
"""valid and manage <fill>
"""
for fill in self.objectspace.space.constraints.fill:
for fill in constraints.fill:
# test if the function exists
if fill.name not in self.functions:
msg = _(f'cannot find fill function "{fill.name}"')

View file

@ -46,7 +46,7 @@ class ParamAnnotator:
"""
return None
def convert_param(self, objects) -> None:
def convert_param(self, objects, path_prefix) -> None:
""" valid and convert param
"""
for obj in objects:
@ -64,22 +64,27 @@ class ParamAnnotator:
msg = _(f'"{param.type}" parameter must not have a value')
raise DictConsistencyError(msg, 40, obj.xmlfiles)
elif param.type == 'variable':
if not isinstance(param.text, self.objectspace.variable):
try:
path, suffix = self.objectspace.paths.get_variable_path(param.text,
param.text, suffix = self.objectspace.paths.get_variable_with_suffix(param.text,
obj.namespace,
param.xmlfiles,
path_prefix,
)
param.text = self.objectspace.paths.get_variable(path)
if variable_type and param.text.type != variable_type:
msg = _(f'"{obj.name}" has type "{variable_type}" but param '
f'has type "{param.text.type}"')
raise DictConsistencyError(msg, 26, param.xmlfiles)
if suffix:
param.suffix = suffix
family_path = self.objectspace.paths.get_variable_family_path(path)
namespace = param.text.namespace
family_path = self.objectspace.paths.get_variable_family_path(param.text.path,
namespace,
force_path_prefix=path_prefix,
)
param.family = self.objectspace.paths.get_family(family_path,
namespace,
path_prefix,
)
except DictConsistencyError as err:
if err.errno != 42 or not param.optional:
@ -101,7 +106,7 @@ class ParamAnnotator:
# no param.text
if param.type == 'suffix':
for target in obj.target:
if not self.objectspace.paths.variable_is_dynamic(target.name.path):
if not self.objectspace.paths.is_dynamic(target.name):
target_name = target.name
if isinstance(target_name, self.objectspace.variable):
target_name = target_name.name
@ -110,7 +115,7 @@ class ParamAnnotator:
raise DictConsistencyError(msg, 53, obj.xmlfiles)
elif param.type == 'index':
for target in obj.target:
if not self.objectspace.paths.is_follower(target.name.path):
if not self.objectspace.paths.is_follower(target.name):
msg = _(f'"{param.type}" parameter cannot be set with target '
f'"{target.name.name}" which is not a follower variable')
raise DictConsistencyError(msg, 60, obj.xmlfiles)

View file

@ -42,8 +42,16 @@ class Annotator(Walk):
*args
) -> None:
self.objectspace = objectspace
if hasattr(self.objectspace.space, 'services'):
self.convert_services()
services = []
if not self.objectspace.paths.has_path_prefix() and hasattr(self.objectspace.space, 'services'):
services.append(self.objectspace.space.services)
elif hasattr(self.objectspace.space, 'variables'):
for path_prefix in self.objectspace.paths.get_path_prefixes():
if path_prefix in self.objectspace.space.variables and \
hasattr(self.objectspace.space.variables[path_prefix], 'services'):
services.append(self.objectspace.space.variables[path_prefix].services)
for service in services:
self.convert_services(service)
if hasattr(self.objectspace.space, 'variables'):
self.convert_family()
self.convert_variable()
@ -57,12 +65,12 @@ class Annotator(Walk):
if isinstance(variable, self.objectspace.variable) and variable.hidden is True and \
variable.name != self.objectspace.rougailconfig['auto_freeze_variable']:
if not variable.auto_freeze and \
not hasattr(variable, 'provider'):
not hasattr(variable, 'provider') and not hasattr(variable, 'supplier'):
variable.frozen = True
if not variable.auto_save and \
not variable.auto_freeze and \
'force_default_on_freeze' not in vars(variable) and \
not hasattr(variable, 'provider'):
not hasattr(variable, 'provider') and not hasattr(variable, 'supplier'):
variable.force_default_on_freeze = True
if not hasattr(variable, 'properties'):
variable.properties = []
@ -72,6 +80,11 @@ class Annotator(Walk):
# for subprop in CONVERT_PROPERTIES.get(prop, [prop]):
variable.properties.append(prop)
setattr(variable, prop, None)
if hasattr(variable, 'unique') and variable.unique != 'nil':
if variable.unique == 'False':
variable.properties.append('notunique')
else:
variable.properties.append('unique')
if hasattr(variable, 'mode') and variable.mode:
variable.properties.append(variable.mode)
variable.mode = None
@ -84,13 +97,13 @@ class Annotator(Walk):
if not variable.properties:
del variable.properties
def convert_services(self) -> None:
def convert_services(self, services) -> None:
"""convert services
"""
self.convert_property(self.objectspace.space.services)
for services in self.objectspace.space.services.service.values():
self.convert_property(services)
for service in vars(services).values():
for services_ in services.service.values():
self.convert_property(services_)
for service in vars(services_).values():
if not isinstance(service, self.objectspace.family):
continue
self.convert_property(service)

View file

@ -53,23 +53,39 @@ class Annotator:
*args,
) -> None:
self.objectspace = objectspace
self.uniq_overrides = []
self.uniq_overrides = {}
if 'network_type' not in self.objectspace.types:
self.objectspace.types['network_type'] = self.objectspace.types['ip_type']
services = []
if not self.objectspace.paths.has_path_prefix():
self.uniq_overrides[None] = []
if hasattr(self.objectspace.space, 'services'):
if not hasattr(self.objectspace.space.services, 'service'):
del self.objectspace.space.services
else:
self.convert_services()
services.append((None, 'services', self.objectspace.space.services))
elif hasattr(self.objectspace.space, 'variables'):
for path_prefix in self.objectspace.paths.get_path_prefixes():
self.uniq_overrides[path_prefix] = []
root_path = f'{path_prefix}.services'
if not path_prefix in self.objectspace.space.variables or \
not hasattr(self.objectspace.space.variables[path_prefix], 'services'):
continue
if not hasattr(self.objectspace.space.variables[path_prefix].services, 'service'):
del self.objectspace.space.variables[path_prefix].services
else:
services.append((path_prefix, root_path, self.objectspace.space.variables[path_prefix].services))
for path_prefix, root_path, service in services:
self.convert_services(path_prefix, root_path, service)
def convert_services(self):
def convert_services(self, path_prefix, root_path, services):
"""convert services to variables
"""
self.objectspace.space.services.hidden = True
self.objectspace.space.services.name = 'services'
self.objectspace.space.services.doc = 'services'
self.objectspace.space.services.path = 'services'
for service_name, service in self.objectspace.space.services.service.items():
services.hidden = True
services.name = 'services'
services.doc = 'services'
services.path = root_path
for service_name, service in services.service.items():
service.name = normalize_family(service_name)
activate_obj = self._generate_element('boolean',
None,
@ -77,19 +93,26 @@ class Annotator:
'activate',
not service.disabled,
service,
'.'.join(['services', service.name, 'activate']),
f'{root_path}.{service.name}',
path_prefix,
)
service.disabled = None
for elttype, values in dict(vars(service)).items():
dico = dict(vars(service))
if 'type' not in dico:
if service.manage:
dico['type'] = service.type
else:
dico['type'] = 'none'
for elttype, values in dico.items():
if elttype == 'servicelist':
self.objectspace.list_conditions.setdefault('servicelist',
self.objectspace.paths.list_conditions[path_prefix].setdefault('servicelist',
{}).setdefault(
values,
[]).append(activate_obj)
continue
if elttype in ERASED_ATTRIBUTES:
continue
if not service.manage and elttype not in ALLOW_ATTRIBUT_NOT_MANAGE:
if not service.manage and elttype not in ALLOW_ATTRIBUT_NOT_MANAGE and (elttype != 'type' or values != 'none'):
msg = _(f'unmanage service cannot have "{elttype}"')
raise DictConsistencyError(msg, 66, service.xmlfiles)
if isinstance(values, (dict, list)):
@ -97,10 +120,14 @@ class Annotator:
eltname = elttype + 's'
else:
eltname = elttype
path = '.'.join(['services', service.name, eltname])
if hasattr(service, 'servicelist'):
if isinstance(values, dict):
for key, value in values.items():
setattr(value, 'servicelist', service.servicelist)
family = self._gen_family(eltname,
path,
f'{root_path}.{service.name}',
service.xmlfiles,
path_prefix,
with_informations=False,
)
if isinstance(values, dict):
@ -108,21 +135,24 @@ class Annotator:
family.family = self.make_group_from_elts(service_name,
elttype,
values,
path,
f'{root_path}.{service.name}.{eltname}',
root_path,
path_prefix,
)
setattr(service, elttype, family)
else:
if not hasattr(service, 'information'):
service.information = self.objectspace.information(service.xmlfiles)
setattr(service.information, elttype, values)
service.path = '.'.join(['services', service.name])
service.path = f'{root_path}.{service.name}'
manage = self._generate_element('boolean',
None,
None,
'manage',
service.manage,
service,
'.'.join(['services', service.name, 'manage']),
f'{root_path}.{service.name}',
path_prefix,
)
service.variable = [activate_obj, manage]
service.doc = service_name
@ -132,6 +162,8 @@ class Annotator:
elttype,
elts,
path,
root_path,
path_prefix,
):
"""Splits each objects into a group (and `OptionDescription`, in tiramisu terms)
and build elements and its attributes (the `Options` in tiramisu terms)
@ -144,13 +176,17 @@ class Annotator:
if hasattr(self, update_elt):
getattr(self, update_elt)(elt,
service_name,
path_prefix,
)
c_name, subpath = self._get_name_path(elt,
path,
root_path,
path_prefix,
)
family = self._gen_family(c_name,
subpath,
subpath.rsplit('.', 1)[0],
elt.xmlfiles,
path_prefix,
)
family.variable = []
if hasattr(elt, 'disabled'):
@ -163,14 +199,15 @@ class Annotator:
'activate',
not disabled,
elt,
'.'.join([subpath, 'activate']),
subpath,
path_prefix,
)
for key in dir(elt):
if key.startswith('_') or key.endswith('_type') or key in ERASED_ATTRIBUTES2:
continue
value = getattr(elt, key)
if key == listname:
self.objectspace.list_conditions.setdefault(listname,
if key in [listname, 'servicelist']:
self.objectspace.paths.list_conditions[path_prefix].setdefault(key,
{}).setdefault(
value,
[]).append(activate_obj)
@ -189,7 +226,8 @@ class Annotator:
key,
value,
elt,
f'{subpath}.{key}'
subpath,
path_prefix,
))
else:
setattr(family.information, key, value)
@ -201,6 +239,8 @@ class Annotator:
def _get_name_path(self,
elt,
path: str,
root_path: str,
path_prefix: str,
) -> Tuple[str, str]:
# create element name, if already exists, add _xx to be uniq
if hasattr(elt, 'source') and elt.source:
@ -214,7 +254,7 @@ class Annotator:
c_name += f'_{idx}'
subpath = '{}.{}'.format(path, normalize_family(c_name))
try:
self.objectspace.paths.get_family(subpath, 'services')
self.objectspace.paths.get_family(subpath, root_path, path_prefix)
except DictConsistencyError as err:
if err.errno == 42:
return c_name, subpath
@ -222,8 +262,9 @@ class Annotator:
def _gen_family(self,
name,
path,
subpath,
xmlfiles,
path_prefix,
with_informations=True,
):
family = self.objectspace.family(xmlfiles)
@ -231,9 +272,10 @@ class Annotator:
family.doc = name
family.mode = None
self.objectspace.paths.add_family('services',
path,
subpath,
family,
None,
False,
force_path_prefix=path_prefix,
)
if with_informations:
family.information = self.objectspace.information(xmlfiles)
@ -247,13 +289,19 @@ class Annotator:
value,
elt,
path,
path_prefix,
): # pylint: disable=R0913
variable = self.objectspace.variable(elt.xmlfiles)
variable.name = normalize_family(key)
variable.mode = None
variable.type = type_
if type_ == 'symlink':
variable.opt = self.objectspace.paths.get_variable(value, xmlfiles=elt.xmlfiles)
variable.opt = self.objectspace.paths.get_variable(value,
self.objectspace.rougailconfig['variable_namespace'],
xmlfiles=elt.xmlfiles,
force_path_prefix=path_prefix,
add_path_prefix=True,
)
variable.multi = None
needed_type = self.objectspace.types[dtd_key_type]
if needed_type not in ('variable', variable.opt.type):
@ -267,22 +315,22 @@ class Annotator:
variable.namespace = 'services'
self.objectspace.paths.add_variable('services',
path,
'service',
False,
variable,
force_path_prefix=path_prefix
)
return variable
def _update_override(self,
override,
service_name,
path_prefix,
):
if service_name in self.uniq_overrides:
if service_name in self.uniq_overrides[path_prefix]:
msg = _('only one override is allowed by service, '
'please use a variable multiple if you want have more than one IP')
raise DictConsistencyError(msg, 69, override.xmlfiles)
self.uniq_overrides.append(service_name)
self.uniq_overrides[path_prefix].append(service_name)
override.name = service_name
if not hasattr(override, 'source'):
override.source = service_name
@ -290,6 +338,7 @@ class Annotator:
@staticmethod
def _update_file(file_,
service_name,
path_prefix,
):
if not hasattr(file_, 'file_type') or file_.file_type == "filename":
if not hasattr(file_, 'source'):
@ -302,8 +351,14 @@ class Annotator:
def _update_ip(self,
ip,
service_name,
path_prefix,
) -> None:
variable = self.objectspace.paths.get_variable(ip.name, ip.xmlfiles)
variable = self.objectspace.paths.get_variable(ip.name,
ip.namespace,
xmlfiles=ip.xmlfiles,
force_path_prefix=path_prefix,
add_path_prefix=True,
)
if variable.type not in ['ip', 'network', 'network_cidr']:
msg = _(f'ip cannot be linked to "{variable.type}" variable "{ip.name}"')
raise DictConsistencyError(msg, 70, ip.xmlfiles)
@ -314,7 +369,12 @@ class Annotator:
msg = _(f'ip with ip_type "{variable.type}" must have netmask')
raise DictConsistencyError(msg, 64, ip.xmlfiles)
if hasattr(ip, 'netmask'):
netmask = self.objectspace.paths.get_variable(ip.netmask, ip.xmlfiles)
netmask = self.objectspace.paths.get_variable(ip.netmask,
ip.namespace,
xmlfiles=ip.xmlfiles,
force_path_prefix=path_prefix,
add_path_prefix=True,
)
if netmask.type != 'netmask':
msg = _(f'netmask in ip must have type "netmask", not "{netmask.type}"')
raise DictConsistencyError(msg, 65, ip.xmlfiles)

View file

@ -26,13 +26,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
from rougail.i18n import _
from rougail.error import DictConsistencyError
from rougail.annotator.variable import Walk
class TargetAnnotator:
class TargetAnnotator(Walk):
"""Target annotator
"""
def convert_target(self,
objects,
path_prefix,
) -> None:
""" valid and convert param
"""
@ -52,10 +54,12 @@ class TargetAnnotator:
# let's replace the target by the path
try:
if target.type == 'variable':
path, suffix = self.objectspace.paths.get_variable_path(target.name,
if not isinstance(target.name, self.objectspace.variable):
target.name, suffix = self.objectspace.paths.get_variable_with_suffix(target.name,
obj.namespace,
target.xmlfiles,
path_prefix,
)
target.name = self.objectspace.paths.get_variable(path)
if suffix:
msg = _(f'target to {target.name.path} with suffix is not allowed')
raise DictConsistencyError(msg, 35, obj.xmlfiles)
@ -73,6 +77,8 @@ class TargetAnnotator:
raise DictConsistencyError(msg, 51, target.xmlfiles)
target.name = self.objectspace.paths.get_family(target.name,
obj.namespace,
path_prefix,
allow_variable_namespace=True,
)
elif target.type.endswith('list') and \
obj.name not in ['disabled_if_in', 'disabled_if_not_in']:

View file

@ -75,9 +75,13 @@ class Annotator(Walk): # pylint: disable=R0903
if variable.value[0].type == 'calculation':
variable.default = variable.value[0]
elif variable.multi:
if not self.objectspace.paths.is_follower(variable.path):
if self.objectspace.paths.is_follower(variable):
if variable.multi != 'submulti' and len(variable.value) != 1:
msg = _(f'the follower "{variable.name}" without multi attribute can only have one value')
raise DictConsistencyError(msg, 87, variable.xmlfiles)
else:
variable.default = [value.name for value in variable.value]
if not self.objectspace.paths.is_leader(variable.path):
if not self.objectspace.paths.is_leader(variable):
if variable.multi == 'submulti':
variable.default_multi = [value.name for value in variable.value]
else:

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from rougail.i18n import _
from rougail.error import DictConsistencyError
from rougail.objspace import convert_boolean
from rougail.objspace import convert_boolean, get_variables
CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
@ -56,7 +56,7 @@ CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
'allow_ip': False}),
'web_address': dict(opttype="URLOption", initkwargs={'allow_ip': True,
'allow_without_dot': True}),
'port': dict(opttype="PortOption", initkwargs={'allow_private': True}),
'port': dict(opttype="PortOption", initkwargs={'allow_private': True, 'allow_protocol': True}),
'mac': dict(opttype="MACOption"),
'cidr': dict(opttype="IPOption", initkwargs={'cidr': True}),
'network_cidr': dict(opttype="NetworkOption", initkwargs={'cidr': True}),
@ -71,35 +71,56 @@ class Walk:
def get_variables(self):
"""Iter all variables from the objectspace
"""
for family in self.objectspace.space.variables.values():
yield from self._get_variables(family)
yield from get_variables(self.objectspace)
def _get_variables(self,
family: 'self.objectspace.family',
def get_families(self,
with_parent: bool=False,
):
if not hasattr(family, 'variable'):
return
for variable in family.variable.values():
if isinstance(variable, self.objectspace.family):
yield from self._get_variables(variable)
else:
yield variable
def get_families(self):
"""Iter all families from the objectspace
"""
for family in self.objectspace.space.variables.values():
yield from self._get_families(family)
yield from self._get_families(family, None, with_parent)
def _get_families(self,
family: 'self.objectspace.family',
old_family: 'self.objectspace.family',
with_parent: bool,
):
if with_parent:
yield family, old_family,
if hasattr(family, 'variable'):
if not with_parent:
yield family
if not hasattr(family, 'variable'):
return
for fam in family.variable.values():
if isinstance(fam, self.objectspace.family):
yield from self._get_families(fam)
yield from self._get_families(fam, family, with_parent)
if hasattr(family, 'variables'):
for fam in family.variables.values():
yield from self._get_families(fam, family, with_parent)
def get_constraints(self,
create: bool=False,
path_prefix: str=None,
):
if not self.objectspace.paths.has_path_prefix():
if hasattr(self.objectspace.space, 'constraints'):
yield None, self.objectspace.space.constraints
elif create:
self.objectspace.space.constraints = self.objectspace.constraints(None)
yield None, self.objectspace.space.constraints
else:
if path_prefix:
path_prefixes = [path_prefix]
else:
path_prefixes = self.objectspace.paths.get_path_prefixes()
for path_prefix in path_prefixes:
if hasattr(self.objectspace.space, 'variables') and \
path_prefix in self.objectspace.space.variables and \
hasattr(self.objectspace.space.variables[path_prefix], 'constraints'):
yield path_prefix, self.objectspace.space.variables[path_prefix].constraints
elif create:
self.objectspace.space.variables[path_prefix].constraints = self.objectspace.constraints(None)
yield path_prefix, self.objectspace.space.variables[path_prefix].constraints
class Annotator(Walk): # pylint: disable=R0903
@ -166,7 +187,10 @@ class Annotator(Walk): # pylint: disable=R0903
elif choice.type == 'space':
choice.name = ' '
elif choice.type == 'variable':
choice.name = self.objectspace.paths.get_variable(choice.name)
choice.name = self.objectspace.paths.get_variable(choice.name,
variable.namespace,
force_path_prefix=variable.path_prefix,
)
if not choice.name.multi:
msg = _(f'only multi "variable" is allowed for a choice '
f'of variable "{variable.name}"')
@ -186,10 +210,10 @@ class Annotator(Walk): # pylint: disable=R0903
f'of all expected values ({values})')
raise DictConsistencyError(msg, 15, value.xmlfiles)
ref_choice = variable.choice[0]
self.objectspace.valid_enums[variable.path] = {'type': ref_choice.type,
'values': values,
'xmlfiles': ref_choice.xmlfiles,
}
self.objectspace.paths.set_valid_enums(variable.path,
values,
variable.path_prefix,
)
elif variable.type == 'choice':
msg = _(f'choice is mandatory for the variable "{variable.name}" with choice type')
raise DictConsistencyError(msg, 4, variable.xmlfiles)

View file

@ -56,4 +56,10 @@ RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')],
'default_files_group': 'root',
'default_files_included': 'no',
'default_overrides_engine': 'creole',
'default_service_names_engine': 'none',
'default_systemd_directory': '/systemd',
'base_option_name': 'baseoption',
'export_with_import': True,
'force_convert_dyn_option_description': False,
'suffix': '',
}

View file

@ -50,6 +50,8 @@ from .xmlreflector import XMLReflector
from .tiramisureflector import TiramisuReflector
from .annotator import SpaceAnnotator
from .error import DictConsistencyError
from .providersupplier import provider_supplier
from .utils import normalize_family
class RougailConvert:
@ -60,48 +62,81 @@ class RougailConvert:
) -> None:
if rougailconfig is None:
rougailconfig = RougailConfig
xmlreflector = XMLReflector(rougailconfig)
rougailobjspace = RougailObjSpace(xmlreflector,
rougailconfig,
self.rougailconfig = rougailconfig
xmlreflector = XMLReflector(self.rougailconfig)
self.rougailobjspace = RougailObjSpace(xmlreflector,
self.rougailconfig,
)
self._load_dictionaries(xmlreflector,
rougailobjspace,
rougailconfig['variable_namespace'],
rougailconfig['dictionaries_dir'],
rougailconfig['variable_namespace_description'],
self.internal_functions = self.rougailconfig['internal_functions']
self.functions_file = self.rougailconfig['functions_file']
if not isinstance(self.functions_file, list):
self.functions_file = [self.functions_file]
self.dictionaries = False
self.annotator = False
self.reflector = None
def load_dictionaries(self,
path_prefix: str=None,
) -> None:
self.rougailobjspace.paths.set_path_prefix(normalize_family(path_prefix))
self._load_dictionaries(self.rougailobjspace.xmlreflector,
self.rougailconfig['variable_namespace'],
self.rougailconfig['dictionaries_dir'],
path_prefix,
self.rougailconfig['variable_namespace_description'],
)
for namespace, extra_dir in rougailconfig['extra_dictionaries'].items():
if namespace in ['services', rougailconfig['variable_namespace']]:
for namespace, extra_dir in self.rougailconfig['extra_dictionaries'].items():
if namespace in ['services', self.rougailconfig['variable_namespace']]:
msg = _(f'Namespace name "{namespace}" is not allowed')
raise DictConsistencyError(msg, 21, None)
self._load_dictionaries(xmlreflector,
rougailobjspace,
self._load_dictionaries(self.rougailobjspace.xmlreflector,
namespace,
extra_dir,
path_prefix,
)
functions_file = rougailconfig['functions_file']
if not isinstance(functions_file, list):
functions_file = [functions_file]
SpaceAnnotator(rougailobjspace,
functions_file,
if hasattr(self.rougailobjspace.space, 'variables'):
provider_supplier(self.rougailobjspace,
path_prefix,
)
self.output = TiramisuReflector(rougailobjspace,
functions_file,
rougailconfig['internal_functions'],
).get_text() + '\n'
self.dictionaries = True
@staticmethod
def _load_dictionaries(xmlreflector: XMLReflector,
rougailobjspace: RougailObjSpace,
def _load_dictionaries(self,
xmlreflector: XMLReflector,
namespace: str,
xmlfolders: List[str],
path_prefix: str,
namespace_description: str=None,
) -> List[str]:
for xmlfile, document in xmlreflector.load_xml_from_folders(xmlfolders):
rougailobjspace.xml_parse_document(xmlfile,
self.rougailobjspace.xml_parse_document(xmlfile,
document,
namespace,
namespace_description,
path_prefix,
)
def annotate(self):
if self.annotator:
raise DictConsistencyError(_('Cannot execute annotate multiple time'), 85, None)
SpaceAnnotator(self.rougailobjspace,
self.functions_file,
)
self.annotator = True
def reflexion(self,
exclude_imports: list=[],
):
if not self.dictionaries:
self.load_dictionaries()
if not self.annotator:
self.annotate()
if self.reflector:
raise DictConsistencyError(_('Cannot execute reflexion multiple time'), 86, None)
functions_file = [func for func in self.functions_file if func not in exclude_imports]
self.reflector = TiramisuReflector(self.rougailobjspace,
functions_file,
self.internal_functions,
self.rougailconfig,
)
def save(self,
@ -109,7 +144,10 @@ class RougailConvert:
) -> str:
"""Return tiramisu object declaration as a string
"""
if self.reflector is None:
self.reflexion()
output = self.reflector.get_text() + '\n'
if filename:
with open(filename, 'w') as tiramisu:
tiramisu.write(self.output)
return self.output
tiramisu.write(output)
return output

View file

@ -53,7 +53,7 @@
<!ATTLIST service disabled (True|False) "False">
<!ATTLIST service engine (none|creole|jinja2) #IMPLIED>
<!ATTLIST service target CDATA #IMPLIED>
<!ATTLIST service type (service|mount|swap|timer) "service">
<!ATTLIST service type (service|mount|swap|timer|target) "service">
<!ATTLIST service undisable (True|False) "False">
<!ELEMENT ip (#PCDATA)>
@ -101,6 +101,7 @@
<!ATTLIST variable hidden (True|False) "False">
<!ATTLIST variable disabled (True|False) "False">
<!ATTLIST variable multi (True|False) "False">
<!ATTLIST variable unique (nil|True|False) "nil">
<!ATTLIST variable redefine (True|False) "False">
<!ATTLIST variable exists (True|False) "True">
<!ATTLIST variable mandatory (True|False) "False">
@ -112,6 +113,7 @@
<!ATTLIST variable remove_condition (True|False) "False">
<!ATTLIST variable remove_fill (True|False) "False">
<!ATTLIST variable provider CDATA #IMPLIED>
<!ATTLIST variable supplier CDATA #IMPLIED>
<!ATTLIST variable test CDATA #IMPLIED>
<!ELEMENT value (#PCDATA)>

View file

@ -29,7 +29,7 @@ from typing import Optional
from .i18n import _
from .xmlreflector import XMLReflector
from .utils import valid_variable_family_name
from .utils import valid_variable_family_name, normalize_family
from .error import SpaceObjShallNotBeUpdated, DictConsistencyError
from .path import Path
@ -106,14 +106,13 @@ class RougailObjSpace:
self.paths = Path(rougailconfig)
self.forced_text_elts_as_name = set(FORCED_TEXT_ELTS_AS_NAME)
self.list_conditions = {}
self.valid_enums = {}
self.booleans_attributs = []
self.has_dyn_option = False
self.types = {}
self.make_object_space_classes(xmlreflector)
self.rougailconfig = rougailconfig
self.xmlreflector = xmlreflector
def make_object_space_classes(self,
xmlreflector: XMLReflector,
@ -171,13 +170,28 @@ class RougailObjSpace:
document,
namespace,
namespace_description,
path_prefix,
):
"""Parses a Rougail XML file and populates the RougailObjSpace
"""
redefine_variables = []
if path_prefix:
if not hasattr(self.space, 'variables'):
self.space.variables = {}
n_path_prefix = normalize_family(path_prefix)
if n_path_prefix not in self.space.variables:
space = self.variables([xmlfile])
space.name = n_path_prefix
space.doc = path_prefix
space.path = path_prefix
self.space.variables[n_path_prefix] = space
else:
space = self.space.variables[n_path_prefix]
else:
space = self.space
self._xml_parse(xmlfile,
document,
self.space,
space,
namespace,
namespace_description,
redefine_variables,
@ -196,13 +210,13 @@ class RougailObjSpace:
# var to check unique family name in a XML file
family_names = []
for child in document:
if is_dynamic:
is_sub_dynamic = True
else:
is_sub_dynamic = document.attrib.get('dynamic') is not None
if not isinstance(child.tag, str):
# doesn't proceed the XML commentaries
continue
if is_dynamic:
is_sub_dynamic = True
else:
is_sub_dynamic = child.attrib.get('dynamic') is not None
if namespace_description and child.tag == 'variables':
child.attrib['description'] = namespace_description
if child.tag == 'family':
@ -230,6 +244,7 @@ class RougailObjSpace:
self.remove(child,
variableobj,
redefine_variables,
namespace,
)
if not exists:
self.set_path(namespace,
@ -238,6 +253,11 @@ class RougailObjSpace:
space,
is_sub_dynamic,
)
elif isinstance(variableobj, self.variable):
if 'name' in document.attrib:
family_name = document.attrib['name']
else:
family_name = namespace
self.add_to_tree_structure(variableobj,
space,
child,
@ -324,9 +344,9 @@ class RougailObjSpace:
redefine = convert_boolean(subspace.get('redefine', default_redefine))
if redefine is True:
if isinstance(existed_var, self.variable): # pylint: disable=E1101
if namespace == self.rougailconfig['variable_namespace']:
redefine_variables.append(name)
else:
# if namespace == self.rougailconfig['variable_namespace']:
# redefine_variables.append(name)
# else:
redefine_variables.append(space.path + '.' + name)
existed_var.xmlfiles.append(xmlfile)
return True, existed_var
@ -355,7 +375,7 @@ class RougailObjSpace:
def get_existed_obj(self,
name: str,
xmlfile: str,
space: str,
space,
child,
namespace: str,
) -> None:
@ -366,20 +386,19 @@ class RougailObjSpace:
if child.tag == 'variable': # pylint: disable=E1101
if namespace != self.rougailconfig['variable_namespace']:
name = space.path + '.' + name
if not self.paths.path_is_defined(name):
if not self.paths.path_is_defined(name, namespace):
return None
old_family_name = self.paths.get_variable_family_path(name)
old_family_name = self.paths.get_variable_family_path(name, namespace)
if space.path != 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)
# it's not a family
return self.paths.get_variable(name, namespace)
# it's not a variable
tag = FORCE_TAG.get(child.tag, child.tag)
children = getattr(space, tag, {})
if name in children and isinstance(children[name], getattr(self, child.tag)):
return children[name]
return None
def set_text(self,
child,
@ -422,6 +441,7 @@ class RougailObjSpace:
child,
variableobj,
redefine_variables,
namespace,
):
"""Rougail object tree manipulations
"""
@ -438,23 +458,34 @@ class RougailObjSpace:
self.remove_condition(variableobj.name)
if child.attrib.get('remove_fill', False):
self.remove_fill(variableobj.name)
if child.tag == 'fill':
elif child.tag == 'fill':
for target in child:
if target.tag == 'target' and target.text in redefine_variables:
if target.tag == 'target' and \
self.paths.get_path(target.text, namespace) in redefine_variables:
self.remove_fill(target.text)
def remove_check(self, name):
"""Remove a check with a specified target
"""
if hasattr(self.space.constraints, 'check'):
constraints = self.get_constraints()
if not constraints or not hasattr(constraints, 'check'):
return
remove_checks = []
for idx, check in enumerate(self.space.constraints.check): # pylint: disable=E1101
for idx, check in enumerate(constraints.check): # pylint: disable=E1101
for target in check.target:
if target.name == name:
remove_checks.append(idx)
remove_checks.sort(reverse=True)
for idx in remove_checks:
self.space.constraints.check.pop(idx) # pylint: disable=E1101
constraints.check.pop(idx) # pylint: disable=E1101
def get_constraints(self):
path_prefix = self.paths.get_path_prefix()
if not path_prefix:
if hasattr(self.space, 'constraints'):
return self.space.constraints
elif hasattr(self.space.variables[path_prefix], 'constraints'):
return self.space.variables[path_prefix].constraints
def remove_condition(self,
name: str,
@ -462,12 +493,13 @@ class RougailObjSpace:
"""Remove a condition with a specified source
"""
remove_conditions = []
for idx, condition in enumerate(self.space.constraints.condition): # pylint: disable=E1101
constraints = self.get_constraints()
for idx, condition in enumerate(constraints.condition): # pylint: disable=E1101
if condition.source == name:
remove_conditions.append(idx)
remove_conditions.sort(reverse=True)
for idx in remove_conditions:
del self.space.constraints.condition[idx] # pylint: disable=E1101
del constraints.condition[idx] # pylint: disable=E1101
def remove_fill(self,
name: str,
@ -475,13 +507,14 @@ class RougailObjSpace:
"""Remove a fill with a specified target
"""
remove_fills = []
for idx, fill in enumerate(self.space.constraints.fill): # pylint: disable=E1101
constraints = self.get_constraints()
for idx, fill in enumerate(constraints.fill): # pylint: disable=E1101
for target in fill.target:
if target.name == name:
remove_fills.append(idx)
remove_fills.sort(reverse=True)
for idx in remove_fills:
self.space.constraints.fill.pop(idx) # pylint: disable=E1101
constraints.fill.pop(idx) # pylint: disable=E1101
def set_path(self,
namespace,
@ -493,32 +526,23 @@ class RougailObjSpace:
"""Fill self.paths attributes
"""
if isinstance(variableobj, self.variable): # pylint: disable=E1101
if 'name' in document.attrib:
family_name = document.attrib['name']
else:
family_name = namespace
if isinstance(space, self.family) and space.leadership:
leader = space.path
else:
leader = None
self.paths.add_variable(namespace,
variableobj.name,
space.path,
is_dynamic,
variableobj,
leader,
is_dynamic,
isinstance(space, self.family) and space.leadership,
)
elif isinstance(variableobj, self.family): # pylint: disable=E1101
family_name = variableobj.name
if namespace != self.rougailconfig['variable_namespace']:
family_name = space.path + '.' + family_name
self.paths.add_family(namespace,
family_name,
variableobj,
space.path,
variableobj,
is_dynamic,
)
elif isinstance(variableobj, self.variables):
path_prefix = self.paths.get_path_prefix()
if path_prefix:
variableobj.path = path_prefix + '.' + variableobj.name
else:
variableobj.path = variableobj.name
@staticmethod
@ -538,3 +562,22 @@ class RougailObjSpace:
getattr(space, child.tag).append(variableobj)
else:
setattr(space, child.tag, variableobj)
def get_variables(objectspace):
"""Iter all variables from the objectspace
"""
for family in objectspace.space.variables.values():
yield from _get_variables(family, objectspace.family)
def _get_variables(family, family_type):
if hasattr(family, 'variable'):
for variable in family.variable.values():
if isinstance(variable, family_type):
yield from _get_variables(variable, family_type)
else:
yield variable
if hasattr(family, 'variables'):
for family in family.variables.values():
yield from _get_variables(family, family_type)

View file

@ -40,137 +40,292 @@ class Path:
) -> None:
self.variables = {}
self.families = {}
#self.names = {}
self.full_paths_families = {}
self.full_paths_variables = {}
self.full_dyn_paths_families = {}
self.valid_enums = {}
self.variable_namespace = rougailconfig['variable_namespace']
self.providers = {}
self.suppliers = {}
self.list_conditions = {}
self.suffix = rougailconfig['suffix']
self.index = 0
def set_path_prefix(self, prefix: str) -> None:
self._path_prefix = prefix
if prefix:
if None in self.full_paths_families:
raise DictConsistencyError(_(f'prefix "{prefix}" cannot be set if a prefix "None" exists'), 39, None)
else:
for old_prefix in self.full_paths_families:
if old_prefix != None:
raise DictConsistencyError(_(f'no prefix cannot be set if a prefix exists'), 84, None)
if prefix in self.full_paths_families:
raise DictConsistencyError(_(f'prefix "{prefix}" already exists'), 83, None)
self.full_paths_families[prefix] = {}
self.full_paths_variables[prefix] = {}
self.valid_enums[prefix] = {}
self.providers[prefix] = {}
self.suppliers[prefix] = {}
self.list_conditions[prefix] = {}
def has_path_prefix(self) -> bool:
return None not in self.full_paths_families
def get_path_prefixes(self) -> list:
return list(self.full_paths_families)
def get_path_prefix(self) -> str:
return self._path_prefix
# Family
def add_family(self,
namespace: str,
name: str,
variableobj: str,
subpath: str,
variableobj: str,
is_dynamic: str,
force_path_prefix: str=None,
) -> str: # pylint: disable=C0111
"""Add a new family
"""
if force_path_prefix is None:
force_path_prefix = self._path_prefix
path = subpath + '.' + variableobj.name
if namespace == self.variable_namespace:
full_name = '.'.join([subpath, name])
if name in self.full_paths_families:
msg = _(f'Duplicate family name "{name}"')
if variableobj.name in self.full_paths_families[force_path_prefix]:
msg = _(f'Duplicate family name "{variableobj.name}"')
raise DictConsistencyError(msg, 55, variableobj.xmlfiles)
self.full_paths_families[name] = full_name
self.full_paths_families[force_path_prefix][variableobj.name] = path
if is_dynamic:
if subpath in self.full_dyn_paths_families:
dyn_subpath = self.full_dyn_paths_families[subpath]
else:
if '.' not in name: # pragma: no cover
msg = _(f'Variable "{name}" in namespace "{namespace}" must have dot')
raise DictConsistencyError(msg, 39, variableobj.xmlfiles)
full_name = name
if full_name in self.families and \
self.families[full_name]['variableobj'] != variableobj: # pragma: no cover
msg = _(f'Duplicate family name "{name}"')
dyn_subpath = subpath
self.full_dyn_paths_families[path] = f'{dyn_subpath}.{variableobj.name}{{suffix}}'
if path in self.families:
msg = _(f'Duplicate family name "{path}"')
raise DictConsistencyError(msg, 37, variableobj.xmlfiles)
if full_name in self.variables:
msg = _(f'A variable and a family has the same path "{full_name}"')
if path in self.variables:
msg = _(f'A variable and a family has the same path "{path}"')
raise DictConsistencyError(msg, 56, variableobj.xmlfiles)
self.families[full_name] = dict(name=name,
self.families[path] = dict(name=path,
namespace=namespace,
variableobj=variableobj,
)
variableobj.path = full_name
self.set_name(variableobj, 'optiondescription_')
variableobj.path = path
variableobj.path_prefix = force_path_prefix
def get_family(self,
name: str,
path: str,
current_namespace: str,
path_prefix: str,
allow_variable_namespace: bool=False,
) -> 'Family': # pylint: disable=C0111
"""Get a family
"""
name = '.'.join([normalize_family(subname) for subname in name.split('.')])
if name not in self.families and name in self.full_paths_families:
name = self.full_paths_families[name]
if name not in self.families:
raise DictConsistencyError(_(f'unknown option {name}'), 42, [])
dico = self.families[name]
if current_namespace not in [self.variable_namespace, 'services'] and \
current_namespace != dico['namespace']:
if (current_namespace == self.variable_namespace or allow_variable_namespace) and path in self.full_paths_families[path_prefix]:
path = self.full_paths_families[path_prefix][path]
elif allow_variable_namespace and path_prefix:
path = f'{path_prefix}.{path}'
if path not in self.families:
raise DictConsistencyError(_(f'unknown option "{path}"'), 42, [])
dico = self.families[path]
if current_namespace != dico['namespace'] and \
(not allow_variable_namespace or current_namespace != self.variable_namespace):
msg = _(f'A family located in the "{dico["namespace"]}" namespace '
f'shall not be used in the "{current_namespace}" namespace')
raise DictConsistencyError(msg, 38, [])
return dico['variableobj']
def is_leader(self, path): # pylint: disable=C0111
"""Is the variable is a leader
"""
variable = self._get_variable(path)
if not variable['leader']:
return False
leadership = self.get_family(variable['leader'], variable['variableobj'].namespace)
return next(iter(leadership.variable.values())).path == path
def _get_dyn_path(self,
subpath: str,
name: bool,
) -> str:
if subpath in self.full_dyn_paths_families:
subpath = self.full_dyn_paths_families[subpath]
path = f'{subpath}.{name}{{suffix}}'
else:
path = f'{subpath}.{name}'
return path
def is_follower(self, path):
"""Is the variable is a follower
"""
variable = self._get_variable(path)
if not variable['leader']:
return False
leadership = self.get_family(variable['leader'], variable['variableobj'].namespace)
return next(iter(leadership.variable.values())).path != path
def set_provider(self,
variableobj,
name,
family,
):
if not hasattr(variableobj, 'provider'):
return
p_name = 'provider:' + variableobj.provider
if '.' in name:
msg = f'provider "{p_name}" not allowed in extra'
raise DictConsistencyError(msg, 82, variableobj.xmlfiles)
if p_name in self.providers[variableobj.path_prefix]:
msg = f'provider "{p_name}" declare multiple time'
raise DictConsistencyError(msg, 79, variableobj.xmlfiles)
self.providers[variableobj.path_prefix][p_name] = {'path': self._get_dyn_path(family,
name,
),
'option': variableobj,
}
def get_provider(self,
name: str,
path_prefix: str=None,
) -> 'self.objectspace.variable':
return self.providers[path_prefix][name]['option']
def get_providers_path(self, path_prefix=None):
if path_prefix:
return {name: option['path'].split('.', 1)[-1] for name, option in self.providers[path_prefix].items()}
return {name: option['path'] for name, option in self.providers[path_prefix].items()}
def set_supplier(self,
variableobj,
name,
family,
):
if not hasattr(variableobj, 'supplier'):
return
s_name = 'supplier:' + variableobj.supplier
if '.' in name:
msg = f'supplier "{s_name}" not allowed in extra'
raise DictConsistencyError(msg, 82, variableobj.xmlfiles)
if s_name in self.suppliers[variableobj.path_prefix]:
msg = f'supplier "{s_name}" declare multiple time'
raise DictConsistencyError(msg, 79, variableobj.xmlfiles)
self.suppliers[variableobj.path_prefix][s_name] = {'path': self._get_dyn_path(family,
name),
'option': variableobj,
}
def get_supplier(self,
name: str,
path_prefix: str=None,
) -> 'self.objectspace.variable':
return self.suppliers[path_prefix][name]['option']
def get_suppliers_path(self, path_prefix=None):
if path_prefix:
return {name: option['path'].split('.', 1)[-1] for name, option in self.suppliers[path_prefix].items()}
return {name: option['path'] for name, option in self.suppliers[path_prefix].items()}
# Variable
def add_variable(self, # pylint: disable=R0913
namespace: str,
name: str,
family: str,
is_dynamic: bool,
variableobj,
leader: 'self.objectspace.family'=None,
subpath: str,
variableobj: "self.objectspace.variable",
is_dynamic: bool=False,
is_leader: bool=False,
force_path_prefix: str=None,
) -> str: # pylint: disable=C0111
"""Add a new variable (with path)
"""
if '.' not in name:
full_path = '.'.join([family, name])
if force_path_prefix is None:
force_path_prefix = self._path_prefix
path = subpath + '.' + variableobj.name
if namespace == self.variable_namespace:
self.full_paths_variables[name] = full_path
else:
full_path = name
variableobj.path = full_path
if full_path in self.families:
msg = _(f'A family and a variable has the same path "{full_path}"')
self.full_paths_variables[force_path_prefix][variableobj.name] = path
if path in self.families:
msg = _(f'A family and a variable has the same path "{path}"')
raise DictConsistencyError(msg, 57, variableobj.xmlfiles)
self.variables[full_path] = dict(name=name,
family=family,
if is_leader:
leader = subpath
else:
leader = None
self.variables[path] = dict(name=path,
family=subpath,
leader=leader,
is_dynamic=is_dynamic,
variableobj=variableobj,
)
variableobj.path = path
variableobj.path_prefix = force_path_prefix
self.set_name(variableobj, 'option_')
def set_name(self,
variableobj,
option_prefix,
):
self.index += 1
variableobj.reflector_name = f'{option_prefix}{self.index}{self.suffix}'
def get_variable(self,
name: str,
namespace: str,
xmlfiles: List[str]=[],
allow_variable_namespace: bool=False,
force_path_prefix: str=None,
add_path_prefix: bool=False,
) -> 'Variable': # pylint: disable=C0111
"""Get variable object from a path
"""
variable, suffix = self._get_variable(name, with_suffix=True, xmlfiles=xmlfiles)
if force_path_prefix is None:
force_path_prefix = self._path_prefix
try:
variable, suffix = self._get_variable(name,
namespace,
with_suffix=True,
xmlfiles=xmlfiles,
path_prefix=force_path_prefix,
add_path_prefix=add_path_prefix,
)
except DictConsistencyError as err:
if not allow_variable_namespace or err.errno != 42 or namespace == self.variable_namespace:
raise err from err
variable, suffix = self._get_variable(name,
self.variable_namespace,
with_suffix=True,
xmlfiles=xmlfiles,
path_prefix=force_path_prefix,
)
if suffix:
raise DictConsistencyError(_(f"{name} is a dynamic variable"), 36, [])
return variable['variableobj']
def get_variable_family_path(self,
name: str,
namespace: str,
xmlfiles: List[str]=False,
force_path_prefix: str=None,
) -> str: # pylint: disable=C0111
"""Get the full path of a family
"""
return self._get_variable(name, xmlfiles=xmlfiles)['family']
if force_path_prefix is None:
force_path_prefix = self._path_prefix
return self._get_variable(name,
namespace,
xmlfiles=xmlfiles,
path_prefix=force_path_prefix,
)['family']
def get_variable_path(self,
def get_variable_with_suffix(self,
name: str,
current_namespace: str,
xmlfiles: List[str]=[],
xmlfiles: List[str],
path_prefix: str,
) -> str: # pylint: disable=C0111
"""get full path of a variable
"""
try:
dico, suffix = self._get_variable(name,
current_namespace,
with_suffix=True,
xmlfiles=xmlfiles,
path_prefix=path_prefix,
add_path_prefix=True,
)
except DictConsistencyError as err:
if err.errno != 42 or current_namespace == self.variable_namespace:
raise err from err
dico, suffix = self._get_variable(name,
self.variable_namespace,
with_suffix=True,
xmlfiles=xmlfiles,
path_prefix=path_prefix,
add_path_prefix=True,
)
namespace = dico['variableobj'].namespace
if namespace not in [self.variable_namespace, 'services'] and \
@ -179,41 +334,131 @@ class Path:
msg = _(f'A variable located in the "{namespace}" namespace shall not be used '
f'in the "{current_namespace}" namespace')
raise DictConsistencyError(msg, 41, xmlfiles)
return dico['variableobj'].path, suffix
return dico['variableobj'], suffix
def path_is_defined(self,
path: str,
namespace: str,
force_path_prefix: str=None,
) -> str: # pylint: disable=C0111
"""The path is a valid path
"""
if '.' not in path and path not in self.variables and path in self.full_paths_variables:
return True
if namespace == self.variable_namespace:
if force_path_prefix is None:
force_path_prefix = self._path_prefix
return path in self.full_paths_variables[force_path_prefix]
return path in self.variables
def variable_is_dynamic(self,
name: str,
) -> bool:
def get_path(self,
path: str,
namespace: str,
) -> str:
if namespace == self.variable_namespace:
if path not in self.full_paths_variables[self._path_prefix]:
return None
path = self.full_paths_variables[self._path_prefix][path]
else:
path = f'{self._path_prefix}.{path}'
return path
def is_dynamic(self, variableobj) -> bool:
"""This variable is in dynamic family
"""
return self._get_variable(name)['is_dynamic']
return self._get_variable(variableobj.path,
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)['is_dynamic']
def is_leader(self, variableobj): # pylint: disable=C0111
"""Is the variable is a leader
"""
path = variableobj.path
variable = self._get_variable(path,
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)
if not variable['leader']:
return False
leadership = self.get_family(variable['leader'],
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)
return next(iter(leadership.variable.values())).path == path
def is_follower(self, variableobj) -> bool:
"""Is the variable is a follower
"""
variable = self._get_variable(variableobj.path,
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)
if not variable['leader']:
return False
leadership = self.get_family(variable['leader'],
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)
return next(iter(leadership.variable.values())).path != variableobj.path
def get_leader(self, variableobj) -> str:
variable = self._get_variable(variableobj.path,
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)
if not variable['leader']:
raise Exception(f'cannot find leader for {variableobj.path}')
leadership = self.get_family(variable['leader'],
variableobj.namespace,
path_prefix=variableobj.path_prefix,
)
return next(iter(leadership.variable.values()))
def _get_variable(self,
name: str,
path: str,
namespace: str,
with_suffix: bool=False,
xmlfiles: List[str]=[],
path_prefix: str=None,
add_path_prefix: bool=False,
) -> str:
name = '.'.join([normalize_family(subname) for subname in name.split('.')])
if name not in self.variables:
if '.' not in name and name in self.full_paths_variables:
name = self.full_paths_variables[name]
elif with_suffix:
for var_name, full_path in self.full_paths_variables.items():
if name.startswith(var_name):
variable = self._get_variable(full_path)
if variable['is_dynamic']:
return variable, name[len(var_name):]
if name not in self.variables:
raise DictConsistencyError(_(f'unknown option "{name}"'), 42, xmlfiles)
if namespace == self.variable_namespace:
if path in self.full_paths_variables[path_prefix]:
path = self.full_paths_variables[path_prefix][path]
else:
if with_suffix:
return self.variables[name], None
return self.variables[name]
for var_name, full_path in self.full_paths_variables[path_prefix].items():
if not path.startswith(var_name):
continue
variable = self._get_variable(full_path, namespace, path_prefix=path_prefix)
if not variable['is_dynamic']:
continue
return variable, path[len(var_name):]
if path_prefix and add_path_prefix:
path = f'{path_prefix}.{path}'
elif path_prefix and add_path_prefix:
path = f'{path_prefix}.{path}'
#FIXME with_suffix and variable in extra?
if path not in self.variables:
raise DictConsistencyError(_(f'unknown option "{path}"'), 42, xmlfiles)
if with_suffix:
return self.variables[path], None
return self.variables[path]
def set_valid_enums(self,
path,
values,
path_prefix,
):
self.valid_enums[path_prefix][path] = values
def has_valid_enums(self,
path: str,
path_prefix: str,
) -> bool:
return path in self.valid_enums[path_prefix]
def get_valid_enums(self,
path: str,
path_prefix: str,
):
return self.valid_enums[path_prefix][path]

View file

@ -0,0 +1,41 @@
"""Provider/supplier
distribued with GPL-2 or later license
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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 rougail.objspace import get_variables
from rougail.utils import normalize_family
def provider_supplier(objectspace,
path_prefix,
):
n_path_prefix = normalize_family(path_prefix)
for variable in get_variables(objectspace):
if variable.path_prefix != n_path_prefix:
continue
if hasattr(variable, 'provider'):
family_name, variable.name = variable.path.rsplit('.', 1)
objectspace.paths.set_provider(variable,
variable.name,
family_name,
)
if hasattr(variable, 'supplier'):
family_name, variable.name = variable.path.rsplit('.', 1)
objectspace.paths.set_supplier(variable,
variable.name,
family_name,
)

View file

@ -35,9 +35,11 @@ from os.path import dirname, join, isfile, isdir, abspath
try:
from tiramisu3 import Config, undefined
from tiramisu3.api import TiramisuOption
from tiramisu3.error import PropertiesOptionError # pragma: no cover
except ModuleNotFoundError: # pragma: no cover
from tiramisu import Config, undefined
from tiramisu.api import TiramisuOption
from tiramisu.error import PropertiesOptionError
from ..config import RougailConfig
@ -57,6 +59,7 @@ log.addHandler(logging.NullHandler())
INFORMATIONS = {'files': ['source', 'mode', 'engine', 'included'],
'overrides': ['name', 'source', 'engine'],
'service_names': ['doc', 'engine', 'type'],
}
DEFAULT = {'files': ['owner', 'group'],
'overrides': [],
@ -178,9 +181,13 @@ class RougailExtra:
For example %%extra1.family.variable
"""
def __init__(self,
name: str,
suboption: Dict,
path: str,
) -> None:
self._name = name
self._suboption = suboption
self._path = path
def __getattr__(self,
key: str,
@ -188,7 +195,7 @@ class RougailExtra:
try:
return self._suboption[key]
except KeyError:
raise AttributeError(f'unable to find extra "{key}"')
raise AttributeError(f'unable to find extra "{self._path}.{key}"')
def __getitem__(self,
key: str,
@ -202,10 +209,7 @@ class RougailExtra:
return self._suboption.items()
def __str__(self):
suboptions = {}
for key, value in self._suboption.items():
suboptions[key] = str(value)
return f'<extra object with: {suboptions}>'
return self._name
class RougailBaseTemplate:
@ -334,6 +338,19 @@ class RougailBaseTemplate:
destfilenames.append(destfilename)
return destfilenames
async def load_variables(self):
for option in await self.config.option.list(type='all'):
namespace = await option.option.name()
is_variable_namespace = namespace == self.rougailconfig['variable_namespace']
if namespace == 'services':
is_service_namespace = 'root'
else:
is_service_namespace = False
self.rougail_variables_dict[namespace] = await self._load_variables(option,
is_variable_namespace,
is_service_namespace,
)
async def instance_files(self) -> None:
"""Run templatisation on all files
"""
@ -342,17 +359,8 @@ class RougailBaseTemplate:
except FileNotFoundError:
ori_dir = None
chdir(self.tmp_dir)
for option in await self.config.option.list(type='all'):
namespace = await option.option.name()
is_variable_namespace = namespace == self.rougailconfig['variable_namespace']
if namespace == 'services':
is_service_namespace = 'root'
else:
is_service_namespace = False
self.rougail_variables_dict[namespace] = await self.load_variables(option,
is_variable_namespace,
is_service_namespace,
)
if not self.rougail_variables_dict:
await self.load_variables()
for templates_dir in self.templates_dir:
for template in listdir(templates_dir):
self.prepare_template(template,
@ -398,7 +406,7 @@ class RougailBaseTemplate:
)
if included and fill.get('included', 'no') == 'content':
files_to_delete.extend(destfilenames)
else:
elif 'name' in fill:
self.log.debug(_(f"Instantiation of file '{fill['name']}' disabled"))
self.post_instance_service(service_name)
for filename in files_to_delete:
@ -483,7 +491,7 @@ class RougailBaseTemplate:
) -> None: # pragma: no cover
raise NotImplementedError(_('cannot instanciate this service type override'))
async def load_variables(self,
async def _load_variables(self,
optiondescription,
is_variable_namespace: str,
is_service_namespace: str,
@ -491,6 +499,8 @@ class RougailBaseTemplate:
"""Load all variables and set it in RougailExtra objects
"""
variables = {}
if isinstance(self.config, TiramisuOption):
len_root_path = len(await self.config.option.path()) + 1
for option in await optiondescription.list('all'):
if await option.option.isoptiondescription():
if await option.option.isleadership():
@ -502,11 +512,15 @@ class RougailBaseTemplate:
if is_variable_namespace:
self.rougail_variables_dict[await suboption.option.name()] = leader
else:
if isinstance(self.config, TiramisuOption):
path = (await suboption.option.path())[len_root_path:]
else:
path = await suboption.option.path()
await leader._add_follower(self.config,
await suboption.option.name(),
await suboption.option.path(),
path,
)
variables[leadership_name] = RougailExtra({leader_name: leader})
variables[leadership_name] = RougailExtra(await optiondescription.option.name(), {leader_name: leader}, await optiondescription.option.path())
else:
if is_service_namespace == 'root':
new_is_service_namespace = 'service_name'
@ -517,7 +531,7 @@ class RougailBaseTemplate:
new_is_service_namespace = is_service_namespace[:-1]
else:
new_is_service_namespace = is_service_namespace
subfamilies = await self.load_variables(option,
subfamilies = await self._load_variables(option,
is_variable_namespace,
new_is_service_namespace,
)
@ -528,6 +542,9 @@ class RougailBaseTemplate:
self.rougail_variables_dict[await option.option.name()] = value
if await option.option.issymlinkoption() and await option.option.isfollower():
value = []
if isinstance(self.config, TiramisuOption):
path = (await option.option.path())[len_root_path:]
else:
path = await option.option.path()
for index in range(await option.value.len()):
value.append(await self.config.option(path, index).value.get())
@ -543,4 +560,4 @@ class RougailBaseTemplate:
variables,
optiondescription,
)
return RougailExtra(variables)
return RougailExtra(await optiondescription.option.name(), variables, await optiondescription.option.path())

View file

@ -29,7 +29,12 @@ from shutil import copy
def process(filename: str,
source: str,
destfilename: str,
**kwargs
):
if filename is not None:
copy(filename, destfilename)
else:
with open(destfilename, 'w') as fh:
fh.write(source)

View file

@ -104,7 +104,7 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
raise FileNotFound(_(f'Override source file "{source}" does not exist in {", ".join(self.templates_dir)}'))
tmp_file = join(self.tmp_dir, source)
service_name = filevar['name']
destfile = f'/systemd/system/{service_name}.d/rougail.conf'
destfile = f'{self.rougailconfig["default_systemd_directory"]}/system/{service_name}.d/rougail.conf'
return tmp_file, None, destfile, None
def get_data_ip(self,
@ -134,7 +134,7 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
):
tmp_file = join(self.tmp_dir, service_name)
var = None
destfile = f'/systemd/system/{service_name}'
destfile = f'{self.rougailconfig["default_systemd_directory"]}/system/{service_name}'
return tmp_file, None, destfile, var
@ -148,7 +148,7 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
def target_service(self,
service_name: str,
target_name: str,
global_service: str,
global_service: bool,
):
filename = f'{self.destinations_dir}/systemd/system/{target_name}.target.wants/{service_name}'
makedirs(dirname(filename), exist_ok=True)
@ -163,7 +163,7 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
) -> None: # pragma: no cover
if self.ip_per_service is None:
return
destfile = f'/systemd/system/{service_name}.d/rougail_ip.conf'
destfile = f'{self.rougailconfig["default_systemd_directory"]}/system/{service_name}.d/rougail_ip.conf'
destfilename = join(self.destinations_dir, destfile[1:])
makedirs(dirname(destfilename), exist_ok=True)
self.log.info(_(f"creole processing: '{destfilename}'"))

View file

@ -32,13 +32,12 @@ from .i18n import _
from .annotator import CONVERT_OPTION
from .objspace import RootRougailObject
from .error import DictConsistencyError
from .utils import normalize_family
class BaseElt: # pylint: disable=R0903
"""Base element
"""
name = 'baseoption'
doc = 'baseoption'
path = '.'
@ -49,83 +48,105 @@ class TiramisuReflector:
objectspace,
funcs_paths,
internal_functions,
cfg,
):
self.index = 0
self.text = []
self.cfg = cfg
self.text = {'header': [],
'option': [],
'optiondescription': [],
}
if funcs_paths:
self.text.extend(["from importlib.machinery import SourceFileLoader as _SourceFileLoader",
if self.cfg['export_with_import']:
self.text['header'].extend(["from importlib.machinery import SourceFileLoader as _SourceFileLoader",
"from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec",
"class func:",
" pass",
"",
"def _load_functions(path):",
" global _SourceFileLoader, _spec_from_loader, _module_from_spec, func",
" loader = _SourceFileLoader('func', path)",
" spec = _spec_from_loader(loader.name, loader)",
" func_ = _module_from_spec(spec)",
" loader.exec_module(func_)",
" for function in dir(func_):",
" if function.startswith('_'):",
" continue",
" setattr(func, function, getattr(func_, function))",
])
for funcs_path in funcs_paths:
if not isfile(funcs_path):
continue
self.text.extend([f"_loader = _SourceFileLoader('func', '{funcs_path}')",
"_spec = _spec_from_loader(_loader.name, _loader)",
"_func = _module_from_spec(_spec)",
"_loader.exec_module(_func)",
"for function in dir(_func):",
" if function.startswith('_'):",
" continue",
" setattr(func, function, getattr(_func, function))",
])
self.text['header'].append(f"_load_functions('{funcs_path}')")
if self.cfg['export_with_import']:
if internal_functions:
for func in internal_functions:
self.text.append(f"setattr(func, '{func}', {func})")
self.text.extend(["try:",
self.text['header'].append(f"setattr(func, '{func}', {func})")
self.text['header'].extend(["try:",
" from tiramisu3 import *",
"except:",
" from tiramisu import *",
])
self.objectspace = objectspace
self.make_tiramisu_objects()
if self.objectspace.has_dyn_option is True:
self.text.append("from rougail.tiramisu import ConvertDynOptionDescription")
if self.cfg['export_with_import'] and (self.cfg['force_convert_dyn_option_description'] or self.objectspace.has_dyn_option is True):
self.text['header'].append("from rougail.tiramisu import ConvertDynOptionDescription")
def make_tiramisu_objects(self) -> None:
"""make tiramisu objects
"""
providers = {}
baseelt = BaseElt()
baseelt.reflector_name = f'option_0{self.objectspace.rougailconfig["suffix"]}'
self.set_name(baseelt)
dynamic_path = ''
dynamic = False
basefamily = Family(baseelt,
self.text,
self.objectspace,
)
for elt in self.reorder_family():
if not self.objectspace.paths.has_path_prefix():
for elt in self.reorder_family(self.objectspace.space):
self.populate_family(basefamily,
elt,
providers,
dynamic,
dynamic_path,
)
basefamily.elt.information = providers
basefamily.populate_informations()
self.baseelt = baseelt
basefamily.elt.information = self.objectspace.paths.get_providers_path()
basefamily.elt.information.update(self.objectspace.paths.get_suppliers_path())
else:
path_prefixes = self.objectspace.paths.get_path_prefixes()
for path_prefix in path_prefixes:
space = self.objectspace.space.variables[path_prefix]
self.set_name(space)
baseprefix = Family(space,
self.text,
self.objectspace,
)
basefamily.add(baseprefix)
for elt in self.reorder_family(space):
self.populate_family(baseprefix,
elt,
)
baseprefix.populate_informations()
baseprefix.elt.information = self.objectspace.paths.get_providers_path(path_prefix)
baseprefix.elt.information.update(self.objectspace.paths.get_suppliers_path(path_prefix))
baseelt.name = normalize_family(self.cfg['base_option_name'])
baseelt.doc = self.cfg['base_option_name']
baseelt.reflector_object.get([], baseelt.doc, 'base') # pylint: disable=E1101
def reorder_family(self):
def reorder_family(self, space):
"""variable_namespace family has to be loaded before any other family
because `extra` family could use `variable_namespace` variables.
"""
if hasattr(self.objectspace.space, 'variables'):
if hasattr(space, 'variables'):
variable_namespace = self.objectspace.rougailconfig['variable_namespace']
if variable_namespace in self.objectspace.space.variables:
yield self.objectspace.space.variables[variable_namespace]
for elt, value in self.objectspace.space.variables.items():
if variable_namespace in space.variables:
yield space.variables[variable_namespace]
for elt, value in space.variables.items():
if elt != self.objectspace.rougailconfig['variable_namespace']:
yield value
if hasattr(self.objectspace.space, 'services'):
yield self.objectspace.space.services
if hasattr(space, 'services'):
yield space.services
def populate_family(self,
parent_family,
elt,
providers,
dynamic,
dynamic_path,
):
"""Populate family
"""
@ -134,21 +155,11 @@ class TiramisuReflector:
self.text,
self.objectspace,
)
if not dynamic_path:
dynamic_path = elt.name
else:
dynamic_path = dynamic_path + '.' + elt.name
if dynamic or hasattr(elt, 'suffixes'):
dynamic_path += '{suffix}'
dynamic = True
parent_family.add(family)
for children in vars(elt).values():
if isinstance(children, self.objectspace.family):
self.populate_family(family,
children,
providers,
dynamic,
dynamic_path,
)
continue
if isinstance(children, dict):
@ -160,21 +171,13 @@ class TiramisuReflector:
continue
if isinstance(child, self.objectspace.variable):
self.set_name(child)
sub_dynamic_path = dynamic_path + '.' + child.name
if dynamic:
sub_dynamic_path += '{suffix}'
family.add(Variable(child,
self.text,
self.objectspace,
providers,
sub_dynamic_path,
))
else:
self.populate_family(family,
child,
providers,
dynamic,
dynamic_path,
)
def set_name(self,
@ -182,14 +185,14 @@ class TiramisuReflector:
):
"""Set name
"""
elt.reflector_name = f'option_{self.index}'
self.index += 1
if not hasattr(elt, 'reflector_name'):
self.objectspace.paths.set_name(elt, 'optiondescription_')
return elt.reflector_name
def get_text(self):
"""Get text
"""
self.baseelt.reflector_object.get([]) # pylint: disable=E1101
return '\n'.join(self.text)
return '\n'.join(self.text['header'] + self.text['option'] + self.text['optiondescription'])
class Common:
@ -207,7 +210,7 @@ class Common:
self.elt.reflector_object = self
self.object_type = None
def get(self, calls):
def get(self, calls, parent_name, typ):
"""Get tiramisu's object
"""
self_calls = calls.copy()
@ -220,12 +223,6 @@ class Common:
self.option_name = self.elt.reflector_name
self.populate_attrib()
self.populate_informations()
if hasattr(self.elt, 'provider'):
name = 'provider:' + self.elt.provider
if name in self.providers:
msg = f'provider {name} declare multiple time'
raise DictConsistencyError(msg, 79, self.elt.xmlfiles)
self.providers[name] = self.dynamic_path
return self.option_name
def populate_attrib(self):
@ -238,7 +235,13 @@ class Common:
if hasattr(self.elt, 'properties'):
keys['properties'] = self.properties_to_string(self.elt.properties)
attrib = ', '.join([f'{key}={value}' for key, value in keys.items()])
self.text.append(f'{self.option_name} = {self.object_type}({attrib})')
if self.__class__.__name__ == 'Family':
#pouet
name = 'option'
#name = 'optiondescription'
else:
name = 'option'
self.text[name].append(f'{self.option_name} = {self.object_type}({attrib})')
def _populate_attrib(self,
keys: dict,
@ -267,7 +270,7 @@ class Common:
) -> str:
"""Populate properties
"""
option_name = child.source.reflector_object.get(self.calls)
option_name = child.source.reflector_object.get(self.calls, self.elt.path, 'property')
kwargs = (f"'condition': ParamOption({option_name}, todict=True, notraisepropertyerror=True), "
f"'expected': {self.populate_param(child.expected)}")
if child.inverse:
@ -289,7 +292,8 @@ class Common:
continue
if isinstance(value, str):
value = self.convert_str(value)
self.text.append(f"{self.option_name}.impl_set_information('{key}', {value})")
#pouet self.text['optiondescription'].append(f"{self.option_name}.impl_set_information('{key}', {value})")
self.text['option'].append(f"{self.option_name}.impl_set_information('{key}', {value})")
def populate_param(self,
param,
@ -301,7 +305,7 @@ class Common:
if param.type == 'string' and value is not None:
value = self.convert_str(value)
return f'ParamValue({value})'
if param.type == 'variable':
if param.type in ['variable_name', 'variable']:
return self.build_option_param(param)
if param.type == 'information':
if hasattr(self.elt, 'multi') and self.elt.multi:
@ -322,11 +326,14 @@ class Common:
) -> str:
"""build variable parameters
"""
option_name = param.text.reflector_object.get(self.calls)
if param.type == 'variable':
option_name = param.text.reflector_object.get(self.calls, self.elt.path, 'param')
else:
option_name = param.text
params = [f'{option_name}']
if hasattr(param, 'suffix'):
param_type = 'ParamDynOption'
family = param.family.reflector_object.get(self.calls)
family = param.family.reflector_object.get(self.calls, self.elt.path, 'suffix')
params.extend([f"'{param.suffix}'", f'{family}'])
else:
param_type = 'ParamOption'
@ -342,11 +349,7 @@ class Variable(Common):
elt,
text,
objectspace,
providers,
dynamic_path,
):
self.providers = providers
self.dynamic_path = dynamic_path
super().__init__(elt, text, objectspace)
self.object_type = CONVERT_OPTION[elt.type]['opttype']
@ -354,11 +357,11 @@ class Variable(Common):
keys: dict,
):
if hasattr(self.elt, 'opt'):
keys['opt'] = self.elt.opt.reflector_object.get(self.calls)
keys['opt'] = self.elt.opt.reflector_object.get(self.calls, self.elt.path, 'opt')
if hasattr(self.elt, 'choice'):
values = self.elt.choice
if values[0].type == 'variable':
value = values[0].name.reflector_object.get(self.calls)
value = values[0].name.reflector_object.get(self.calls, self.elt.path, 'choice')
keys['values'] = f"Calculation(func.calc_value, Params((ParamOption({value}))))"
elif values[0].type == 'function':
keys['values'] = self.calculation_value(values[0], [])
@ -447,6 +450,6 @@ class Family(Common):
keys: list,
) -> None:
if hasattr(self.elt, 'suffixes'):
dyn = self.elt.suffixes.reflector_object.get(self.calls)
dyn = self.elt.suffixes.reflector_object.get(self.calls, self.elt.path, 'suffixes')
keys['suffixes'] = f"Calculation(func.calc_value, Params((ParamOption({dyn}, notraisepropertyerror=True))))"
keys['children'] = '[' + ', '.join([child.get(self.calls) for child in self.children]) + ']'
keys['children'] = '[' + ', '.join([child.get(self.calls, self.elt.path, 'child') for child in self.children]) + ']'

View file

@ -50,6 +50,8 @@ def valid_variable_family_name(name: str,
def normalize_family(family_name: str) -> str:
"""replace space, accent, uppercase, ... by valid character
"""
if not family_name:
return
family_name = family_name.replace('-', '_').replace(' ', '_').replace('.', '_')
nfkd_form = normalize('NFKD', family_name)
family_name = ''.join([c for c in nfkd_form if not combining(c)])

View file

@ -66,9 +66,10 @@ class XMLReflector:
for filename in listdir(xmlfolder):
if not filename.endswith('.xml'):
continue
full_filename = join(xmlfolder, filename)
if filename in filenames:
raise DictConsistencyError(_(f'duplicate xml file name {filename}'), 78, [xmlfolder])
filenames[filename] = join(xmlfolder, filename)
raise DictConsistencyError(_(f'duplicate xml file name {filename}'), 78, [filenames[filename], full_filename])
filenames[filename] = full_filename
if not filenames:
raise DictConsistencyError(_('there is no XML file'), 77, [xmlfolder])
file_names = list(filenames.keys())

View file

@ -2,20 +2,25 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_4 = BoolOption(name="manage", doc="manage", default=True)
option_2 = OptionDescription(name="tata_service", doc="tata.service", children=[option_3, option_4])
option_1 = OptionDescription(name="services", doc="services", children=[option_2], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_1 = BoolOption(name="activate", doc="activate", default=True)
option_2 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_4 = OptionDescription(name="tata_service", doc="tata.service", children=[option_1, option_2])
optiondescription_4.impl_set_information('type', "service")
optiondescription_3 = OptionDescription(name="services", doc="services", children=[optiondescription_4], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,33 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_1 = BoolOption(name="activate", doc="activate", default=True)
option_2 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_7 = OptionDescription(name="tata_service", doc="tata.service", children=[option_1, option_2])
optiondescription_7.impl_set_information('type', "service")
optiondescription_6 = OptionDescription(name="services", doc="services", children=[optiondescription_7], properties=frozenset({"hidden"}))
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_4 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_10 = OptionDescription(name="tata_service", doc="tata.service", children=[option_3, option_4])
optiondescription_10.impl_set_information('type', "service")
optiondescription_9 = OptionDescription(name="services", doc="services", children=[optiondescription_10], properties=frozenset({"hidden"}))
optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_8])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
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, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_1 = 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_2, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_1 = 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_2, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, option_2])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_3 = 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_4, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
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, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_1 = 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_2, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_1 = 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_2, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, option_2])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_3 = 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_4, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
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])
option_1 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "force_store_value", "mandatory"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"basic"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, optiondescription_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_1 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "force_store_value", "mandatory"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"basic"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, optiondescription_2])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_4 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"}))
option_6 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "force_store_value", "mandatory"}))
optiondescription_5 = OptionDescription(name="general", doc="général", children=[option_6], properties=frozenset({"basic"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_4, optiondescription_5])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
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])
option_1 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "force_store_value", "mandatory"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"expert"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, optiondescription_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_1 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "force_store_value", "mandatory"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"expert"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, optiondescription_2])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_4 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "normal"}))
option_6 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "force_store_value", "mandatory"}))
optiondescription_5 = OptionDescription(name="general", doc="général", children=[option_6], properties=frozenset({"expert"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_4, optiondescription_5])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2], properties=frozenset({"normal"}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2], properties=frozenset({"normal"}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_3 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_3 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_5 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_6 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_4 = OptionDescription(name="general", doc="général", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2], properties=frozenset({"normal"}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2], properties=frozenset({"normal"}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_5 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_6 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_4 = OptionDescription(name="general", doc="général", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="my_variable", doc="my_variable", default=Calculation(func.calc_val, Params((ParamValue("yes")))), properties=frozenset({"basic", "force_store_value", "hidden", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_2, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_1 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_2 = StrOption(name="my_variable", doc="my_variable", default=Calculation(func.calc_val, Params((ParamValue("yes")))), properties=frozenset({"basic", "force_store_value", "hidden", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_1, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_1 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_2 = StrOption(name="my_variable", doc="my_variable", default=Calculation(func.calc_val, Params((ParamValue("yes")))), properties=frozenset({"basic", "force_store_value", "hidden", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_1, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_1, option_2])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_3 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"mandatory", "normal"}))
option_4 = StrOption(name="my_variable", doc="my_variable", default=Calculation(func.calc_val, Params((ParamValue("yes")))), properties=frozenset({"basic", "force_store_value", "hidden", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_3 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_3)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_3)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_6 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_6)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
optiondescription_4 = OptionDescription(name="general", doc="general", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_5 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_6 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_4 = OptionDescription(name="general", doc="general", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,33 +2,38 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10])
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_13, option_14])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_11 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_14 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_11])
optiondescription_14.impl_set_information('type', "service")
optiondescription_13 = OptionDescription(name="services", doc="services", children=[optiondescription_14], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_12, optiondescription_13])

View file

@ -0,0 +1,59 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_24 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_13 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_26 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_13])
optiondescription_26.impl_set_information('type', "service")
optiondescription_25 = OptionDescription(name="services", doc="services", children=[optiondescription_26], properties=frozenset({"hidden"}))
optiondescription_23 = OptionDescription(name="1", doc="1", children=[optiondescription_24, optiondescription_25])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_28 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_18 = FilenameOption(name="name", doc="name", default="/etc/file")
option_17 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_16 = OptionDescription(name="file", doc="file", children=[option_18, option_17])
optiondescription_16.impl_set_information('source', "file")
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
optiondescription_19.impl_set_information('engine', "jinja2")
optiondescription_19.impl_set_information('source', "file2")
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
option_14 = BoolOption(name="activate", doc="activate", default=True)
option_22 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_30 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_15, option_14, option_22])
optiondescription_30.impl_set_information('type', "service")
optiondescription_29 = OptionDescription(name="services", doc="services", children=[optiondescription_30], properties=frozenset({"hidden"}))
optiondescription_27 = OptionDescription(name="2", doc="2", children=[optiondescription_28, optiondescription_29])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_23, optiondescription_27])

View file

@ -2,37 +2,42 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_15 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_14 = FilenameOption(name="name", doc="name", default="/etc/file3")
option_15 = BoolOption(name="activate", doc="activate", default=False)
option_13 = OptionDescription(name="file3", doc="file3", children=[option_14, option_15])
option_13.impl_set_information('source', "file3")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10, option_13])
option_16 = BoolOption(name="activate", doc="activate", default=True)
option_17 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_16, option_17])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
option_13 = FilenameOption(name="name", doc="name", default="/etc/file3")
option_12 = BoolOption(name="activate", doc="activate", default=False)
optiondescription_11 = OptionDescription(name="file3", doc="file3", children=[option_13, option_12])
optiondescription_11.impl_set_information('source', "file3")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8, optiondescription_11])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_17 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_14])
optiondescription_17.impl_set_information('type', "service")
optiondescription_16 = OptionDescription(name="services", doc="services", children=[optiondescription_17], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_15, optiondescription_16])

View file

@ -0,0 +1,67 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_30 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
option_15 = FilenameOption(name="name", doc="name", default="/etc/file3")
option_14 = BoolOption(name="activate", doc="activate", default=False)
optiondescription_13 = OptionDescription(name="file3", doc="file3", children=[option_15, option_14])
optiondescription_13.impl_set_information('source', "file3")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10, optiondescription_13])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_16 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_32 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_16])
optiondescription_32.impl_set_information('type', "service")
optiondescription_31 = OptionDescription(name="services", doc="services", children=[optiondescription_32], properties=frozenset({"hidden"}))
optiondescription_29 = OptionDescription(name="1", doc="1", children=[optiondescription_30, optiondescription_31])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_34 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_21 = FilenameOption(name="name", doc="name", default="/etc/file")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file", doc="file", children=[option_21, option_20])
optiondescription_19.impl_set_information('source', "file")
option_24 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_23 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_22 = OptionDescription(name="file2", doc="file2", children=[option_24, option_23])
optiondescription_22.impl_set_information('engine', "jinja2")
optiondescription_22.impl_set_information('source', "file2")
option_27 = FilenameOption(name="name", doc="name", default="/etc/file3")
option_26 = BoolOption(name="activate", doc="activate", default=False)
optiondescription_25 = OptionDescription(name="file3", doc="file3", children=[option_27, option_26])
optiondescription_25.impl_set_information('source', "file3")
optiondescription_18 = OptionDescription(name="files", doc="files", children=[optiondescription_19, optiondescription_22, optiondescription_25])
option_17 = BoolOption(name="activate", doc="activate", default=True)
option_28 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_36 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_18, option_17, option_28])
optiondescription_36.impl_set_information('type', "service")
optiondescription_35 = OptionDescription(name="services", doc="services", children=[optiondescription_36], properties=frozenset({"hidden"}))
optiondescription_33 = OptionDescription(name="2", doc="2", children=[optiondescription_34, optiondescription_35])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_29, optiondescription_33])

View file

@ -2,33 +2,38 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10])
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_13, option_14])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_11 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_14 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_11])
optiondescription_14.impl_set_information('type', "service")
optiondescription_13 = OptionDescription(name="services", doc="services", children=[optiondescription_14], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_12, optiondescription_13])

View file

@ -0,0 +1,59 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_24 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_13 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_26 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_13])
optiondescription_26.impl_set_information('type', "service")
optiondescription_25 = OptionDescription(name="services", doc="services", children=[optiondescription_26], properties=frozenset({"hidden"}))
optiondescription_23 = OptionDescription(name="1", doc="1", children=[optiondescription_24, optiondescription_25])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_28 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_18 = FilenameOption(name="name", doc="name", default="/etc/file")
option_17 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_16 = OptionDescription(name="file", doc="file", children=[option_18, option_17])
optiondescription_16.impl_set_information('source', "file")
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
optiondescription_19.impl_set_information('engine', "jinja2")
optiondescription_19.impl_set_information('source', "file2")
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
option_14 = BoolOption(name="activate", doc="activate", default=True)
option_22 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_30 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_15, option_14, option_22])
optiondescription_30.impl_set_information('type', "service")
optiondescription_29 = OptionDescription(name="services", doc="services", children=[optiondescription_30], properties=frozenset({"hidden"}))
optiondescription_27 = OptionDescription(name="2", doc="2", children=[optiondescription_28, optiondescription_29])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_23, optiondescription_27])

View file

@ -2,38 +2,43 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_15 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
option_13 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_14 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_15 = BoolOption(name="activate", doc="activate", default=True)
option_13 = OptionDescription(name="incfile", doc="incfile", children=[option_14, option_15])
option_13.impl_set_information('included', "content")
option_13.impl_set_information('source', "incfile")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10, option_13])
option_16 = BoolOption(name="activate", doc="activate", default=True)
option_17 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_16, option_17])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_11 = OptionDescription(name="incfile", doc="incfile", children=[option_13, option_12])
optiondescription_11.impl_set_information('included', "content")
optiondescription_11.impl_set_information('source', "incfile")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8, optiondescription_11])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_17 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_14])
optiondescription_17.impl_set_information('type', "service")
optiondescription_16 = OptionDescription(name="services", doc="services", children=[optiondescription_17], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_15, optiondescription_16])

View file

@ -0,0 +1,69 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_30 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
option_15 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_14 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_13 = OptionDescription(name="incfile", doc="incfile", children=[option_15, option_14])
optiondescription_13.impl_set_information('included', "content")
optiondescription_13.impl_set_information('source', "incfile")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10, optiondescription_13])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_16 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_32 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_16])
optiondescription_32.impl_set_information('type', "service")
optiondescription_31 = OptionDescription(name="services", doc="services", children=[optiondescription_32], properties=frozenset({"hidden"}))
optiondescription_29 = OptionDescription(name="1", doc="1", children=[optiondescription_30, optiondescription_31])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_34 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_21 = FilenameOption(name="name", doc="name", default="/etc/file")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file", doc="file", children=[option_21, option_20])
optiondescription_19.impl_set_information('source', "file")
option_24 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_23 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_22 = OptionDescription(name="file2", doc="file2", children=[option_24, option_23])
optiondescription_22.impl_set_information('engine', "jinja2")
optiondescription_22.impl_set_information('source', "file2")
option_27 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_26 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_25 = OptionDescription(name="incfile", doc="incfile", children=[option_27, option_26])
optiondescription_25.impl_set_information('included', "content")
optiondescription_25.impl_set_information('source', "incfile")
optiondescription_18 = OptionDescription(name="files", doc="files", children=[optiondescription_19, optiondescription_22, optiondescription_25])
option_17 = BoolOption(name="activate", doc="activate", default=True)
option_28 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_36 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_18, option_17, option_28])
optiondescription_36.impl_set_information('type', "service")
optiondescription_35 = OptionDescription(name="services", doc="services", children=[optiondescription_36], properties=frozenset({"hidden"}))
optiondescription_33 = OptionDescription(name="2", doc="2", children=[optiondescription_34, optiondescription_35])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_29, optiondescription_33])

View file

@ -2,38 +2,43 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_15 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
option_13 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_14 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_15 = BoolOption(name="activate", doc="activate", default=True)
option_13 = OptionDescription(name="incfile", doc="incfile", children=[option_14, option_15])
option_13.impl_set_information('included', "name")
option_13.impl_set_information('source', "incfile")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10, option_13])
option_16 = BoolOption(name="activate", doc="activate", default=True)
option_17 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_16, option_17])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_11 = OptionDescription(name="incfile", doc="incfile", children=[option_13, option_12])
optiondescription_11.impl_set_information('included', "name")
optiondescription_11.impl_set_information('source', "incfile")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8, optiondescription_11])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_17 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_14])
optiondescription_17.impl_set_information('type', "service")
optiondescription_16 = OptionDescription(name="services", doc="services", children=[optiondescription_17], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_15, optiondescription_16])

View file

@ -0,0 +1,69 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_30 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
option_15 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_14 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_13 = OptionDescription(name="incfile", doc="incfile", children=[option_15, option_14])
optiondescription_13.impl_set_information('included', "name")
optiondescription_13.impl_set_information('source', "incfile")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10, optiondescription_13])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_16 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_32 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_16])
optiondescription_32.impl_set_information('type', "service")
optiondescription_31 = OptionDescription(name="services", doc="services", children=[optiondescription_32], properties=frozenset({"hidden"}))
optiondescription_29 = OptionDescription(name="1", doc="1", children=[optiondescription_30, optiondescription_31])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_34 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_21 = FilenameOption(name="name", doc="name", default="/etc/file")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file", doc="file", children=[option_21, option_20])
optiondescription_19.impl_set_information('source', "file")
option_24 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_23 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_22 = OptionDescription(name="file2", doc="file2", children=[option_24, option_23])
optiondescription_22.impl_set_information('engine', "jinja2")
optiondescription_22.impl_set_information('source', "file2")
option_27 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
option_26 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_25 = OptionDescription(name="incfile", doc="incfile", children=[option_27, option_26])
optiondescription_25.impl_set_information('included', "name")
optiondescription_25.impl_set_information('source', "incfile")
optiondescription_18 = OptionDescription(name="files", doc="files", children=[optiondescription_19, optiondescription_22, optiondescription_25])
option_17 = BoolOption(name="activate", doc="activate", default=True)
option_28 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_36 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_18, option_17, option_28])
optiondescription_36.impl_set_information('type', "service")
optiondescription_35 = OptionDescription(name="services", doc="services", children=[optiondescription_36], properties=frozenset({"hidden"}))
optiondescription_33 = OptionDescription(name="2", doc="2", children=[optiondescription_34, optiondescription_35])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_29, optiondescription_33])

View file

@ -2,37 +2,42 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = UsernameOption(name="group", doc="group", default="nobody")
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_10 = UsernameOption(name="owner", doc="owner", default="nobody")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_16 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = UsernameOption(name="group", doc="group", default="nobody")
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_9 = UsernameOption(name="owner", doc="owner", default="nobody")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_8, option_9, option_6])
optiondescription_5.impl_set_information('source', "file")
option_12 = UsernameOption(name="group", doc="group", default="nobody")
option_13 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_14 = UsernameOption(name="owner", doc="owner", default="nobody")
option_11 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11])
option_7.impl_set_information('source', "file")
option_13 = UsernameOption(name="group", doc="group", default="nobody")
option_14 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_15 = UsernameOption(name="owner", doc="owner", default="nobody")
option_16 = BoolOption(name="activate", doc="activate", default=True)
option_12 = OptionDescription(name="file2", doc="file2", children=[option_13, option_14, option_15, option_16])
option_12.impl_set_information('engine', "jinja2")
option_12.impl_set_information('source', "file2")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_12])
option_17 = BoolOption(name="activate", doc="activate", default=True)
option_18 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_17, option_18])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_13, option_14, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_10])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_15 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_18 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_15])
optiondescription_18.impl_set_information('type', "service")
optiondescription_17 = OptionDescription(name="services", doc="services", children=[optiondescription_18], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_16, optiondescription_17])

View file

@ -0,0 +1,67 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_32 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = UsernameOption(name="group", doc="group", default="nobody")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file")
option_11 = UsernameOption(name="owner", doc="owner", default="nobody")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_10, option_11, option_8])
optiondescription_7.impl_set_information('source', "file")
option_14 = UsernameOption(name="group", doc="group", default="nobody")
option_15 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_16 = UsernameOption(name="owner", doc="owner", default="nobody")
option_13 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_12 = OptionDescription(name="file2", doc="file2", children=[option_14, option_15, option_16, option_13])
optiondescription_12.impl_set_information('engine', "jinja2")
optiondescription_12.impl_set_information('source', "file2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_12])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_17 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_34 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_17])
optiondescription_34.impl_set_information('type', "service")
optiondescription_33 = OptionDescription(name="services", doc="services", children=[optiondescription_34], properties=frozenset({"hidden"}))
optiondescription_31 = OptionDescription(name="1", doc="1", children=[optiondescription_32, optiondescription_33])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_36 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_22 = UsernameOption(name="group", doc="group", default="nobody")
option_23 = FilenameOption(name="name", doc="name", default="/etc/file")
option_24 = UsernameOption(name="owner", doc="owner", default="nobody")
option_21 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_20 = OptionDescription(name="file", doc="file", children=[option_22, option_23, option_24, option_21])
optiondescription_20.impl_set_information('source', "file")
option_27 = UsernameOption(name="group", doc="group", default="nobody")
option_28 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_29 = UsernameOption(name="owner", doc="owner", default="nobody")
option_26 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_25 = OptionDescription(name="file2", doc="file2", children=[option_27, option_28, option_29, option_26])
optiondescription_25.impl_set_information('engine', "jinja2")
optiondescription_25.impl_set_information('source', "file2")
optiondescription_19 = OptionDescription(name="files", doc="files", children=[optiondescription_20, optiondescription_25])
option_18 = BoolOption(name="activate", doc="activate", default=True)
option_30 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_38 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_19, option_18, option_30])
optiondescription_38.impl_set_information('type', "service")
optiondescription_37 = OptionDescription(name="services", doc="services", children=[optiondescription_38], properties=frozenset({"hidden"}))
optiondescription_35 = OptionDescription(name="2", doc="2", children=[optiondescription_36, optiondescription_37])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_31, optiondescription_35])

View file

@ -2,39 +2,44 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_4 = UsernameOption(name="owner", doc="owner", default="nobody", properties=frozenset({"mandatory", "normal"}))
option_5 = UsernameOption(name="group", doc="group", default="nobody", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4, option_5], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_10 = SymLinkOption(name="group", opt=option_5)
option_11 = FilenameOption(name="name", doc="name", default="/etc/file")
option_12 = SymLinkOption(name="owner", opt=option_4)
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = UsernameOption(name="owner", doc="owner", default="nobody", properties=frozenset({"mandatory", "normal"}))
option_4 = UsernameOption(name="group", doc="group", default="nobody", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3, option_4], properties=frozenset({"normal"}))
optiondescription_18 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = SymLinkOption(name="group", opt=option_4)
option_10 = FilenameOption(name="name", doc="name", default="/etc/file")
option_11 = SymLinkOption(name="owner", opt=option_3)
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_10, option_11, option_8])
optiondescription_7.impl_set_information('source', "file")
option_14 = SymLinkOption(name="group", opt=option_4)
option_15 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_16 = SymLinkOption(name="owner", opt=option_3)
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_9 = OptionDescription(name="file", doc="file", children=[option_10, option_11, option_12, option_13])
option_9.impl_set_information('source', "file")
option_15 = SymLinkOption(name="group", opt=option_5)
option_16 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_17 = SymLinkOption(name="owner", opt=option_4)
option_18 = BoolOption(name="activate", doc="activate", default=True)
option_14 = OptionDescription(name="file2", doc="file2", children=[option_15, option_16, option_17, option_18])
option_14.impl_set_information('engine', "jinja2")
option_14.impl_set_information('source', "file2")
option_8 = OptionDescription(name="files", doc="files", children=[option_9, option_14])
option_19 = BoolOption(name="activate", doc="activate", default=True)
option_20 = BoolOption(name="manage", doc="manage", default=True)
option_7 = OptionDescription(name="test_service", doc="test.service", children=[option_8, option_19, option_20])
option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_6])
optiondescription_12 = OptionDescription(name="file2", doc="file2", children=[option_14, option_15, option_16, option_13])
optiondescription_12.impl_set_information('engine', "jinja2")
optiondescription_12.impl_set_information('source', "file2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_12])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_17 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_20 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_17])
optiondescription_20.impl_set_information('type', "service")
optiondescription_19 = OptionDescription(name="services", doc="services", children=[optiondescription_20], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_18, optiondescription_19])

View file

@ -0,0 +1,71 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = UsernameOption(name="owner", doc="owner", default="nobody", properties=frozenset({"mandatory", "normal"}))
option_4 = UsernameOption(name="group", doc="group", default="nobody", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3, option_4], properties=frozenset({"normal"}))
optiondescription_36 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_13 = SymLinkOption(name="group", opt=option_4)
option_14 = FilenameOption(name="name", doc="name", default="/etc/file")
option_15 = SymLinkOption(name="owner", opt=option_3)
option_12 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_11 = OptionDescription(name="file", doc="file", children=[option_13, option_14, option_15, option_12])
optiondescription_11.impl_set_information('source', "file")
option_18 = SymLinkOption(name="group", opt=option_4)
option_19 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_20 = SymLinkOption(name="owner", opt=option_3)
option_17 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_16 = OptionDescription(name="file2", doc="file2", children=[option_18, option_19, option_20, option_17])
optiondescription_16.impl_set_information('engine', "jinja2")
optiondescription_16.impl_set_information('source', "file2")
optiondescription_10 = OptionDescription(name="files", doc="files", children=[optiondescription_11, optiondescription_16])
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_21 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_38 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_10, option_9, option_21])
optiondescription_38.impl_set_information('type', "service")
optiondescription_37 = OptionDescription(name="services", doc="services", children=[optiondescription_38], properties=frozenset({"hidden"}))
optiondescription_35 = OptionDescription(name="1", doc="1", children=[optiondescription_36, optiondescription_37])
option_6 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_7 = UsernameOption(name="owner", doc="owner", default="nobody", properties=frozenset({"mandatory", "normal"}))
option_8 = UsernameOption(name="group", doc="group", default="nobody", properties=frozenset({"mandatory", "normal"}))
optiondescription_5 = OptionDescription(name="general", doc="general", children=[option_6, option_7, option_8], properties=frozenset({"normal"}))
optiondescription_40 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_5])
option_26 = SymLinkOption(name="group", opt=option_8)
option_27 = FilenameOption(name="name", doc="name", default="/etc/file")
option_28 = SymLinkOption(name="owner", opt=option_7)
option_25 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_24 = OptionDescription(name="file", doc="file", children=[option_26, option_27, option_28, option_25])
optiondescription_24.impl_set_information('source', "file")
option_31 = SymLinkOption(name="group", opt=option_8)
option_32 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_33 = SymLinkOption(name="owner", opt=option_7)
option_30 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_29 = OptionDescription(name="file2", doc="file2", children=[option_31, option_32, option_33, option_30])
optiondescription_29.impl_set_information('engine', "jinja2")
optiondescription_29.impl_set_information('source', "file2")
optiondescription_23 = OptionDescription(name="files", doc="files", children=[optiondescription_24, optiondescription_29])
option_22 = BoolOption(name="activate", doc="activate", default=True)
option_34 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_42 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_23, option_22, option_34])
optiondescription_42.impl_set_information('type', "service")
optiondescription_41 = OptionDescription(name="services", doc="services", children=[optiondescription_42], properties=frozenset({"hidden"}))
optiondescription_39 = OptionDescription(name="2", doc="2", children=[optiondescription_40, optiondescription_41])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_35, optiondescription_39])

View file

@ -2,33 +2,38 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10])
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_13, option_14])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_11 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_14 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_11])
optiondescription_14.impl_set_information('type', "service")
optiondescription_13 = OptionDescription(name="services", doc="services", children=[optiondescription_14], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_12, optiondescription_13])

View file

@ -0,0 +1,59 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_24 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_13 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_26 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_13])
optiondescription_26.impl_set_information('type', "service")
optiondescription_25 = OptionDescription(name="services", doc="services", children=[optiondescription_26], properties=frozenset({"hidden"}))
optiondescription_23 = OptionDescription(name="1", doc="1", children=[optiondescription_24, optiondescription_25])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_28 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_18 = FilenameOption(name="name", doc="name", default="/etc/file")
option_17 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_16 = OptionDescription(name="file", doc="file", children=[option_18, option_17])
optiondescription_16.impl_set_information('source', "file")
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
optiondescription_19.impl_set_information('engine', "jinja2")
optiondescription_19.impl_set_information('source', "file2")
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
option_14 = BoolOption(name="activate", doc="activate", default=True)
option_22 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_30 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_15, option_14, option_22])
optiondescription_30.impl_set_information('type', "service")
optiondescription_29 = OptionDescription(name="services", doc="services", children=[optiondescription_30], properties=frozenset({"hidden"}))
optiondescription_27 = OptionDescription(name="2", doc="2", children=[optiondescription_28, optiondescription_29])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_23, optiondescription_27])

View file

@ -2,33 +2,38 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/file")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="file", doc="file", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9])
option_7.impl_set_information('source', "file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="file2", doc="file2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "file2")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10])
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_13, option_14])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "file2")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_11 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_14 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_11])
optiondescription_14.impl_set_information('type', "service")
optiondescription_13 = OptionDescription(name="services", doc="services", children=[optiondescription_14], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_12, optiondescription_13])

View file

@ -0,0 +1,59 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_24 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/file")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="file", doc="file", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "file2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_13 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_26 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_13])
optiondescription_26.impl_set_information('type', "service")
optiondescription_25 = OptionDescription(name="services", doc="services", children=[optiondescription_26], properties=frozenset({"hidden"}))
optiondescription_23 = OptionDescription(name="1", doc="1", children=[optiondescription_24, optiondescription_25])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_28 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_18 = FilenameOption(name="name", doc="name", default="/etc/file")
option_17 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_16 = OptionDescription(name="file", doc="file", children=[option_18, option_17])
optiondescription_16.impl_set_information('source', "file")
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
optiondescription_19.impl_set_information('engine', "jinja2")
optiondescription_19.impl_set_information('source', "file2")
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
option_14 = BoolOption(name="activate", doc="activate", default=True)
option_22 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_30 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_15, option_14, option_22])
optiondescription_30.impl_set_information('type', "service")
optiondescription_29 = OptionDescription(name="services", doc="services", children=[optiondescription_30], properties=frozenset({"hidden"}))
optiondescription_27 = OptionDescription(name="2", doc="2", children=[optiondescription_28, optiondescription_29])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_23, optiondescription_27])

View file

@ -2,33 +2,38 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_8 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel")
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_7 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel")
option_6 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_5 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel", doc="systemd-makefs@dev-disk-by\\x2dpartlabel", children=[option_7, option_6])
optiondescription_5.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel")
option_10 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
option_9 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel", doc="systemd-makefs@dev-disk-by\\x2dpartlabel", children=[option_8, option_9])
option_7.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel")
option_11 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
option_12 = BoolOption(name="activate", doc="activate", default=True)
option_10 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_11, option_12])
option_10.impl_set_information('engine', "jinja2")
option_10.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
option_6 = OptionDescription(name="files", doc="files", children=[option_7, option_10])
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
option_5 = OptionDescription(name="test_service", doc="test.service", children=[option_6, option_13, option_14])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])
optiondescription_8 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_10, option_9])
optiondescription_8.impl_set_information('engine', "jinja2")
optiondescription_8.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
option_3 = BoolOption(name="activate", doc="activate", default=True)
option_11 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_14 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_4, option_3, option_11])
optiondescription_14.impl_set_information('type', "service")
optiondescription_13 = OptionDescription(name="services", doc="services", children=[optiondescription_14], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_12, optiondescription_13])

View file

@ -0,0 +1,59 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_24 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_9 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel")
option_8 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_7 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel", doc="systemd-makefs@dev-disk-by\\x2dpartlabel", children=[option_9, option_8])
optiondescription_7.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel")
option_12 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_12, option_11])
optiondescription_10.impl_set_information('engine', "jinja2")
optiondescription_10.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
option_5 = BoolOption(name="activate", doc="activate", default=True)
option_13 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_26 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_6, option_5, option_13])
optiondescription_26.impl_set_information('type', "service")
optiondescription_25 = OptionDescription(name="services", doc="services", children=[optiondescription_26], properties=frozenset({"hidden"}))
optiondescription_23 = OptionDescription(name="1", doc="1", children=[optiondescription_24, optiondescription_25])
option_4 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_28 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
option_18 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel")
option_17 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_16 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel", doc="systemd-makefs@dev-disk-by\\x2dpartlabel", children=[option_18, option_17])
optiondescription_16.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel")
option_21 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
option_20 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_19 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_21, option_20])
optiondescription_19.impl_set_information('engine', "jinja2")
optiondescription_19.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
option_14 = BoolOption(name="activate", doc="activate", default=True)
option_22 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_30 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_15, option_14, option_22])
optiondescription_30.impl_set_information('type', "service")
optiondescription_29 = OptionDescription(name="services", doc="services", children=[optiondescription_30], properties=frozenset({"hidden"}))
optiondescription_27 = OptionDescription(name="2", doc="2", children=[optiondescription_28, optiondescription_29])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_23, optiondescription_27])

View file

@ -2,20 +2,24 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_4 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_3 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,31 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_3 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_5 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_6 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
optiondescription_4 = OptionDescription(name="general", doc="general", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,22 +2,26 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"normal"}))
option_3.impl_set_information('help', "message with '")
option_4 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"normal"}))
option_4.impl_set_information('help', "message with \"")
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"normal"}))
option_2.impl_set_information('help', "message with '")
option_3 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"normal"}))
option_3.impl_set_information('help', "message with \"")
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])

View file

@ -0,0 +1,35 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"normal"}))
option_2.impl_set_information('help', "message with '")
option_3 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"normal"}))
option_3.impl_set_information('help', "message with \"")
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
option_5 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"normal"}))
option_5.impl_set_information('help', "message with '")
option_6 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"normal"}))
option_6.impl_set_information('help', "message with \"")
optiondescription_4 = OptionDescription(name="general", doc="general", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -2,19 +2,23 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<variables>
<family name="general">
<variable name="mode_conteneur_actif" type="string" description="Redefine description" hidden="True" multi="True" unique="False">
<value>non</value>
</variable>
</family>
</variables>
</rougail>

View file

@ -0,0 +1,8 @@
{
"rougail.general.mode_conteneur_actif": {
"owner": "default",
"value": [
"non"
]
}
}

View file

@ -0,0 +1,5 @@
{
"rougail.general.mode_conteneur_actif": [
"non"
]
}

View file

@ -0,0 +1,8 @@
{
"rougail.general.mode_conteneur_actif": {
"owner": "default",
"value": [
"non"
]
}
}

View file

@ -0,0 +1,24 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", "notunique"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", "notunique"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", "notunique"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<variables>
<family name="general">
<variable name="mode_conteneur_actif" type="string" description="Redefine description" hidden="True" multi="True" unique="True">
<value>non</value>
</variable>
</family>
</variables>
</rougail>

View file

@ -0,0 +1,8 @@
{
"rougail.general.mode_conteneur_actif": {
"owner": "default",
"value": [
"non"
]
}
}

View file

@ -0,0 +1,5 @@
{
"rougail.general.mode_conteneur_actif": [
"non"
]
}

View file

@ -0,0 +1,8 @@
{
"rougail.general.mode_conteneur_actif": {
"owner": "default",
"value": [
"non"
]
}
}

View file

@ -0,0 +1,24 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", "unique"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_3 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_3])

View file

@ -0,0 +1,29 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", "unique"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2], properties=frozenset({"normal"}))
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_5 = OptionDescription(name="1", doc="1", children=[optiondescription_6])
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", "unique"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3])
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_5, optiondescription_7])

View file

@ -2,21 +2,25 @@ from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_4 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
option_2 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_3 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4])
option_0.impl_set_information('provider:float', "rougail.general.float")

View file

@ -0,0 +1,33 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_3 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
optiondescription_1 = OptionDescription(name="general", doc="general", children=[option_2, option_3], properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8])
optiondescription_7.impl_set_information('provider:float', "rougail.general.float")
option_5 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_6 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
optiondescription_4 = OptionDescription(name="general", doc="general", children=[option_5, option_6], properties=frozenset({"normal"}))
optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_4])
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10])
optiondescription_9.impl_set_information('provider:float', "rougail.general.float")
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_9])

View file

@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<variables>
<variable name="float" type="float" description="Description"/>
</variables>
</rougail>

View file

@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<variables>
<family name="example">
<variable name="description" type="string" provider="example"/>
</family>
</variables>
</rougail>

View file

@ -0,0 +1,10 @@
{
"rougail.float": {
"owner": "default",
"value": null
},
"extra.example.description": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1,4 @@
{
"rougail.float": null,
"extra.example.description": null
}

View file

@ -0,0 +1,10 @@
{
"rougail.float": {
"owner": "default",
"value": null
},
"extra.example.description": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1,27 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_1 = FloatOption(name="float", doc="Description", properties=frozenset({"normal"}))
optiondescription_4 = OptionDescription(name="rougail", doc="Rougail", children=[option_1])
option_3 = StrOption(name="description", doc="description", properties=frozenset({"normal"}))
optiondescription_2 = OptionDescription(name="example", doc="example", children=[option_3], properties=frozenset({"normal"}))
optiondescription_5 = OptionDescription(name="extra", doc="extra", children=[optiondescription_2])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_4, optiondescription_5])
option_0.impl_set_information('provider:example', "extra.example.description")

View file

@ -0,0 +1,35 @@
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
setattr(func, function, getattr(func_, function))
_load_functions('tests/dictionaries/../eosfunc/test.py')
try:
from tiramisu3 import *
except:
from tiramisu import *
option_1 = FloatOption(name="float", doc="Description", properties=frozenset({"normal"}))
optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_1])
option_3 = StrOption(name="description", doc="description", properties=frozenset({"normal"}))
optiondescription_2 = OptionDescription(name="example", doc="example", children=[option_3], properties=frozenset({"normal"}))
optiondescription_9 = OptionDescription(name="extra", doc="extra", children=[optiondescription_2])
optiondescription_7 = OptionDescription(name="1", doc="1", children=[optiondescription_8, optiondescription_9])
optiondescription_7.impl_set_information('provider:example', "extra.example.description")
option_4 = FloatOption(name="float", doc="Description", properties=frozenset({"normal"}))
optiondescription_11 = OptionDescription(name="rougail", doc="Rougail", children=[option_4])
option_6 = StrOption(name="description", doc="description", properties=frozenset({"normal"}))
optiondescription_5 = OptionDescription(name="example", doc="example", children=[option_6], properties=frozenset({"normal"}))
optiondescription_12 = OptionDescription(name="extra", doc="extra", children=[optiondescription_5])
optiondescription_10 = OptionDescription(name="2", doc="2", children=[optiondescription_11, optiondescription_12])
optiondescription_10.impl_set_information('provider:example', "extra.example.description")
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_7, optiondescription_10])

Some files were not shown because too many files have changed in this diff Show more