Compare commits

..

5 Commits

Author SHA1 Message Date
Emmanuel Garette 46807533f3 pylint objspace 2021-01-11 18:03:06 +01:00
Emmanuel Garette 9a19198bde pylint 2021-01-10 22:07:29 +01:00
Emmanuel Garette f918792419 pylint services.py 2021-01-10 21:10:19 +01:00
Emmanuel Garette 25d4fb9db4 remove oui/non yes/no ... types 2021-01-10 16:53:41 +01:00
Emmanuel Garette 85ab952882 pylint variable.py 2021-01-10 09:07:22 +01:00
376 changed files with 1177 additions and 1103 deletions

View File

@ -1,3 +1,5 @@
"""Annotate dictionaries
"""
from .group import GroupAnnotator from .group import GroupAnnotator
from .service import ServiceAnnotator, ERASED_ATTRIBUTES from .service import ServiceAnnotator, ERASED_ATTRIBUTES
from .variable import VariableAnnotator, CONVERT_OPTION from .variable import VariableAnnotator, CONVERT_OPTION

View File

@ -44,15 +44,15 @@ class ConstrainteAnnotator:
objectspace, objectspace,
eosfunc_file, eosfunc_file,
): ):
if not hasattr(objectspace.space, 'constraints'):
return
self.objectspace = objectspace self.objectspace = objectspace
eosfunc = SourceFileLoader('eosfunc', eosfunc_file).load_module() eosfunc = SourceFileLoader('eosfunc', eosfunc_file).load_module()
self.functions = dir(eosfunc) self.functions = dir(eosfunc)
self.functions.extend(INTERNAL_FUNCTIONS) self.functions.extend(INTERNAL_FUNCTIONS)
self.valid_enums = {} self.valid_enums = {}
if hasattr(objectspace.space, 'variables'):
self.convert_auto_freeze() self.convert_auto_freeze()
if not hasattr(objectspace.space, 'constraints'):
return
if hasattr(self.objectspace.space.constraints, 'check'): if hasattr(self.objectspace.space.constraints, 'check'):
self.check_check() self.check_check()
self.check_valid_enum() self.check_valid_enum()
@ -73,15 +73,16 @@ class ConstrainteAnnotator:
"""convert auto_freeze """convert auto_freeze
only if FREEZE_AUTOFREEZE_VARIABLE == 'oui' this variable is frozen only if FREEZE_AUTOFREEZE_VARIABLE == 'oui' this variable is frozen
""" """
def _convert_auto_freeze(variable, namespace): def _convert_auto_freeze(variable):
if variable.auto_freeze: if not variable.auto_freeze:
if namespace != Config['variable_namespace']: return
if variable.namespace != Config['variable_namespace']:
xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles) xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles)
msg = _(f'auto_freeze is not allowed in extra "{namespace}" in {xmlfiles}') msg = _(f'auto_freeze is not allowed in extra "{variable.namespace}" in {xmlfiles}')
raise DictConsistencyError(msg, 49) raise DictConsistencyError(msg, 49)
new_condition = self.objectspace.condition(variable.xmlfiles) new_condition = self.objectspace.condition(variable.xmlfiles)
new_condition.name = 'auto_frozen_if_not_in' new_condition.name = 'auto_frozen_if_not_in'
new_condition.namespace = namespace new_condition.namespace = variable.namespace
new_condition.source = FREEZE_AUTOFREEZE_VARIABLE new_condition.source = FREEZE_AUTOFREEZE_VARIABLE
new_param = self.objectspace.param(variable.xmlfiles) new_param = self.objectspace.param(variable.xmlfiles)
new_param.text = 'oui' new_param.text = 'oui'
@ -90,25 +91,21 @@ class ConstrainteAnnotator:
new_target.type = 'variable' new_target.type = 'variable'
new_target.name = variable.name new_target.name = variable.name
new_condition.target = [new_target] 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'): if not hasattr(self.objectspace.space.constraints, 'condition'):
self.objectspace.space.constraints.condition = [] self.objectspace.space.constraints.condition = []
self.objectspace.space.constraints.condition.append(new_condition) self.objectspace.space.constraints.condition.append(new_condition)
for variables in self.objectspace.space.variables.values(): for variables in self.objectspace.space.variables.values():
if not hasattr(variables, 'family'):
continue
for family in variables.family.values(): for family in variables.family.values():
if not hasattr(family, 'variable'): if not hasattr(family, 'variable'):
continue continue
for variable in family.variable.values(): for variable in family.variable.values():
if isinstance(variable, self.objectspace.leadership): if isinstance(variable, self.objectspace.leadership):
for follower in variable.variable: for follower in variable.variable:
_convert_auto_freeze(follower, _convert_auto_freeze(follower)
variables.namespace,
)
else: else:
_convert_auto_freeze(variable, _convert_auto_freeze(variable)
variables.namespace,
)
def check_check(self): def check_check(self):
"""valid and manage <check> """valid and manage <check>
@ -338,7 +335,6 @@ class ConstrainteAnnotator:
new_target = self.objectspace.target(variable.xmlfiles) new_target = self.objectspace.target(variable.xmlfiles)
new_target.type = type_ new_target.type = type_
new_target.name = listvar new_target.name = listvar
new_target.index = target.index
new_targets.append(new_target) new_targets.append(new_target)
remove_targets.append(target_idx) remove_targets.append(target_idx)
remove_targets.sort(reverse=True) remove_targets.sort(reverse=True)

View File

@ -1,3 +1,5 @@
"""Annotate family
"""
from ..i18n import _ from ..i18n import _
from ..error import DictConsistencyError from ..error import DictConsistencyError
@ -7,147 +9,174 @@ modes_level = ('basic', 'normal', 'expert')
class Mode: class Mode:
def __init__(self, name, level): """Class to manage mode level
"""
def __init__(self,
name: str,
level: int,
) -> None:
self.name = name self.name = name
self.level = level self.level = level
def __gt__(self, other):
def __gt__(self,
other: int,
) -> bool:
return other.level < self.level return other.level < self.level
def mode_factory(): modes = {name: Mode(name, idx) for idx, name in enumerate(modes_level)}
mode_obj = {}
for idx in range(len(modes_level)):
name = modes_level[idx]
mode_obj[name] = Mode(name, idx)
return mode_obj
modes = mode_factory()
class FamilyAnnotator: class FamilyAnnotator:
"""Annotate family
"""
def __init__(self, def __init__(self,
objectspace, objectspace,
): ):
self.objectspace = objectspace self.objectspace = objectspace
if hasattr(self.objectspace.space, 'variables'):
self.remove_empty_families() self.remove_empty_families()
self.change_variable_mode() self.change_variable_mode()
self.change_family_mode() self.change_family_mode()
self.dynamic_families() self.dynamic_families()
def remove_empty_families(self): # pylint: disable=C0111,R0201 def remove_empty_families(self):
if hasattr(self.objectspace.space, 'variables'): """Remove all families without any variable
for family in self.objectspace.space.variables.values(): """
if hasattr(family, 'family'): for families in self.objectspace.space.variables.values():
space = family.family
removed_families = [] removed_families = []
for family_name, sfamily in space.items(): for family_name, family in families.family.items():
if not hasattr(sfamily, 'variable') or len(sfamily.variable) == 0: if not hasattr(family, 'variable') or len(family.variable) == 0:
removed_families.append(family_name) removed_families.append(family_name)
for family_name in removed_families: for family_name in removed_families:
del space[family_name] del families.family[family_name]
def change_family_mode(self): # pylint: disable=C0111 def change_variable_mode(self):
if not hasattr(self.objectspace.space, 'variables'): """change the mode of variables
return """
for family in self.objectspace.space.variables.values(): for variables in self.objectspace.space.variables.values():
if hasattr(family, 'family'): for family in variables.family.values():
for vfamily in family.family.values(): family_mode = family.mode
mode = modes_level[-1] for variable in family.variable.values():
for variable in vfamily.variable.values(): if not isinstance(variable, self.objectspace.leadership):
if isinstance(variable, self.objectspace.leadership): func = self._change_variabe_mode
variable_mode = variable.variable[0].mode
variable.variable[0].mode = None
variable.mode = variable_mode
else: else:
variable_mode = variable.mode func = self._change_variable_mode_leader
if variable_mode is not None and modes[mode] > modes[variable_mode]: func(variable,
mode = variable_mode family_mode,
vfamily.mode = mode )
def dynamic_families(self): # pylint: disable=C0111 def _change_variabe_mode(self,
if not hasattr(self.objectspace.space, 'variables'): variable,
return family_mode: str,
for family in self.objectspace.space.variables.values(): ) -> None:
if hasattr(family, 'family'): # auto_save or auto_freeze variable is set to 'basic' mode
for vfamily in family.family.values(): # if its mode is not defined by the user
if 'dynamic' in vars(vfamily): if 'mode' not in vars(variable) and \
namespace = self.objectspace.paths.get_variable_namespace(vfamily.dynamic) (variable.auto_save is True or variable.auto_freeze is True):
varpath = self.objectspace.paths.get_variable_path(vfamily.dynamic, namespace) variable.mode = modes_level[0]
obj = self.objectspace.paths.get_variable_obj(varpath) self._annotate_variable(variable,
if not obj.multi: family_mode,
xmlfiles = self.objectspace.display_xmlfiles(vfamily.xmlfiles) )
raise DictConsistencyError(_(f'dynamic family "{vfamily.name}" must be linked to multi variable in {xmlfiles}'), 16)
vfamily.dynamic = varpath
def annotate_variable(self, def _change_variable_mode_leader(self,
leadership,
family_mode: str,
) -> None:
is_follower = False
leader_mode = None
for follower in leadership.variable:
if follower.auto_save is True:
xmlfiles = self.objectspace.display_xmlfiles(leadership.xmlfiles)
msg = _(f'leader/followers "{follower.name}" could not be auto_save in {xmlfiles}')
raise DictConsistencyError(msg, 29)
if follower.auto_freeze is True:
xmlfiles = self.objectspace.display_xmlfiles(leadership.xmlfiles)
msg = f'leader/followers "{follower.name}" could not be auto_freeze in {xmlfiles}'
raise DictConsistencyError(_(msg), 30)
self._annotate_variable(follower,
family_mode,
is_follower,
)
if leader_mode is None:
leader_mode = leadership.variable[0].mode
leadership.variable[0].mode = None
else:
# leader's mode is minimum level
if modes[leader_mode] > modes[follower.mode]:
follower.mode = leader_mode
is_follower = True
leadership.mode = leader_mode
def _annotate_variable(self,
variable, variable,
family_mode: str, family_mode: str,
is_follower=False, is_follower=False,
) -> None: ) -> None:
# if the variable is mandatory and doesn't have any value """if the variable is mandatory and doesn't have any value
# then the variable's mode is set to 'basic' then the variable's mode is set to 'basic'
"""
# a boolean must have value, the default value is "True"
if not hasattr(variable, 'value') and variable.type == 'boolean': if not hasattr(variable, 'value') and variable.type == 'boolean':
new_value = self.objectspace.value(variable.xmlfiles) new_value = self.objectspace.value(variable.xmlfiles)
new_value.name = True new_value.name = True
new_value.type = 'boolean' new_value.type = 'boolean'
variable.value = [new_value] variable.value = [new_value]
# variable with default value is mandatory
if hasattr(variable, 'value') and variable.value: if hasattr(variable, 'value') and variable.value:
has_value = True has_value = True
for value in variable.value: for value in variable.value:
if value.type == 'calculation': if value.type == 'calculation':
has_value = False has_value = False
if hasattr(value, 'param'):
for param in value.param:
if param.type == 'variable':
break break
if has_value: if has_value:
# if has value but without any calculation # if has value without any calculation
variable.mandatory = True variable.mandatory = True
# mandatory variable without value is a basic variable
if variable.mandatory is True and (not hasattr(variable, 'value') or is_follower): if variable.mandatory is True and (not hasattr(variable, 'value') or is_follower):
variable.mode = modes_level[0] variable.mode = modes_level[0]
if variable.mode is not None and modes[variable.mode] < modes[family_mode] and (not is_follower or variable.mode != modes_level[0]): # none basic variable in high level family has to be in high level
if modes[variable.mode] < modes[family_mode] and \
(not is_follower or variable.mode != modes_level[0]):
variable.mode = family_mode variable.mode = family_mode
# hidden variable is also frozen
if variable.hidden is True: if variable.hidden is True:
variable.frozen = True variable.frozen = True
if not variable.auto_save is True and \ if not variable.auto_save and \
not variable.auto_freeze and \ not variable.auto_freeze and \
'force_default_on_freeze' not in vars(variable): 'force_default_on_freeze' not in vars(variable):
variable.force_default_on_freeze = True variable.force_default_on_freeze = True
def change_variable_mode(self): # pylint: disable=C0111 def change_family_mode(self):
if not hasattr(self.objectspace.space, 'variables'): """change mode of a family
return """
for variables in self.objectspace.space.variables.values(): for families in self.objectspace.space.variables.values():
if hasattr(variables, 'family'): for family in families.family.values():
for family in variables.family.values(): # default is high level
family_mode = family.mode mode = modes_level[-1]
if hasattr(family, 'variable'): # get de lower sub variable mode
for variable in family.variable.values(): for variable in family.variable.values():
variable_mode = variable.mode
if modes[mode] > modes[variable_mode]:
mode = variable_mode
# set the lower variable mode to family
family.mode = mode
if isinstance(variable, self.objectspace.leadership): def dynamic_families(self):
for idx, follower in enumerate(variable.variable): """link dynamic families to object
if follower.auto_save is True: """
xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles) for families in self.objectspace.space.variables.values():
raise DictConsistencyError(_(f'leader/followers "{follower.name}" could not be auto_save in {xmlfiles}'), 29) for family in families.family.values():
if follower.auto_freeze is True: if 'dynamic' not in vars(family):
xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles) continue
raise DictConsistencyError(_(f'leader/followers "{follower.name}" could not be auto_freeze in {xmlfiles}'), 30) namespace = self.objectspace.paths.get_variable_namespace(family.dynamic)
is_follower = idx != 0 varpath = self.objectspace.paths.get_variable_path(family.dynamic,
self.annotate_variable(follower, namespace,
family_mode,
is_follower,
)
# leader's mode is minimum level
if modes[variable.variable[0].mode] > modes[follower.mode]:
follower.mode = variable.variable[0].mode
variable.mode = variable.variable[0].mode
else:
# auto_save's variable is set in 'basic' mode if its mode is 'normal'
if variable.auto_save is True and variable.mode != modes_level[-1]:
variable.mode = modes_level[0]
# auto_freeze's variable is set in 'basic' mode if its mode is 'normal'
if variable.auto_freeze is True and variable.mode != modes_level[-1]:
variable.mode = modes_level[0]
self.annotate_variable(variable,
family_mode,
) )
obj = self.objectspace.paths.get_variable_obj(varpath)
if not obj.multi:
xmlfiles = self.objectspace.display_xmlfiles(family.xmlfiles)
msg = _(f'dynamic family "{family.name}" must be linked '
f'to multi variable in {xmlfiles}')
raise DictConsistencyError(msg, 16)
family.dynamic = varpath

View File

@ -67,8 +67,8 @@ class GroupAnnotator:
leader_name, leader_name,
variable, variable,
group, group,
leader_fullname,
) )
leader_space.path = leader_fullname
has_a_leader = True has_a_leader = True
else: else:
xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles) xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles)
@ -85,7 +85,6 @@ class GroupAnnotator:
leader_name: str, leader_name: str,
variable: 'Variable', variable: 'Variable',
group: 'Group', group: 'Group',
leader_fullname: str,
) -> None: ) -> None:
"""manage leader's variable """manage leader's variable
""" """
@ -121,9 +120,8 @@ class GroupAnnotator:
self.objectspace.paths.set_leader(namespace, self.objectspace.paths.set_leader(namespace,
leader_family_name, leader_family_name,
leader_name, leader_name,
leader_name, leadership_name,
) )
leader_space.path = leader_fullname
return leader_is_hidden return leader_is_hidden
def manage_follower(self, def manage_follower(self,

View File

@ -54,13 +54,8 @@ class PropertyAnnotator:
if not isinstance(service, self.objectspace.family): if not isinstance(service, self.objectspace.family):
continue continue
self.convert_property(service) self.convert_property(service)
if not hasattr(service, 'family'):
continue
self.convert_property(service)
for family in service.family: for family in service.family:
self.convert_property(family) self.convert_property(family)
if not hasattr(family, 'variable'):
continue
for variable in family.variable: for variable in family.variable:
self.convert_property(variable) self.convert_property(variable)
@ -68,16 +63,11 @@ class PropertyAnnotator:
"""convert variables """convert variables
""" """
for variables in self.objectspace.space.variables.values(): for variables in self.objectspace.space.variables.values():
if not hasattr(variables, 'family'):
continue
for family in variables.family.values(): for family in variables.family.values():
self.convert_property(family) self.convert_property(family)
if not hasattr(family, 'variable'):
continue
for variable in family.variable.values(): for variable in family.variable.values():
if isinstance(variable, self.objectspace.leadership):
self.convert_property(variable) self.convert_property(variable)
if not isinstance(variable, self.objectspace.leadership):
continue
for follower in variable.variable: for follower in variable.variable:
self.convert_property(follower) self.convert_property(follower)
else:
self.convert_property(variable)

View File

@ -1,4 +1,7 @@
"""Annotate services
"""
from os.path import basename from os.path import basename
from typing import Tuple
from ..i18n import _ from ..i18n import _
from ..utils import normalize_family from ..utils import normalize_family
@ -7,17 +10,17 @@ from ..error import DictConsistencyError
# that shall not be present in the exported (flatened) XML # that shall not be present in the exported (flatened) XML
ERASED_ATTRIBUTES = ('redefine', 'exists', 'fallback', 'optional', 'remove_check', 'namespace', ERASED_ATTRIBUTES = ('redefine', 'exists', 'fallback', 'optional', 'remove_check', 'namespace',
'remove_condition', 'path', 'instance_mode', 'index', 'is_in_leadership', 'remove_condition', 'path', 'instance_mode', 'index', 'is_in_leadership',
'level', 'remove_fill', 'xmlfiles') 'level', 'remove_fill', 'xmlfiles', 'type')
KEY_TYPE = {'variable': 'symlink', KEY_TYPE = {'variable': 'symlink',
'SymLinkOption': 'symlink',
'PortOption': 'port', 'PortOption': 'port',
'UnicodeOption': 'string', 'UnicodeOption': 'string',
'NetworkOption': 'network', 'NetworkOption': 'network',
'NetmaskOption': 'netmask', 'NetmaskOption': 'netmask',
'URLOption': 'web_address', 'URLOption': 'web_address',
'FilenameOption': 'filename'} 'FilenameOption': 'filename',
}
class ServiceAnnotator: class ServiceAnnotator:
@ -33,14 +36,15 @@ class ServiceAnnotator:
""" """
def __init__(self, objectspace): def __init__(self, objectspace):
self.objectspace = objectspace self.objectspace = objectspace
if hasattr(self.objectspace.space, 'services'):
if not hasattr(self.objectspace.space.services, 'service'):
del self.objectspace.space.services
else:
self.convert_services() self.convert_services()
def convert_services(self): def convert_services(self):
if not hasattr(self.objectspace.space, 'services'): """convert services to variables
return """
if not hasattr(self.objectspace.space.services, 'service'):
del self.objectspace.space.services
return
self.objectspace.space.services.hidden = True self.objectspace.space.services.hidden = True
self.objectspace.space.services.name = 'services' self.objectspace.space.services.name = 'services'
self.objectspace.space.services.doc = 'services' self.objectspace.space.services.doc = 'services'
@ -54,7 +58,7 @@ class ServiceAnnotator:
continue continue
eltname = elttype + 's' eltname = elttype + 's'
path = '.'.join(['services', service_name, eltname]) path = '.'.join(['services', service_name, eltname])
family = self.gen_family(eltname, family = self._gen_family(eltname,
path, path,
service.xmlfiles, service.xmlfiles,
) )
@ -70,7 +74,83 @@ class ServiceAnnotator:
families[service_name] = new_service families[service_name] = new_service
self.objectspace.space.services.service = families self.objectspace.space.services.service = families
def gen_family(self, def make_group_from_elts(self,
service_name,
elttype,
elts,
path,
):
"""Splits each objects into a group (and `OptionDescription`, in tiramisu terms)
and build elements and its attributes (the `Options` in tiramisu terms)
"""
families = []
for elt in elts:
# try to launch _update_xxxx() function
update_elt = '_update_' + elttype
if hasattr(self, update_elt):
getattr(self, update_elt)(elt,
service_name,
)
c_name, subpath = self._get_name_path(elt,
path,
)
family = self._gen_family(c_name,
subpath,
elt.xmlfiles,
)
family.variable = []
activate_path = '.'.join([subpath, 'activate'])
for key in dir(elt):
if key.startswith('_') or key.endswith('_type') or key in ERASED_ATTRIBUTES:
continue
value = getattr(elt, key)
listname = '{}list'.format(elttype)
if key == listname:
self.objectspace.list_conditions.setdefault(listname,
{}).setdefault(
value,
[]).append(activate_path)
continue
family.variable.append(self._generate_element(self._get_type(key,
elttype,
elt,
),
key,
value,
elt.xmlfiles,
f'{subpath}.{key}'
))
# FIXME ne devrait pas etre True par défaut
# devrait etre un calcule
family.variable.append(self._generate_element('boolean',
'activate',
True,
elt.xmlfiles,
activate_path,
))
families.append(family)
return families
def _get_name_path(self,
elt,
path: str,
) -> Tuple[str, str]:
# create element name, if already exists, add _xx to be uniq
if hasattr(elt, 'source'):
name = elt.source
else:
name = elt.name
idx = 0
while True:
c_name = name
if idx:
c_name += f'_{idx}'
subpath = '{}.{}'.format(path, c_name)
if not self.objectspace.paths.family_is_defined(subpath):
return c_name, subpath
idx += 1
def _gen_family(self,
name, name,
path, path,
xmlfiles xmlfiles
@ -85,111 +165,25 @@ class ServiceAnnotator:
) )
return family return family
def make_group_from_elts(self,
service_name,
name,
elts,
path,
):
"""Splits each objects into a group (and `OptionDescription`, in tiramisu terms)
and build elements and its attributes (the `Options` in tiramisu terms)
"""
families = []
new_elts = self._reorder_elts(name,
elts,
)
for index, elt_info in enumerate(new_elts):
elt = elt_info['elt']
elt_name = elt_info['elt_name']
# try to launch _update_xxxx() function
update_elt = '_update_' + elt_name
if hasattr(self, update_elt):
getattr(self, update_elt)(elt,
index,
path,
service_name,
)
idx = 0
while True:
if hasattr(elt, 'source'):
c_name = elt.source
else:
c_name = elt.name
if idx:
c_name += f'_{idx}'
subpath = '{}.{}'.format(path, c_name)
if not self.objectspace.paths.family_is_defined(subpath):
break
idx += 1
family = self.gen_family(c_name,
subpath,
elt.xmlfiles,
)
family.variable = []
listname = '{}list'.format(name)
activate_path = '.'.join([subpath, 'activate'])
for key in dir(elt):
if key.startswith('_') or key.endswith('_type') or key in ERASED_ATTRIBUTES:
continue
value = getattr(elt, key)
if key == listname:
self.objectspace.list_conditions.setdefault(listname,
{}).setdefault(
value,
[]).append(activate_path)
continue
family.variable.append(self._generate_element(elt_name,
key,
value,
elt,
f'{subpath}.{key}'
))
# FIXME ne devrait pas etre True par défaut
# devrait etre un calcule
family.variable.append(self._generate_element(elt_name,
'activate',
True,
elt,
activate_path,
))
families.append(family)
return families
def _generate_element(self, def _generate_element(self,
elt_name, type_,
key, key,
value, value,
elt, xmlfiles,
path, path,
): ):
variable = self.objectspace.variable(elt.xmlfiles) variable = self.objectspace.variable(xmlfiles)
variable.name = normalize_family(key) variable.name = normalize_family(key)
variable.mode = None variable.mode = None
if key == 'name':
true_key = elt_name
else:
true_key = key
dtd_key_type = true_key + '_type'
if key == 'activate':
type_ = 'boolean'
elif hasattr(elt, dtd_key_type):
type_ = KEY_TYPE[getattr(elt, dtd_key_type)]
elif key in self.objectspace.booleans_attributs:
type_ = 'boolean'
else:
type_ = 'string'
variable.type = type_ variable.type = type_
if type_ == 'symlink': if type_ == 'symlink':
variable.opt = self.objectspace.paths.get_variable_path(value, variable.opt = self.objectspace.paths.get_variable_path(value,
'services', 'services',
) )
# variable.opt = value
variable.multi = None variable.multi = None
else: else:
variable.doc = key variable.doc = key
val = self.objectspace.value(elt.xmlfiles) val = self.objectspace.value(xmlfiles)
val.type = type_ val.type = type_
val.name = value val.name = value
variable.value = [val] variable.value = [val]
@ -201,28 +195,23 @@ class ServiceAnnotator:
) )
return variable return variable
def _reorder_elts(self, def _get_type(self,
name, key: str,
elts, elt_name: str,
): elt,
"""Reorders by index the elts ) -> str:
""" if key == 'name':
new_elts = {} dtd_key_type = elt_name + '_type'
# reorder elts by index else:
for idx, elt in enumerate(elts): dtd_key_type = key + '_type'
new_elts.setdefault(idx, []).append(elt) if key in self.objectspace.booleans_attributs:
idxes = list(new_elts.keys()) return 'boolean'
idxes.sort() if hasattr(elt, dtd_key_type):
result_elts = [] return KEY_TYPE[getattr(elt, dtd_key_type)]
for idx in idxes: return 'string'
for elt in new_elts[idx]:
result_elts.append({'elt_name': name, 'elt': elt})
return result_elts
def _update_override(self, def _update_override(self,
file_, file_,
index,
service_path,
service_name, service_name,
): ):
file_.name = f'/systemd/system/{service_name}.service.d/rougail.conf' file_.name = f'/systemd/system/{service_name}.service.d/rougail.conf'
@ -232,15 +221,11 @@ class ServiceAnnotator:
if not hasattr(file_, 'source'): if not hasattr(file_, 'source'):
file_.source = f'{service_name}.service' file_.source = f'{service_name}.service'
self._update_file(file_, self._update_file(file_,
index,
service_path,
service_name, service_name,
) )
def _update_file(self, def _update_file(self,
file_, file_,
index,
service_path,
service_name, service_name,
): ):
if not hasattr(file_, 'file_type') or file_.file_type == "UnicodeOption": if not hasattr(file_, 'file_type') or file_.file_type == "UnicodeOption":
@ -248,5 +233,6 @@ class ServiceAnnotator:
file_.source = basename(file_.name) file_.source = basename(file_.name)
elif not hasattr(file_, 'source'): elif not hasattr(file_, 'source'):
xmlfiles = self.objectspace.display_xmlfiles(file_.xmlfiles) xmlfiles = self.objectspace.display_xmlfiles(file_.xmlfiles)
raise DictConsistencyError(_(f'attribute "source" is mandatory for the file "{file_.name}" in {xmlfiles}'), 34) msg = _(f'attribute "source" is mandatory for the file "{file_.name}" '
f'"({service_name})" in {xmlfiles}')
raise DictConsistencyError(msg, 34)

View File

@ -1,3 +1,5 @@
"""Annotate variable
"""
from ..i18n import _ from ..i18n import _
from ..utils import normalize_family from ..utils import normalize_family
from ..error import DictConsistencyError from ..error import DictConsistencyError
@ -15,14 +17,19 @@ CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
'date': dict(opttype="DateOption"), 'date': dict(opttype="DateOption"),
'unix_user': dict(opttype="UsernameOption"), 'unix_user': dict(opttype="UsernameOption"),
'ip': dict(opttype="IPOption", initkwargs={'allow_reserved': True}), 'ip': dict(opttype="IPOption", initkwargs={'allow_reserved': True}),
'local_ip': dict(opttype="IPOption", initkwargs={'private_only': True, 'warnings_only': True}), 'local_ip': dict(opttype="IPOption", initkwargs={'private_only': True,
'warnings_only': True}),
'netmask': dict(opttype="NetmaskOption"), 'netmask': dict(opttype="NetmaskOption"),
'network': dict(opttype="NetworkOption"), 'network': dict(opttype="NetworkOption"),
'broadcast': dict(opttype="BroadcastOption"), 'broadcast': dict(opttype="BroadcastOption"),
'netbios': dict(opttype="DomainnameOption", initkwargs={'type': 'netbios', 'warnings_only': True}), 'netbios': dict(opttype="DomainnameOption", initkwargs={'type': 'netbios',
'domain': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname', 'allow_ip': False}), 'warnings_only': True}),
'hostname': dict(opttype="DomainnameOption", initkwargs={'type': 'hostname', 'allow_ip': False}), 'domain': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname',
'web_address': dict(opttype="URLOption", initkwargs={'allow_ip': True, 'allow_without_dot': True}), 'allow_ip': False}),
'hostname': dict(opttype="DomainnameOption", initkwargs={'type': 'hostname',
'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}),
'mac': dict(opttype="MACOption"), 'mac': dict(opttype="MACOption"),
'cidr': dict(opttype="IPOption", initkwargs={'cidr': True}), 'cidr': dict(opttype="IPOption", initkwargs={'cidr': True}),
@ -30,37 +37,46 @@ CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
} }
FORCE_CHOICE = {'oui/non': ['oui', 'non'], FORCE_CHOICE = {'schedule': ['none', 'daily', 'weekly', 'monthly'],
'on/off': ['on', 'off'], 'schedulemod': ['pre', 'post'],
'yes/no': ['yes', 'no'], }
'schedule': ['none', 'daily', 'weekly', 'monthly'],
'schedulemod': ['pre', 'post']}
RENAME_ATTIBUTES = {'description': 'doc'} RENAME_ATTIBUTES = {'description': 'doc'}
class VariableAnnotator: class VariableAnnotator:
"""Annotate variable
"""
def __init__(self, def __init__(self,
objectspace, objectspace,
): ):
self.objectspace = objectspace self.objectspace = objectspace
if hasattr(self.objectspace.space, 'variables'):
self.convert_variable() self.convert_variable()
self.convert_separators() self.convert_separators()
def convert_variable(self): def _convert_variable(self,
def _convert_variable(variable, namespace: str,
variable_type, variable,
): variable_type: str,
if not hasattr(variable, 'type'): ) -> None:
variable.type = 'string'
if variable.type != 'symlink' and not hasattr(variable, 'description'): if variable.type != 'symlink' and not hasattr(variable, 'description'):
variable.description = variable.name variable.description = variable.name
if hasattr(variable, 'value'): if hasattr(variable, 'value'):
for value in variable.value: value_to_del = []
for idx, value in enumerate(variable.value):
if not hasattr(value, 'type'): if not hasattr(value, 'type'):
value.type = variable.type value.type = variable.type
if 'name' not in vars(value):
value_to_del.append(idx)
else:
value.name = CONVERT_OPTION.get(value.type, {}).get('func', str)(value.name) value.name = CONVERT_OPTION.get(value.type, {}).get('func', str)(value.name)
value_to_del.sort(reverse=True)
for idx in value_to_del:
del variable.value[idx]
if not variable.value:
del variable.value
for key, value in RENAME_ATTIBUTES.items(): for key, value in RENAME_ATTIBUTES.items():
setattr(variable, value, getattr(variable, key)) setattr(variable, value, getattr(variable, key))
setattr(variable, key, None) setattr(variable, key, None)
@ -69,74 +85,63 @@ class VariableAnnotator:
variable.multi = 'submulti' variable.multi = 'submulti'
else: else:
variable.multi = True variable.multi = True
self._convert_valid_enum(namespace,
def _convert_valid_enum(namespace, variable,
)
def _convert_valid_enum(self,
namespace,
variable, variable,
path,
): ):
"""some types are, in fact, choices
convert this kind of variables into choice
"""
if variable.type in FORCE_CHOICE: if variable.type in FORCE_CHOICE:
if not hasattr(self.objectspace.space, 'constraints'):
xmlfiles = variable.xmlfiles
self.objectspace.space.constraints = self.objectspace.constraints(xmlfiles)
self.objectspace.space.constraints.namespace = namespace
if not hasattr(self.objectspace.space.constraints, 'check'):
self.objectspace.space.constraints.check = []
check = self.objectspace.check(variable.xmlfiles) check = self.objectspace.check(variable.xmlfiles)
check.name = 'valid_enum' check.name = 'valid_enum'
check.target = path check.target = variable.path
check.namespace = namespace check.namespace = namespace
check.param = [] check.param = []
for value in FORCE_CHOICE[variable.type]: for value in FORCE_CHOICE[variable.type]:
param = self.objectspace.param(variable.xmlfiles) param = self.objectspace.param(variable.xmlfiles)
param.text = value param.text = value
check.param.append(param) check.param.append(param)
if not hasattr(self.objectspace.space, 'constraints'):
self.objectspace.space.constraints = self.objectspace.constraints(variable.xmlfiles)
self.objectspace.space.constraints.namespace = namespace
if not hasattr(self.objectspace.space.constraints, 'check'):
self.objectspace.space.constraints.check = []
self.objectspace.space.constraints.check.append(check) self.objectspace.space.constraints.check.append(check)
variable.type = 'string' variable.type = 'string'
def _valid_type(variable): def convert_variable(self):
if variable.type not in CONVERT_OPTION: """convert variable
xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles) """
raise DictConsistencyError(_(f'unvalid type "{variable.type}" for variable "{variable.name}" in {xmlfiles}'), 36)
if not hasattr(self.objectspace.space, 'variables'):
return
for families in self.objectspace.space.variables.values(): for families in self.objectspace.space.variables.values():
namespace = families.name
if hasattr(families, 'family'):
families.doc = families.name families.doc = families.name
for family in families.family.values(): for family in families.family.values():
family.doc = family.name family.doc = family.name
family.name = normalize_family(family.name) family.name = normalize_family(family.name)
if hasattr(family, 'variable'): if not hasattr(family, 'variable'):
continue
for variable in family.variable.values(): for variable in family.variable.values():
if isinstance(variable, self.objectspace.leadership): if isinstance(variable, self.objectspace.leadership):
for idx, follower in enumerate(variable.variable): # first variable is a leader, others are follower
if idx == 0: variable_type = 'leader'
variable_type = 'master' for follower in variable.variable:
else: self._convert_variable(families.name,
variable_type = 'follower' follower,
path = '{}.{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name, follower.name)
_convert_variable(follower,
variable_type, variable_type,
) )
_convert_valid_enum(namespace, variable_type = 'follower'
follower,
path,
)
_valid_type(follower)
else: else:
path = '{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name) self._convert_variable(families.name,
_convert_variable(variable, variable,
'variable', 'variable',
) )
_convert_valid_enum(namespace,
variable,
path,
)
_valid_type(variable)
def convert_separators(self): # pylint: disable=C0111,R0201 def convert_separators(self): # pylint: disable=C0111,R0201
if not hasattr(self.objectspace.space, 'variables'):
return
for family in self.objectspace.space.variables.values(): for family in self.objectspace.space.variables.values():
if not hasattr(family, 'separators'): if not hasattr(family, 'separators'):
continue continue
@ -144,10 +149,8 @@ class VariableAnnotator:
for separator in family.separators.separator: for separator in family.separators.separator:
option = self.objectspace.paths.get_variable_obj(separator.name) option = self.objectspace.paths.get_variable_obj(separator.name)
if hasattr(option, 'separator'): if hasattr(option, 'separator'):
subpath = self.objectspace.paths.get_variable_path(separator.name,
separator.namespace,
)
xmlfiles = self.objectspace.display_xmlfiles(separator.xmlfiles) xmlfiles = self.objectspace.display_xmlfiles(separator.xmlfiles)
raise DictConsistencyError(_(f'{subpath} already has a separator in {xmlfiles}'), 35) msg = _(f'{separator.name} already has a separator in {xmlfiles}')
raise DictConsistencyError(msg, 35)
option.separator = separator.text option.separator = separator.text
del family.separators del family.separators

View File

@ -90,7 +90,7 @@
<!ELEMENT variable (value*)> <!ELEMENT variable (value*)>
<!ATTLIST variable name CDATA #REQUIRED> <!ATTLIST variable name CDATA #REQUIRED>
<!ATTLIST variable type CDATA #IMPLIED> <!ATTLIST variable type (number|float|string|password|mail|boolean|filename|date|unix_user|ip|local_ip|netmask|network|broadcast|netbios|domain|hostname|web_address|port|mac|cidr|network_cidr|schedule|schedulemod) "string">
<!ATTLIST variable description CDATA #IMPLIED> <!ATTLIST variable description CDATA #IMPLIED>
<!ATTLIST variable help CDATA #IMPLIED> <!ATTLIST variable help CDATA #IMPLIED>
<!ATTLIST variable hidden (True|False) "False"> <!ATTLIST variable hidden (True|False) "False">

View File

@ -2,12 +2,15 @@
class ConfigError(Exception): class ConfigError(Exception):
pass pass
class FileNotFound(ConfigError): class FileNotFound(ConfigError):
pass pass
class TemplateError(ConfigError): class TemplateError(ConfigError):
pass pass
class TemplateDisabled(TemplateError): class TemplateDisabled(TemplateError):
"""Template is disabled. """Template is disabled.
""" """

View File

@ -1,3 +1,8 @@
"""parse XML files and build a space with objects
it aggregates this files and manage redefine and exists attributes
"""
from typing import Optional
from .i18n import _ from .i18n import _
from .xmlreflector import XMLReflector from .xmlreflector import XMLReflector
from .utils import normalize_family from .utils import normalize_family
@ -19,30 +24,39 @@ FORCED_TEXT_ELTS_AS_NAME = ('choice', 'property', 'value', 'target')
# _____________________________________________________________________________ # _____________________________________________________________________________
# special types definitions for the Object Space's internal representation # special types definitions for the Object Space's internal representation
class RootRougailObject: class RootRougailObject: # pylint: disable=R0903
def __init__(self, xmlfiles): """Root object
"""
def __init__(self,
xmlfiles,
name=None,
):
if not isinstance(xmlfiles, list): if not isinstance(xmlfiles, list):
xmlfiles = [xmlfiles] xmlfiles = [xmlfiles]
self.xmlfiles = xmlfiles self.xmlfiles = xmlfiles
if name:
self.name = name
class Atom(RootRougailObject): class Atom(RootRougailObject): # pylint: disable=R0903
pass """Atomic object (means can only define one time)
"""
class Redefinable(RootRougailObject): class Redefinable(RootRougailObject): # pylint: disable=R0903
pass """Object that could be redefine
"""
class UnRedefinable(RootRougailObject): class UnRedefinable(RootRougailObject): # pylint: disable=R0903
pass """Object that could not be redefine
"""
class ObjSpace: class ObjSpace: # pylint: disable=R0903
""" """
Base object space Base object space
""" """
pass
class RougailObjSpace: class RougailObjSpace:
@ -52,26 +66,24 @@ class RougailObjSpace:
def __init__(self, def __init__(self,
xmlreflector: XMLReflector, xmlreflector: XMLReflector,
) -> None: ) -> None:
self.index = 0
self.xmlreflector = xmlreflector
self.space = ObjSpace() self.space = ObjSpace()
self.paths = Path() self.paths = Path()
self.redefine_variables = None
self.forced_text_elts = set()
self.forced_text_elts_as_name = set(FORCED_TEXT_ELTS_AS_NAME) self.forced_text_elts_as_name = set(FORCED_TEXT_ELTS_AS_NAME)
self.list_conditions = {} self.list_conditions = {}
self.booleans_attributs = [] self.booleans_attributs = []
self.make_object_space_classes() self.make_object_space_classes(xmlreflector)
def make_object_space_classes(self): def make_object_space_classes(self,
xmlreflector: XMLReflector,
) -> None:
"""Create Rougail ObjectSpace class types from DDT file """Create Rougail ObjectSpace class types from DDT file
It enables us to create objects like: It enables us to create objects like:
File(), Variable(), Ip(), Family(), Constraints()... and so on. File(), Variable(), Ip(), Family(), Constraints()... and so on.
""" """
for dtd_elt in self.xmlreflector.dtd.iterelements(): for dtd_elt in xmlreflector.dtd.iterelements():
attrs = {} attrs = {}
if dtd_elt.name in FORCE_REDEFINABLES: if dtd_elt.name in FORCE_REDEFINABLES:
clstype = Redefinable clstype = Redefinable
@ -95,7 +107,6 @@ class RougailObjSpace:
clstype = Redefinable clstype = Redefinable
if dtd_attr.name == 'name' and forced_text_elt: if dtd_attr.name == 'name' and forced_text_elt:
# child.text should be transform has a "name" attribute # child.text should be transform has a "name" attribute
self.forced_text_elts.add(dtd_elt.name)
forced_text_elt = False forced_text_elt = False
if forced_text_elt is True: if forced_text_elt is True:
@ -104,14 +115,19 @@ class RougailObjSpace:
# create ObjectSpace object # create ObjectSpace object
setattr(self, dtd_elt.name, type(dtd_elt.name.capitalize(), (clstype,), attrs)) setattr(self, dtd_elt.name, type(dtd_elt.name.capitalize(), (clstype,), attrs))
for elt in FORCE_ELEMENTS: for elt in FORCE_ELEMENTS:
setattr(self, elt, type(self._get_elt_name(elt), (RootRougailObject,), dict()))
@staticmethod
def _get_elt_name(elt) -> str:
name = elt.capitalize() name = elt.capitalize()
if name.endswith('_'): if name.endswith('_'):
name = name[:-1] name = name[:-1]
setattr(self, elt, type(name, (RootRougailObject,), dict())) return name
def display_xmlfiles(self, @staticmethod
xmlfiles: list, def display_xmlfiles(xmlfiles: list) -> str:
) -> str: """The function format xmlfiles informations to generate errors
"""
if len(xmlfiles) == 1: if len(xmlfiles) == 1:
return '"' + xmlfiles[0] + '"' return '"' + xmlfiles[0] + '"'
return '"' + '", "'.join(xmlfiles[:-1]) + '"' + ' and ' + '"' + xmlfiles[-1] + '"' return '"' + '", "'.join(xmlfiles[:-1]) + '"' + ' and ' + '"' + xmlfiles[-1] + '"'
@ -124,33 +140,42 @@ class RougailObjSpace:
): ):
"""Parses a Rougail XML file and populates the RougailObjSpace """Parses a Rougail XML file and populates the RougailObjSpace
""" """
redefine_variables = []
self._xml_parse(xmlfile,
document,
space,
namespace,
redefine_variables,
)
def _xml_parse(self,
xmlfile,
document,
space,
namespace,
redefine_variables,
) -> None:
# var to check unique family name in a XML file # var to check unique family name in a XML file
family_names = [] family_names = []
for child in document: for child in document:
# this index enables us to reorder objects
if not isinstance(child.tag, str): if not isinstance(child.tag, str):
# doesn't proceed the XML commentaries # doesn't proceed the XML commentaries
continue continue
if child.tag == 'family': if child.tag == 'family':
if child.attrib['name'] in family_names: if child.attrib['name'] in family_names:
raise DictConsistencyError(_(f'Family "{child.attrib["name"]}" is set several times in "{xmlfile}"'), 44) msg = _(f'Family "{child.attrib["name"]}" is set several times in "{xmlfile}"')
raise DictConsistencyError(msg, 44)
family_names.append(child.attrib['name']) family_names.append(child.attrib['name'])
if child.tag == 'variables':
# variables has no name, so force namespace name
child.attrib['name'] = namespace
if child.tag == 'value' and child.text is None:
# remove empty value
continue
# variable objects creation
try: try:
# variable objects creation
variableobj = self.get_variableobj(xmlfile, variableobj = self.get_variableobj(xmlfile,
child, child,
space, space,
namespace, namespace,
redefine_variables,
) )
except SpaceObjShallNotBeUpdated: except SpaceObjShallNotBeUpdated:
continue continue
self.index += 1
self.set_text(child, self.set_text(child,
variableobj, variableobj,
) )
@ -160,9 +185,9 @@ class RougailObjSpace:
) )
self.remove(child, self.remove(child,
variableobj, variableobj,
redefine_variables,
) )
self.set_path(child, self.set_path(namespace,
namespace,
document, document,
variableobj, variableobj,
) )
@ -172,10 +197,11 @@ class RougailObjSpace:
namespace, namespace,
) )
if list(child) != []: if list(child) != []:
self.xml_parse_document(xmlfile, self._xml_parse(xmlfile,
child, child,
variableobj, variableobj,
namespace, namespace,
redefine_variables,
) )
def get_variableobj(self, def get_variableobj(self,
@ -183,41 +209,55 @@ class RougailObjSpace:
child: list, child: list,
space, space,
namespace, namespace,
redefine_variables,
): ):
""" """
retrieves or creates Rougail Object Subspace objects retrieves or creates Rougail Object Subspace objects
""" """
obj = getattr(self, child.tag) obj = getattr(self, child.tag)
name = self._get_name(child, namespace)
if Redefinable in obj.__mro__: if Redefinable in obj.__mro__:
return self.create_or_update_redefinable_object(xmlfile, return self.create_or_update_redefinable_object(xmlfile,
child.attrib, child.attrib,
space, space,
child, child,
name,
namespace, namespace,
redefine_variables,
) )
if Atom in obj.__mro__: if Atom in obj.__mro__:
if child.tag in vars(space): if child.tag in vars(space):
# Atom instance has to be a singleton here # Atom instance has to be a singleton here
# we do not re-create it, we reuse it # we do not re-create it, we reuse it
return getattr(space, child.tag) return getattr(space, child.tag)
return obj(xmlfile) return obj(xmlfile, name)
if child.tag not in vars(space): if child.tag not in vars(space):
setattr(space, child.tag, []) setattr(space, child.tag, [])
return obj(xmlfile) return obj(xmlfile, name)
def _get_name(self,
child,
namespace: str,
) -> Optional[str]:
if child.tag == 'variables':
return namespace
if 'name' in child.attrib:
return child.attrib['name']
if child.text and child.tag in self.forced_text_elts_as_name:
return child.text.strip()
return None
def create_or_update_redefinable_object(self, def create_or_update_redefinable_object(self,
xmlfile, xmlfile,
subspace, subspace,
space, space,
child, child,
name,
namespace, namespace,
redefine_variables,
): ):
if child.tag in self.forced_text_elts_as_name: """A redefinable object could be created or updated
name = child.text """
else:
name = subspace['name']
if child.tag == 'family':
name = normalize_family(name)
existed_var = self.get_existed_obj(name, existed_var = self.get_existed_obj(name,
space, space,
child, child,
@ -229,47 +269,65 @@ class RougailObjSpace:
default_redefine = child.tag in FORCE_REDEFINABLES default_redefine = child.tag in FORCE_REDEFINABLES
redefine = self.convert_boolean(subspace.get('redefine', default_redefine)) redefine = self.convert_boolean(subspace.get('redefine', default_redefine))
if redefine is True: if redefine is True:
if isinstance(existed_var, self.variable): # pylint: disable=E1101
if namespace == Config['variable_namespace']:
redefine_variables.append(name)
else:
redefine_variables.append(space.path + '.' + name)
existed_var.xmlfiles.append(xmlfile) existed_var.xmlfiles.append(xmlfile)
return existed_var return existed_var
exists = self.convert_boolean(subspace.get('exists', True)) exists = self.convert_boolean(subspace.get('exists', True))
if exists is False: if exists is False:
raise SpaceObjShallNotBeUpdated() raise SpaceObjShallNotBeUpdated()
xmlfiles = self.display_xmlfiles(existed_var.xmlfiles) xmlfiles = self.display_xmlfiles(existed_var.xmlfiles)
raise DictConsistencyError(_(f'"{child.tag}" named "{name}" cannot be re-created in "{xmlfile}", already defined in {xmlfiles}'), 45) msg = _(f'"{child.tag}" named "{name}" cannot be re-created in "{xmlfile}", '
# if this object must only be modified if object already exists f'already defined in {xmlfiles}')
raise DictConsistencyError(msg, 45)
# object deos not exists
exists = self.convert_boolean(subspace.get('exists', False)) exists = self.convert_boolean(subspace.get('exists', False))
if exists is True: if exists is True:
# manage object only if already exists, so cancel
raise SpaceObjShallNotBeUpdated() raise SpaceObjShallNotBeUpdated()
redefine = self.convert_boolean(subspace.get('redefine', False)) redefine = self.convert_boolean(subspace.get('redefine', False))
if redefine is False: if redefine is True:
# cannot redefine an inexistant object
msg = _(f'Redefined object in "{xmlfile}": "{name}" does not exist yet')
raise DictConsistencyError(msg, 46)
if child.tag not in vars(space): if child.tag not in vars(space):
setattr(space, child.tag, {}) setattr(space, child.tag, {})
return getattr(self, child.tag)(xmlfile) return getattr(self, child.tag)(xmlfile, name)
raise DictConsistencyError(_(f'Redefined object in "{xmlfile}": "{name}" does not exist yet'), 46)
def get_existed_obj(self, def get_existed_obj(self,
name: str, name: str,
space: str, space: str,
child, child,
namespace: str, namespace: str,
): ) -> None:
if isinstance(space, self.family): """if an object exists, return it
"""
if child.tag == 'family':
name = normalize_family(name)
if isinstance(space, self.family): # pylint: disable=E1101
if namespace != Config['variable_namespace']: if namespace != Config['variable_namespace']:
name = space.path + '.' + name name = space.path + '.' + name
if not self.paths.path_is_defined(name): if not self.paths.path_is_defined(name):
return return None
old_family_name = self.paths.get_variable_family_name(name) old_family_name = self.paths.get_variable_family_name(name)
if namespace != Config['variable_namespace']: if namespace != Config['variable_namespace']:
old_family_name = namespace + '.' + old_family_name old_family_name = namespace + '.' + old_family_name
if space.path != old_family_name: if space.path != old_family_name:
xmlfiles = self.display_xmlfiles(space.xmlfiles) xmlfiles = self.display_xmlfiles(space.xmlfiles)
raise DictConsistencyError(_(f'Variable was previously create in family "{old_family_name}", now it is in "{space.path}" in {xmlfiles}'), 47) msg = _(f'Variable was previously create in family "{old_family_name}", '
f'now it is in "{space.path}" in {xmlfiles}')
raise DictConsistencyError(msg, 47)
return self.paths.get_variable_obj(name) return self.paths.get_variable_obj(name)
children = getattr(space, child.tag, {}) children = getattr(space, child.tag, {})
if name in children: if name in children:
return children[name] return children[name]
return None
def convert_boolean(self, value): @staticmethod
def convert_boolean(value: str) -> bool:
"""Boolean coercion. The Rougail XML may contain srings like `True` or `False` """Boolean coercion. The Rougail XML may contain srings like `True` or `False`
""" """
if isinstance(value, bool): if isinstance(value, bool):
@ -281,15 +339,13 @@ class RougailObjSpace:
def set_text(self, def set_text(self,
child, child,
variableobj, variableobj,
): ) -> None:
if child.text is None: """set text
"""
if child.text is None or child.tag in self.forced_text_elts_as_name:
return return
text = child.text.strip() text = child.text.strip()
if not text: if text:
return
if child.tag in self.forced_text_elts_as_name:
variableobj.name = text
else:
variableobj.text = text variableobj.text = text
def set_attributes(self, def set_attributes(self,
@ -297,6 +353,8 @@ class RougailObjSpace:
child, child,
variableobj, variableobj,
): ):
""" set attributes to an object
"""
redefine = self.convert_boolean(child.attrib.get('redefine', False)) redefine = self.convert_boolean(child.attrib.get('redefine', False))
if redefine and child.tag == 'variable': if redefine and child.tag == 'variable':
# delete old values # delete old values
@ -306,7 +364,9 @@ class RougailObjSpace:
for attr, val in child.attrib.items(): for attr, val in child.attrib.items():
if redefine and attr in UNREDEFINABLE: if redefine and attr in UNREDEFINABLE:
xmlfiles = self.display_xmlfiles(variableobj.xmlfiles[:-1]) xmlfiles = self.display_xmlfiles(variableobj.xmlfiles[:-1])
raise DictConsistencyError(_(f'cannot redefine attribute "{attr}" for variable "{child.attrib["name"]}" in "{xmlfile}", already defined in {xmlfiles}'), 48) msg = _(f'cannot redefine attribute "{attr}" for variable "{child.attrib["name"]}"'
f' in "{xmlfile}", already defined in {xmlfiles}')
raise DictConsistencyError(msg, 48)
if attr in self.booleans_attributs: if attr in self.booleans_attributs:
val = self.convert_boolean(val) val = self.convert_boolean(val)
if attr == 'name' and getattr(variableobj, 'name', None): if attr == 'name' and getattr(variableobj, 'name', None):
@ -317,6 +377,7 @@ class RougailObjSpace:
def remove(self, def remove(self,
child, child,
variableobj, variableobj,
redefine_variables,
): ):
"""Rougail object tree manipulations """Rougail object tree manipulations
""" """
@ -327,67 +388,63 @@ class RougailObjSpace:
self.remove_condition(variableobj.name) self.remove_condition(variableobj.name)
if child.attrib.get('remove_fill', False): if child.attrib.get('remove_fill', False):
self.remove_fill(variableobj.name) self.remove_fill(variableobj.name)
if child.tag == 'fill' and child.attrib['target'] in self.redefine_variables: if child.tag == 'fill' and child.attrib['target'] in redefine_variables:
self.remove_fill(child.attrib['target']) self.remove_fill(child.attrib['target'])
def remove_check(self, name): def remove_check(self, name):
if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'check'): """Remove a check with a specified target
"""
remove_checks = [] remove_checks = []
for idx, check in enumerate(self.space.constraints.check): for idx, check in enumerate(self.space.constraints.check): # pylint: disable=E1101
if hasattr(check, 'target') and check.target == name: if check.target == name:
remove_checks.append(idx) remove_checks.append(idx)
remove_checks = list(set(remove_checks))
remove_checks.sort(reverse=True) remove_checks.sort(reverse=True)
for idx in remove_checks: for idx in remove_checks:
self.space.constraints.check.pop(idx) self.space.constraints.check.pop(idx) # pylint: disable=E1101
def remove_condition(self, name): def remove_condition(self,
name: str,
) -> None:
"""Remove a condition with a specified source
"""
remove_conditions = [] remove_conditions = []
for idx, condition in enumerate(self.space.constraints.condition): for idx, condition in enumerate(self.space.constraints.condition): # pylint: disable=E1101
if condition.source == name: if condition.source == name:
remove_conditions.append(idx) remove_conditions.append(idx)
remove_conditions.sort(reverse=True)
for idx in remove_conditions: for idx in remove_conditions:
del self.space.constraints.condition[idx] del self.space.constraints.condition[idx] # pylint: disable=E1101
def remove_fill(self, name): def remove_fill(self,
if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'fill'): name: str,
remove_fills= [] ) -> None:
for idx, fill in enumerate(self.space.constraints.fill): """Remove a fill with a specified target
if hasattr(fill, 'target') and fill.target == name: """
remove_fills = []
for idx, fill in enumerate(self.space.constraints.fill): # pylint: disable=E1101
if fill.target == name:
remove_fills.append(idx) remove_fills.append(idx)
remove_fills = list(set(remove_fills))
remove_fills.sort(reverse=True) remove_fills.sort(reverse=True)
for idx in remove_fills: for idx in remove_fills:
self.space.constraints.fill.pop(idx) self.space.constraints.fill.pop(idx) # pylint: disable=E1101
def set_path(self, def set_path(self,
child,
namespace, namespace,
document, document,
variableobj, variableobj,
): ):
"""Fill self.paths attributes """Fill self.paths attributes
""" """
if child.tag == 'variable': if isinstance(variableobj, self.variable): # pylint: disable=E1101
family_name = document.attrib['name'] family_name = normalize_family(document.attrib['name'])
family_name = normalize_family(family_name)
self.paths.add_variable(namespace, self.paths.add_variable(namespace,
child.attrib['name'], variableobj.name,
family_name, family_name,
document.attrib.get('dynamic') is not None, document.attrib.get('dynamic') is not None,
variableobj, variableobj,
) )
if child.attrib.get('redefine', 'False') == 'True': elif isinstance(variableobj, self.family): # pylint: disable=E1101
if namespace == Config['variable_namespace']: family_name = normalize_family(variableobj.name)
self.redefine_variables.append(child.attrib['name'])
else:
self.redefine_variables.append(namespace + '.' + family_name + '.' +
child.attrib['name'])
elif child.tag == 'family':
family_name = normalize_family(child.attrib['name'])
if namespace != Config['variable_namespace']: if namespace != Config['variable_namespace']:
family_name = namespace + '.' + family_name family_name = namespace + '.' + family_name
self.paths.add_family(namespace, self.paths.add_family(namespace,
@ -396,14 +453,14 @@ class RougailObjSpace:
) )
variableobj.path = self.paths.get_family_path(family_name, namespace) variableobj.path = self.paths.get_family_path(family_name, namespace)
def add_to_tree_structure(self, @staticmethod
variableobj, def add_to_tree_structure(variableobj,
space, space,
child, child,
namespace, namespace: str,
): ) -> None:
if not hasattr(variableobj, 'index'): """add a variable to the tree
variableobj.index = self.index """
variableobj.namespace = namespace variableobj.namespace = namespace
if isinstance(variableobj, Redefinable): if isinstance(variableobj, Redefinable):
name = variableobj.name name = variableobj.name

View File

@ -79,6 +79,7 @@ class Path:
new_path = namespace + '.' + leader_family_name + '.' + leader_name + '.' + name new_path = namespace + '.' + leader_family_name + '.' + leader_name + '.' + name
self.variables[new_path] = self.variables.pop(old_path) self.variables[new_path] = self.variables.pop(old_path)
self.variables[new_path]['leader'] = leader_name self.variables[new_path]['leader'] = leader_name
self.variables[new_path]['variableobj'].path = new_path
if namespace == Config['variable_namespace']: if namespace == Config['variable_namespace']:
self.full_paths_variables[name] = new_path self.full_paths_variables[name] = new_path
@ -94,11 +95,13 @@ class Path:
variableobj, variableobj,
) -> str: # pylint: disable=C0111 ) -> str: # pylint: disable=C0111
if '.' not in name: if '.' not in name:
full_name = '.'.join([namespace, family, name]) full_path = '.'.join([namespace, family, name])
self.full_paths_variables[name] = full_name if namespace == Config['variable_namespace']:
self.full_paths_variables[name] = full_path
else: else:
full_name = name full_path = name
self.variables[full_name] = dict(name=name, variableobj.path = full_path
self.variables[full_path] = dict(name=name,
family=family, family=family,
namespace=namespace, namespace=namespace,
leader=None, leader=None,
@ -107,12 +110,12 @@ class Path:
) )
def get_variable_name(self, def get_variable_name(self,
name, name: str,
): # pylint: disable=C0111 ): # pylint: disable=C0111
return self._get_variable(name)['name'] return self._get_variable(name)['name']
def get_variable_obj(self, def get_variable_obj(self,
name:str, name: str,
) -> 'Variable': # pylint: disable=C0111 ) -> 'Variable': # pylint: disable=C0111
return self._get_variable(name)['variableobj'] return self._get_variable(name)['variableobj']

View File

@ -266,7 +266,6 @@ class Variable(Common):
) )
self.is_follower = is_follower self.is_follower = is_follower
convert_option = CONVERT_OPTION[elt.type] convert_option = CONVERT_OPTION[elt.type]
del elt.type
self.object_type = convert_option['opttype'] self.object_type = convert_option['opttype']
self.attrib.update(convert_option.get('initkwargs', {})) self.attrib.update(convert_option.get('initkwargs', {}))
if self.object_type != 'SymLinkOption': if self.object_type != 'SymLinkOption':

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_freeze="True"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_freeze="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="module_instancie" type="oui/non" description="No change"> <variable name="module_instancie" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_freeze="True" mode="expert"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_freeze="True" mode="expert">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="module_instancie" type="oui/non" description="No change"> <variable name="module_instancie" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'expert', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'auto_freeze', 'expert', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_save="True"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_save="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_save="True" mode="expert"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_save="True" mode="expert">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'expert', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'expert', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'expert'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'expert'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -3,7 +3,7 @@
<variables> <variables>
<family name="général"> <family name="général">
<!-- this is a comment --> <!-- this is a comment -->
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="without_type"> <variable name="without_type">

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='without_type', doc='without_type', multi=False, default='non') option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='without_type', doc='without_type', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -3,7 +3,7 @@
<rougail> <rougail>
<variables> <variables>
<family name='général'> <family name='général'>
<variable name='mode_conteneur_actif1' type='oui/non' description="No change" hidden="True"> <variable name='mode_conteneur_actif1' type='string' description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="module_instancie" type="oui/non" description="No change"> <variable name="module_instancie" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_freeze="True" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_freeze="True" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non')
option_4 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'frozen', 'hidden', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})), values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'frozen', 'hidden', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((), kwargs={})))
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -9,7 +9,7 @@
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="Description"> <variable name="mode_conteneur_actif" type="string" description="Description">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_8 = StrOption(name='group', doc='group', multi=False, default='root') option_8 = StrOption(name='group', doc='group', multi=False, default='root')

View File

@ -9,7 +9,7 @@
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="Description"> <variable name="mode_conteneur_actif" type="string" description="Description">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_8 = StrOption(name='group', doc='group', multi=False, default='root') option_8 = StrOption(name='group', doc='group', multi=False, default='root')

View File

@ -9,7 +9,7 @@
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="Description"> <variable name="mode_conteneur_actif" type="string" description="Description">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_8 = StrOption(name='group', doc='group', multi=False, default='root') option_8 = StrOption(name='group', doc='group', multi=False, default='root')

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="Redefine description" hidden="True" multi="True"> <variable name="mode_conteneur_actif" type="string" description="Redefine description" hidden="True" multi="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine description', multi=True, default=['non'], default_multi='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine description', multi=True, default=['non'], default_multi='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="general" type="oui/non" description="description"> <variable name="general" type="string" description="description">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='general', doc='description', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='general', doc='description', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,13 +2,13 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_freeze="True"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_freeze="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="module_instancie" type="oui/non" description="No change"> <variable name="module_instancie" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,9 +8,9 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non')
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_save="True"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_save="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'basic', 'force_store_value'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,8 +2,8 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"/> <variable name="mode_conteneur_actif" type="string" description="No change"/>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="Général"> <family name="Général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,8 +2,8 @@
<rougail> <rougail>
<variables> <variables>
<family name="general" mode="basic"> <family name="general" mode="basic">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" mandatory="True" mode="expert"/> <variable name="mode_conteneur_actif" type="string" description="No change" mandatory="True" mode="expert"/>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -3,7 +3,7 @@
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="number" description="No change" hidden="True"/> <variable name="mode_conteneur_actif" type="number" description="No change" hidden="True"/>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -9,7 +9,7 @@ except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = IntOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={}))) option_3 = IntOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={})))
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((), kwargs={})))
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="module_instancie" type="oui/non" description="No change"> <variable name="module_instancie" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif" type="oui/non" description="No change" auto_freeze="True"> <variable name="mode_conteneur_actif" type="string" description="No change" auto_freeze="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non')
option_4 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})), values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_3.impl_set_information("separator", "Établissement") option_3.impl_set_information("separator", "Établissement")
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_3.impl_set_information("separator", "Établissement") option_3.impl_set_information("separator", "Établissement")
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="autosavevar" type="string" description="autosave variable" auto_save="True"/> <variable name="autosavevar" type="string" description="autosave variable" auto_save="True"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={}))) option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True"> <variable name="mode_conteneur_actif" type="string" description="No change" hidden="True">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="autosavevar" type="string" description="autosave variable" hidden="True" auto_save="True"/> <variable name="autosavevar" type="string" description="autosave variable" hidden="True" auto_save="True"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'frozen', 'hidden'}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={}))) option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'frozen', 'hidden'}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,10 +2,10 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>oui</value> <value>oui</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,8 +8,8 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif', doc='No change', multi=False, default='oui')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -2,13 +2,13 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>oui</value> <value>oui</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif2" type="oui/non" description="No change"> <variable name="mode_conteneur_actif2" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif3" type="string" description="No change"> <variable name="mode_conteneur_actif3" type="string" description="No change">

View File

@ -8,9 +8,9 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui')
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non')
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif3', doc='No change', multi=False, default='oui') option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif3', doc='No change', multi=False, default='oui')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5, option_6]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5, option_6])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,13 +2,13 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>oui</value> <value>oui</value>
</variable> </variable>
<variable name="mode_conteneur_actif1" type="oui/non" description="No change"> <variable name="mode_conteneur_actif1" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif2" type="oui/non" description="No change"> <variable name="mode_conteneur_actif2" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="mode_conteneur_actif3" type="string" description="No change"> <variable name="mode_conteneur_actif3" type="string" description="No change">

View File

@ -8,9 +8,9 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui')
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non')
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non')
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif3', doc='No change', multi=False, default='oui') option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif3', doc='No change', multi=False, default='oui')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5, option_6]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5, option_6])
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>oui</value> <value>oui</value>
</variable> </variable>
<variable name="adresse_ip_eth0" type="local_ip" description="Adresse IP de la carte" mandatory="True" mode="basic"/> <variable name="adresse_ip_eth0" type="local_ip" description="Adresse IP de la carte" mandatory="True" mode="basic"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui')
option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False) option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False)
option_5 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), name='adresse_netmask_eth0', doc='Masque de sous réseau de la carte', multi=False) option_5 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), name='adresse_netmask_eth0', doc='Masque de sous réseau de la carte', multi=False)
option_6 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_in_network, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_ip', doc='IP', multi=False) option_6 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_in_network, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_ip', doc='IP', multi=False)

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>oui</value> <value>oui</value>
</variable> </variable>
<variable name="adresse_ip_eth0" type="cidr" description="Adresse IP de la carte" mandatory="True" mode="basic"/> <variable name="adresse_ip_eth0" type="cidr" description="Adresse IP de la carte" mandatory="True" mode="basic"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui')
option_4 = IPOption(cidr=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False) option_4 = IPOption(cidr=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False)
option_5 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_in_network, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_ip', doc='IP', multi=False) option_5 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_in_network, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_ip', doc='IP', multi=False)
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>oui</value> <value>oui</value>
</variable> </variable>
<variable name="adresse_ip_eth0" type="local_ip" description="Adresse IP de la carte" mandatory="True" mode="basic"/> <variable name="adresse_ip_eth0" type="local_ip" description="Adresse IP de la carte" mandatory="True" mode="basic"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui')
option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False) option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False)
option_5 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_ipnetmask, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_netmask_eth0', doc='Masque de sous réseau de la carte', multi=False) option_5 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_ipnetmask, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_netmask_eth0', doc='Masque de sous réseau de la carte', multi=False)
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5])

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_6 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(name='leader', doc='leader', multi=True)
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="leader" type="string" description="leader" multi="True"/> <variable name="leader" type="string" description="leader" multi="True"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_5 = StrOption(name='leader', doc='leader', multi=True) option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="leader" type="string" description="leader" multi="True"/> <variable name="leader" type="string" description="leader" multi="True"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_5 = StrOption(name='leader', doc='leader', multi=True) option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general" mode="expert"> <family name="general" mode="expert">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
option_6 = StrOption(name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset({'expert'}), name='follower1', doc='follower1', multi=True) option_7 = StrOption(properties=frozenset({'expert'}), name='follower1', doc='follower1', multi=True)

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general"> <family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="leader" type="string" description="leader" multi="True"/> <variable name="leader" type="string" description="leader" multi="True"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_5 = StrOption(name='leader', doc='leader', multi=True) option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="Général"> <family name="Général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name="leader" type="string" description="leader" multi="True"/> <variable name="leader" type="string" description="leader" multi="True"/>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_5 = StrOption(name='leader', doc='leader', multi=True) option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general" mode="expert"> <family name="general" mode="expert">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower1', doc='follower1', multi=True) option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower1', doc='follower1', multi=True)

View File

@ -2,7 +2,7 @@
<rougail> <rougail>
<variables> <variables>
<family name="general" mode="expert"> <family name="general" mode="expert">
<variable name="mode_conteneur_actif" type="oui/non" description="No change"> <variable name="mode_conteneur_actif" type="string" description="No change">
<value>non</value> <value>non</value>
</variable> </variable>
</family> </family>

View File

@ -8,7 +8,7 @@ try:
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = StrOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non')
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
option_6 = StrOption(properties=frozenset({Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='leader', doc='leader', multi=True)
option_7 = StrOption(properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='follower1', doc='follower1', multi=True) option_7 = StrOption(properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='follower1', doc='follower1', multi=True)

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