Compare commits
3 Commits
pkg/dev/ri
...
master
Author | SHA1 | Date | |
---|---|---|---|
02f9e5091e | |||
5b3d57812e | |||
b55b8f4d9d |
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
rougail (0.1) unstable; urgency=low
|
||||||
|
|
||||||
|
* first version
|
||||||
|
|
||||||
|
-- Cadoles <contact@cadoles.com> Tue, 31 Mar 2020 10:40:42 +0200
|
6
debian/control
vendored
6
debian/control
vendored
@ -2,13 +2,13 @@ Source: rougail
|
|||||||
Section: admin
|
Section: admin
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Cadoles <contact@cadoles.com>
|
Maintainer: Cadoles <contact@cadoles.com>
|
||||||
Build-depends: debhelper (>=11), python3-all, python3-setuptools, dh-python
|
Build-depends: debhelper (>=11), python3-all, python3-setuptools
|
||||||
Standards-Version: 3.9.4
|
Standards-Version: 3.9.4
|
||||||
Homepage: https://forge.cadoles.com/Infra/rougail
|
Homepage: https://forge.cadoles.com/Infra/rougail
|
||||||
|
|
||||||
Package: python3-rougail
|
Package: rougail
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Pre-Depends: dpkg, python3, ${misc:Pre-Depends}
|
Pre-Depends: dpkg, python3, ${misc:Pre-Depends}
|
||||||
Depends: ${python:Depends}, ${misc:Depends}, python3-cheetah, python3-tiramisu3
|
Depends: ${python:Depends}, ${misc:Depends}
|
||||||
Description: configuration manager
|
Description: configuration manager
|
||||||
|
|
||||||
|
@ -159,14 +159,6 @@ Un paramètre de type "variable" peut être "optional" :
|
|||||||
|
|
||||||
Dans ce cas la fonction "return_value" est exécuté sans paramètre.
|
Dans ce cas la fonction "return_value" est exécuté sans paramètre.
|
||||||
|
|
||||||
Paramètre avec variable potentiellement désactivée
|
|
||||||
--------------------------------------------------
|
|
||||||
|
|
||||||
FIXME :
|
|
||||||
|
|
||||||
<!ATTLIST param notraisepropertyerror (True|False) "False">
|
|
||||||
|
|
||||||
Il n'y a pas spécialement de test !
|
|
||||||
|
|
||||||
Les variables suiveuses
|
Les variables suiveuses
|
||||||
-----------------------
|
-----------------------
|
||||||
|
@ -34,38 +34,11 @@ def mode_factory():
|
|||||||
modes = mode_factory()
|
modes = mode_factory()
|
||||||
|
|
||||||
|
|
||||||
CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
|
|
||||||
'float': dict(opttype="FloatOption", func=float),
|
|
||||||
'choice': dict(opttype="ChoiceOption"),
|
|
||||||
'string': dict(opttype="StrOption"),
|
|
||||||
'password': dict(opttype="PasswordOption"),
|
|
||||||
'mail': dict(opttype="EmailOption"),
|
|
||||||
'boolean': dict(opttype="BoolOption"),
|
|
||||||
'symlink': dict(opttype="SymLinkOption"),
|
|
||||||
'filename': dict(opttype="FilenameOption"),
|
|
||||||
'date': dict(opttype="DateOption"),
|
|
||||||
'unix_user': dict(opttype="UsernameOption"),
|
|
||||||
'ip': dict(opttype="IPOption", initkwargs={'allow_reserved': True}),
|
|
||||||
'local_ip': dict(opttype="IPOption", initkwargs={'private_only': True, 'warnings_only': True}),
|
|
||||||
'netmask': dict(opttype="NetmaskOption"),
|
|
||||||
'network': dict(opttype="NetworkOption"),
|
|
||||||
'broadcast': dict(opttype="BroadcastOption"),
|
|
||||||
'netbios': dict(opttype="DomainnameOption", initkwargs={'type': 'netbios', 'warnings_only': True}),
|
|
||||||
'domain': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname', '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}),
|
|
||||||
'mac': dict(opttype="MACOption"),
|
|
||||||
'cidr': dict(opttype="IPOption", initkwargs={'cidr': True}),
|
|
||||||
'network_cidr': dict(opttype="NetworkOption", initkwargs={'cidr': True}),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# a CreoleObjSpace's attribute has some annotations
|
# a CreoleObjSpace's attribute has some annotations
|
||||||
# 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') # , '_real_container')
|
||||||
ERASED_CONTAINER_ATTRIBUTES = ('id', 'container', 'group_id', 'group', 'container_group')
|
ERASED_CONTAINER_ATTRIBUTES = ('id', 'container', 'group_id', 'group', 'container_group')
|
||||||
|
|
||||||
FORCE_CHOICE = {'oui/non': ['oui', 'non'],
|
FORCE_CHOICE = {'oui/non': ['oui', 'non'],
|
||||||
@ -83,6 +56,8 @@ KEY_TYPE = {'variable': 'symlink',
|
|||||||
'URLOption': 'web_address',
|
'URLOption': 'web_address',
|
||||||
'FilenameOption': 'filename'}
|
'FilenameOption': 'filename'}
|
||||||
|
|
||||||
|
CONVERSION = {'number': int}
|
||||||
|
|
||||||
FREEZE_AUTOFREEZE_VARIABLE = 'module_instancie'
|
FREEZE_AUTOFREEZE_VARIABLE = 'module_instancie'
|
||||||
|
|
||||||
PROPERTIES = ('hidden', 'frozen', 'auto_freeze', 'auto_save', 'force_default_on_freeze',
|
PROPERTIES = ('hidden', 'frozen', 'auto_freeze', 'auto_save', 'force_default_on_freeze',
|
||||||
@ -133,7 +108,7 @@ class GroupAnnotator:
|
|||||||
self.manage_follower(namespace,
|
self.manage_follower(namespace,
|
||||||
leader_family_name,
|
leader_family_name,
|
||||||
variable,
|
variable,
|
||||||
leadership_name,
|
leader_name,
|
||||||
follower_names,
|
follower_names,
|
||||||
leader_space,
|
leader_space,
|
||||||
leader_is_hidden,
|
leader_is_hidden,
|
||||||
@ -150,14 +125,9 @@ class GroupAnnotator:
|
|||||||
# if variable.hidden:
|
# if variable.hidden:
|
||||||
# leader_is_hidden = True
|
# leader_is_hidden = True
|
||||||
else:
|
else:
|
||||||
leader_space = self.objectspace.Leadership(variable.xmlfiles)
|
leader_space = self.objectspace.Leadership()
|
||||||
if hasattr(group, 'name'):
|
|
||||||
leadership_name = group.name
|
|
||||||
else:
|
|
||||||
leadership_name = leader_name
|
|
||||||
leader_is_hidden = self.manage_leader(leader_space,
|
leader_is_hidden = self.manage_leader(leader_space,
|
||||||
leader_family_name,
|
leader_family_name,
|
||||||
leadership_name,
|
|
||||||
leader_name,
|
leader_name,
|
||||||
namespace,
|
namespace,
|
||||||
variable,
|
variable,
|
||||||
@ -172,7 +142,6 @@ class GroupAnnotator:
|
|||||||
def manage_leader(self,
|
def manage_leader(self,
|
||||||
leader_space: 'Leadership',
|
leader_space: 'Leadership',
|
||||||
leader_family_name: str,
|
leader_family_name: str,
|
||||||
leadership_name: str,
|
|
||||||
leader_name: str,
|
leader_name: str,
|
||||||
namespace: str,
|
namespace: str,
|
||||||
variable: 'Variable',
|
variable: 'Variable',
|
||||||
@ -183,7 +152,7 @@ class GroupAnnotator:
|
|||||||
if variable.multi is not True:
|
if variable.multi is not True:
|
||||||
raise DictConsistencyError(_('the variable {} in a group must be multi').format(variable.name))
|
raise DictConsistencyError(_('the variable {} in a group must be multi').format(variable.name))
|
||||||
leader_space.variable = []
|
leader_space.variable = []
|
||||||
leader_space.name = leadership_name
|
leader_space.name = leader_name
|
||||||
leader_space.hidden = variable.hidden
|
leader_space.hidden = variable.hidden
|
||||||
if variable.hidden:
|
if variable.hidden:
|
||||||
leader_is_hidden = True
|
leader_is_hidden = True
|
||||||
@ -198,9 +167,9 @@ class GroupAnnotator:
|
|||||||
leader_space.doc = variable.description
|
leader_space.doc = variable.description
|
||||||
else:
|
else:
|
||||||
leader_space.doc = variable.name
|
leader_space.doc = variable.name
|
||||||
leadership_path = namespace + '.' + leader_family_name + '.' + leadership_name
|
leader_path = namespace + '.' + leader_family_name + '.' + leader_name
|
||||||
self.objectspace.paths.add_family(namespace,
|
self.objectspace.paths.add_family(namespace,
|
||||||
leadership_path,
|
leader_path,
|
||||||
leader_space,
|
leader_space,
|
||||||
)
|
)
|
||||||
leader_family = self.objectspace.space.variables[namespace].family[leader_family_name]
|
leader_family = self.objectspace.space.variables[namespace].family[leader_family_name]
|
||||||
@ -264,7 +233,7 @@ class ServiceAnnotator:
|
|||||||
families = {}
|
families = {}
|
||||||
for idx, service_name in enumerate(self.objectspace.space.services.service.keys()):
|
for idx, service_name in enumerate(self.objectspace.space.services.service.keys()):
|
||||||
service = self.objectspace.space.services.service[service_name]
|
service = self.objectspace.space.services.service[service_name]
|
||||||
new_service = self.objectspace.service(service.xmlfiles)
|
new_service = self.objectspace.service()
|
||||||
for elttype, values in vars(service).items():
|
for elttype, values in vars(service).items():
|
||||||
if not isinstance(values, (dict, list)) or elttype in ERASED_ATTRIBUTES:
|
if not isinstance(values, (dict, list)) or elttype in ERASED_ATTRIBUTES:
|
||||||
setattr(new_service, elttype, values)
|
setattr(new_service, elttype, values)
|
||||||
@ -273,7 +242,6 @@ class ServiceAnnotator:
|
|||||||
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,
|
|
||||||
)
|
)
|
||||||
if isinstance(values, dict):
|
if isinstance(values, dict):
|
||||||
values = list(values.values())
|
values = list(values.values())
|
||||||
@ -290,9 +258,8 @@ class ServiceAnnotator:
|
|||||||
def gen_family(self,
|
def gen_family(self,
|
||||||
name,
|
name,
|
||||||
path,
|
path,
|
||||||
xmlfiles
|
|
||||||
):
|
):
|
||||||
family = self.objectspace.family(xmlfiles)
|
family = self.objectspace.family()
|
||||||
family.name = normalize_family(name)
|
family.name = normalize_family(name)
|
||||||
family.doc = name
|
family.doc = name
|
||||||
family.mode = None
|
family.mode = None
|
||||||
@ -340,10 +307,7 @@ class ServiceAnnotator:
|
|||||||
if not self.objectspace.paths.family_is_defined(subpath):
|
if not self.objectspace.paths.family_is_defined(subpath):
|
||||||
break
|
break
|
||||||
idx += 1
|
idx += 1
|
||||||
family = self.gen_family(c_name,
|
family = self.gen_family(c_name, subpath)
|
||||||
subpath,
|
|
||||||
elt.xmlfiles,
|
|
||||||
)
|
|
||||||
family.variable = []
|
family.variable = []
|
||||||
listname = '{}list'.format(name)
|
listname = '{}list'.format(name)
|
||||||
activate_path = '.'.join([subpath, 'activate'])
|
activate_path = '.'.join([subpath, 'activate'])
|
||||||
@ -381,7 +345,7 @@ class ServiceAnnotator:
|
|||||||
elt,
|
elt,
|
||||||
path,
|
path,
|
||||||
):
|
):
|
||||||
variable = self.objectspace.variable(elt.xmlfiles)
|
variable = self.objectspace.variable()
|
||||||
variable.name = normalize_family(key)
|
variable.name = normalize_family(key)
|
||||||
variable.mode = None
|
variable.mode = None
|
||||||
if key == 'name':
|
if key == 'name':
|
||||||
@ -406,7 +370,7 @@ class ServiceAnnotator:
|
|||||||
variable.multi = None
|
variable.multi = None
|
||||||
else:
|
else:
|
||||||
variable.doc = key
|
variable.doc = key
|
||||||
val = self.objectspace.value(elt.xmlfiles)
|
val = self.objectspace.value()
|
||||||
val.type = type_
|
val.type = type_
|
||||||
val.name = value
|
val.name = value
|
||||||
variable.value = [val]
|
variable.value = [val]
|
||||||
@ -490,7 +454,7 @@ class VariableAnnotator:
|
|||||||
for value in variable.value:
|
for value in variable.value:
|
||||||
if not hasattr(value, 'type'):
|
if not hasattr(value, 'type'):
|
||||||
value.type = variable.type
|
value.type = variable.type
|
||||||
value.name = CONVERT_OPTION.get(value.type, {}).get('func', str)(value.name)
|
value.name = CONVERSION.get(value.type, str)(value.name)
|
||||||
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)
|
||||||
@ -505,28 +469,23 @@ class VariableAnnotator:
|
|||||||
path,
|
path,
|
||||||
):
|
):
|
||||||
if variable.type in FORCE_CHOICE:
|
if variable.type in FORCE_CHOICE:
|
||||||
check = self.objectspace.check(variable.xmlfiles)
|
check = self.objectspace.check()
|
||||||
check.name = 'valid_enum'
|
check.name = 'valid_enum'
|
||||||
check.target = path
|
check.target = 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()
|
||||||
param.text = value
|
param.text = value
|
||||||
check.param.append(param)
|
check.param.append(param)
|
||||||
if not hasattr(self.objectspace.space, 'constraints'):
|
if not hasattr(self.objectspace.space, 'constraints'):
|
||||||
self.objectspace.space.constraints = self.objectspace.constraints(variable.xmlfiles)
|
self.objectspace.space.constraints = self.objectspace.constraints()
|
||||||
self.objectspace.space.constraints.namespace = namespace
|
self.objectspace.space.constraints.namespace = namespace
|
||||||
if not hasattr(self.objectspace.space.constraints, 'check'):
|
if not hasattr(self.objectspace.space.constraints, 'check'):
|
||||||
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):
|
|
||||||
if variable.type not in CONVERT_OPTION:
|
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(variable.xmlfiles)
|
|
||||||
raise DictConsistencyError(_(f'unvalid type "{variable.type}" for variable "{variable.name}" in {xmlfiles}'))
|
|
||||||
|
|
||||||
if not hasattr(self.objectspace.space, 'variables'):
|
if not hasattr(self.objectspace.space, 'variables'):
|
||||||
return
|
return
|
||||||
for families in self.objectspace.space.variables.values():
|
for families in self.objectspace.space.variables.values():
|
||||||
@ -556,7 +515,6 @@ class VariableAnnotator:
|
|||||||
follower,
|
follower,
|
||||||
path,
|
path,
|
||||||
)
|
)
|
||||||
_valid_type(follower)
|
|
||||||
else:
|
else:
|
||||||
path = '{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name)
|
path = '{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name)
|
||||||
_convert_variable(variable,
|
_convert_variable(variable,
|
||||||
@ -566,7 +524,6 @@ class VariableAnnotator:
|
|||||||
variable,
|
variable,
|
||||||
path,
|
path,
|
||||||
)
|
)
|
||||||
_valid_type(variable)
|
|
||||||
|
|
||||||
def convert_helps(self):
|
def convert_helps(self):
|
||||||
if not hasattr(self.objectspace.space, 'help'):
|
if not hasattr(self.objectspace.space, 'help'):
|
||||||
@ -585,14 +542,14 @@ class VariableAnnotator:
|
|||||||
def convert_auto_freeze(self): # pylint: disable=C0111
|
def convert_auto_freeze(self): # pylint: disable=C0111
|
||||||
def _convert_auto_freeze(variable, namespace):
|
def _convert_auto_freeze(variable, namespace):
|
||||||
if variable.auto_freeze:
|
if variable.auto_freeze:
|
||||||
new_condition = self.objectspace.condition(variable.xmlfiles)
|
new_condition = self.objectspace.condition()
|
||||||
new_condition.name = 'auto_hidden_if_not_in'
|
new_condition.name = 'auto_hidden_if_not_in'
|
||||||
new_condition.namespace = namespace
|
new_condition.namespace = 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()
|
||||||
new_param.text = 'oui'
|
new_param.text = 'oui'
|
||||||
new_condition.param = [new_param]
|
new_condition.param = [new_param]
|
||||||
new_target = self.objectspace.target(variable.xmlfiles)
|
new_target = self.objectspace.target()
|
||||||
new_target.type = 'variable'
|
new_target.type = 'variable'
|
||||||
path = variable.namespace + '.' + normalize_family(family.name) + '.' + variable.name
|
path = variable.namespace + '.' + normalize_family(family.name) + '.' + variable.name
|
||||||
new_target.name = path
|
new_target.name = path
|
||||||
@ -626,8 +583,7 @@ class VariableAnnotator:
|
|||||||
subpath = self.objectspace.paths.get_variable_path(separator.name,
|
subpath = self.objectspace.paths.get_variable_path(separator.name,
|
||||||
separator.namespace,
|
separator.namespace,
|
||||||
)
|
)
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(separator.xmlfiles)
|
raise DictConsistencyError(_('{} already has a separator').format(subpath))
|
||||||
raise DictConsistencyError(_(f'{subpath} already has a separator in {xmlfiles}'))
|
|
||||||
option.separator = separator.text
|
option.separator = separator.text
|
||||||
del family.separators
|
del family.separators
|
||||||
|
|
||||||
@ -640,9 +596,7 @@ class ConstraintAnnotator:
|
|||||||
if not hasattr(objectspace.space, 'constraints'):
|
if not hasattr(objectspace.space, 'constraints'):
|
||||||
return
|
return
|
||||||
self.objectspace = objectspace
|
self.objectspace = objectspace
|
||||||
eosfunc = imp.load_source('eosfunc', eosfunc_file)
|
self.eosfunc = imp.load_source('eosfunc', eosfunc_file)
|
||||||
self.functions = dir(eosfunc)
|
|
||||||
self.functions.extend(INTERNAL_FUNCTIONS)
|
|
||||||
self.valid_enums = {}
|
self.valid_enums = {}
|
||||||
if hasattr(self.objectspace.space.constraints, 'check'):
|
if hasattr(self.objectspace.space.constraints, 'check'):
|
||||||
self.check_check()
|
self.check_check()
|
||||||
@ -664,10 +618,11 @@ class ConstraintAnnotator:
|
|||||||
|
|
||||||
def check_check(self):
|
def check_check(self):
|
||||||
remove_indexes = []
|
remove_indexes = []
|
||||||
|
functions = dir(self.eosfunc)
|
||||||
|
functions.extend(INTERNAL_FUNCTIONS)
|
||||||
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
|
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
|
||||||
if not check.name in self.functions:
|
if not check.name in functions:
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(check.xmlfiles)
|
raise DictConsistencyError(_('cannot find check function {}').format(check.name))
|
||||||
raise DictConsistencyError(_(f'cannot find check function "{check.name}" in {xmlfiles}'))
|
|
||||||
if hasattr(check, 'param'):
|
if hasattr(check, 'param'):
|
||||||
param_option_indexes = []
|
param_option_indexes = []
|
||||||
for idx, param in enumerate(check.param):
|
for idx, param in enumerate(check.param):
|
||||||
@ -675,8 +630,7 @@ class ConstraintAnnotator:
|
|||||||
if param.optional is True:
|
if param.optional is True:
|
||||||
param_option_indexes.append(idx)
|
param_option_indexes.append(idx)
|
||||||
else:
|
else:
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(check.xmlfiles)
|
raise DictConsistencyError(_(f'unknown param {param.text} in check'))
|
||||||
raise DictConsistencyError(_(f'cannot find check param "{param.text}" in {xmlfiles}'))
|
|
||||||
if param.type != 'variable':
|
if param.type != 'variable':
|
||||||
param.notraisepropertyerror = None
|
param.notraisepropertyerror = None
|
||||||
param_option_indexes = list(set(param_option_indexes))
|
param_option_indexes = list(set(param_option_indexes))
|
||||||
@ -812,7 +766,7 @@ class ConstraintAnnotator:
|
|||||||
for listvar in listvars:
|
for listvar in listvars:
|
||||||
variable = self.objectspace.paths.get_variable_obj(listvar)
|
variable = self.objectspace.paths.get_variable_obj(listvar)
|
||||||
type_ = 'variable'
|
type_ = 'variable'
|
||||||
new_target = self.objectspace.target(variable.xmlfiles)
|
new_target = self.objectspace.target()
|
||||||
new_target.type = type_
|
new_target.type = type_
|
||||||
new_target.name = listvar
|
new_target.name = listvar
|
||||||
new_target.index = target.index
|
new_target.index = target.index
|
||||||
@ -937,7 +891,7 @@ class ConstraintAnnotator:
|
|||||||
if hasattr(leader_or_variable, actions[0]) and getattr(leader_or_variable, actions[0]) is True:
|
if hasattr(leader_or_variable, actions[0]) and getattr(leader_or_variable, actions[0]) is True:
|
||||||
continue
|
continue
|
||||||
for idx, action in enumerate(actions):
|
for idx, action in enumerate(actions):
|
||||||
prop = self.objectspace.property_(leader_or_variable.xmlfiles)
|
prop = self.objectspace.property_()
|
||||||
prop.type = 'calculation'
|
prop.type = 'calculation'
|
||||||
prop.inverse = inverse
|
prop.inverse = inverse
|
||||||
prop.source = condition.source
|
prop.source = condition.source
|
||||||
@ -970,10 +924,10 @@ class ConstraintAnnotator:
|
|||||||
}
|
}
|
||||||
choices = []
|
choices = []
|
||||||
for value in values:
|
for value in values:
|
||||||
choice = self.objectspace.choice(variable.xmlfiles)
|
choice = self.objectspace.choice()
|
||||||
try:
|
try:
|
||||||
if value is not None:
|
if value is not None:
|
||||||
choice.name = CONVERT_OPTION[type_].get('func', str)(value)
|
choice.name = CONVERSION.get(type_, str)(value)
|
||||||
else:
|
else:
|
||||||
choice.name = value
|
choice.name = value
|
||||||
except:
|
except:
|
||||||
@ -988,13 +942,13 @@ class ConstraintAnnotator:
|
|||||||
for value in variable.value:
|
for value in variable.value:
|
||||||
value.type = type_
|
value.type = type_
|
||||||
try:
|
try:
|
||||||
cvalue = CONVERT_OPTION[type_].get('func', str)(value.name)
|
cvalue = CONVERSION.get(type_, str)(value.name)
|
||||||
except:
|
except:
|
||||||
raise DictConsistencyError(_(f'unable to change type of value "{value}" is not a valid "{type_}" for "{variable.name}"'))
|
raise DictConsistencyError(_(f'unable to change type of value "{value}" is not a valid "{type_}" for "{variable.name}"'))
|
||||||
if cvalue not in choices:
|
if cvalue not in choices:
|
||||||
raise DictConsistencyError(_('value "{}" of variable "{}" is not in list of all expected values ({})').format(value.name, variable.name, choices))
|
raise DictConsistencyError(_('value "{}" of variable "{}" is not in list of all expected values ({})').format(value.name, variable.name, choices))
|
||||||
else:
|
else:
|
||||||
new_value = self.objectspace.value(variable.xmlfiles)
|
new_value = self.objectspace.value()
|
||||||
new_value.name = choices[0]
|
new_value.name = choices[0]
|
||||||
new_value.type = type_
|
new_value.type = type_
|
||||||
variable.value = [new_value]
|
variable.value = [new_value]
|
||||||
@ -1019,30 +973,26 @@ class ConstraintAnnotator:
|
|||||||
else:
|
else:
|
||||||
raise DictConsistencyError(_(f'unknown parameter {param.text} in check "valid_entier" for variable {check.target}'))
|
raise DictConsistencyError(_(f'unknown parameter {param.text} in check "valid_entier" for variable {check.target}'))
|
||||||
else:
|
else:
|
||||||
check_ = self.objectspace.check(variable.xmlfiles)
|
check_ = self.objectspace.check()
|
||||||
if name == 'valid_differ':
|
if name == 'valid_differ':
|
||||||
name = 'valid_not_equal'
|
name = 'valid_not_equal'
|
||||||
elif name == 'valid_network_netmask':
|
elif name == 'valid_network_netmask':
|
||||||
params_len = 1
|
params_len = 1
|
||||||
if len(check.param) != params_len:
|
if len(check.param) != params_len:
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(check.xmlfiles)
|
raise DictConsistencyError(_('{} must have {} param').format(name, params_len))
|
||||||
raise DictConsistencyError(_(f'{name} must have {params_len} param in {xmlfiles}'))
|
|
||||||
elif name == 'valid_ipnetmask':
|
elif name == 'valid_ipnetmask':
|
||||||
params_len = 1
|
params_len = 1
|
||||||
if len(check.param) != params_len:
|
if len(check.param) != params_len:
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(check.xmlfiles)
|
raise DictConsistencyError(_('{} must have {} param').format(name, params_len))
|
||||||
raise DictConsistencyError(_(f'{name} must have {params_len} param in {xmlfiles}'))
|
|
||||||
name = 'valid_ip_netmask'
|
name = 'valid_ip_netmask'
|
||||||
elif name == 'valid_broadcast':
|
elif name == 'valid_broadcast':
|
||||||
params_len = 2
|
params_len = 2
|
||||||
if len(check.param) != params_len:
|
if len(check.param) != params_len:
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(check.xmlfiles)
|
raise DictConsistencyError(_('{} must have {} param').format(name, params_len))
|
||||||
raise DictConsistencyError(_(f'{name} must have {params_len} param in {xmlfiles}'))
|
|
||||||
elif name == 'valid_in_network':
|
elif name == 'valid_in_network':
|
||||||
if len(check.param) not in (1, 2):
|
|
||||||
params_len = 2
|
params_len = 2
|
||||||
xmlfiles = self.objectspace.display_xmlfiles(check.xmlfiles)
|
if len(check.param) != params_len:
|
||||||
raise DictConsistencyError(_(f'{name} must have {params_len} param in {xmlfiles}'))
|
raise DictConsistencyError(_('{} must have {} param').format(name, params_len))
|
||||||
check_.name = name
|
check_.name = name
|
||||||
check_.warnings_only = check.warnings_only
|
check_.warnings_only = check.warnings_only
|
||||||
if hasattr(check, 'param'):
|
if hasattr(check, 'param'):
|
||||||
@ -1058,6 +1008,7 @@ class ConstraintAnnotator:
|
|||||||
indexes = list(fills.keys())
|
indexes = list(fills.keys())
|
||||||
indexes.sort()
|
indexes.sort()
|
||||||
targets = []
|
targets = []
|
||||||
|
eosfunc = dir(self.eosfunc)
|
||||||
for idx in indexes:
|
for idx in indexes:
|
||||||
fill = fills[idx]
|
fill = fills[idx]
|
||||||
# test if it's redefined calculation
|
# test if it's redefined calculation
|
||||||
@ -1065,7 +1016,7 @@ class ConstraintAnnotator:
|
|||||||
raise DictConsistencyError(_(f"A fill already exists for the target: {fill.target}"))
|
raise DictConsistencyError(_(f"A fill already exists for the target: {fill.target}"))
|
||||||
targets.append(fill.target)
|
targets.append(fill.target)
|
||||||
#
|
#
|
||||||
if fill.name not in self.functions:
|
if fill.name not in eosfunc:
|
||||||
raise DictConsistencyError(_('cannot find fill function {}').format(fill.name))
|
raise DictConsistencyError(_('cannot find fill function {}').format(fill.name))
|
||||||
|
|
||||||
namespace = fill.namespace
|
namespace = fill.namespace
|
||||||
@ -1076,8 +1027,7 @@ class ConstraintAnnotator:
|
|||||||
)
|
)
|
||||||
if suffix is not None:
|
if suffix is not None:
|
||||||
raise DictConsistencyError(_(f'Cannot add fill function to "{fill.target}" only with the suffix "{suffix}"'))
|
raise DictConsistencyError(_(f'Cannot add fill function to "{fill.target}" only with the suffix "{suffix}"'))
|
||||||
variable = self.objectspace.paths.get_variable_obj(fill.target)
|
value = self.objectspace.value()
|
||||||
value = self.objectspace.value(variable.xmlfiles)
|
|
||||||
value.type = 'calculation'
|
value.type = 'calculation'
|
||||||
value.name = fill.name
|
value.name = fill.name
|
||||||
if hasattr(fill, 'param'):
|
if hasattr(fill, 'param'):
|
||||||
@ -1087,9 +1037,6 @@ class ConstraintAnnotator:
|
|||||||
raise DictConsistencyError(_(f"All '{param.type}' variables must have a value in order to calculate {fill.target}"))
|
raise DictConsistencyError(_(f"All '{param.type}' variables must have a value in order to calculate {fill.target}"))
|
||||||
if param.type == 'suffix' and hasattr(param, 'text'):
|
if param.type == 'suffix' and hasattr(param, 'text'):
|
||||||
raise DictConsistencyError(_(f"All '{param.type}' variables must not have a value in order to calculate {fill.target}"))
|
raise DictConsistencyError(_(f"All '{param.type}' variables must not have a value in order to calculate {fill.target}"))
|
||||||
if param.type == 'string':
|
|
||||||
if not hasattr(param, 'text'):
|
|
||||||
param.text = None
|
|
||||||
if param.type == 'variable':
|
if param.type == 'variable':
|
||||||
try:
|
try:
|
||||||
param.text, suffix = self.objectspace.paths.get_variable_path(param.text,
|
param.text, suffix = self.objectspace.paths.get_variable_path(param.text,
|
||||||
@ -1109,6 +1056,7 @@ class ConstraintAnnotator:
|
|||||||
for param_idx in param_to_delete:
|
for param_idx in param_to_delete:
|
||||||
fill.param.pop(param_idx)
|
fill.param.pop(param_idx)
|
||||||
value.param = fill.param
|
value.param = fill.param
|
||||||
|
variable = self.objectspace.paths.get_variable_obj(fill.target)
|
||||||
variable.value = [value]
|
variable.value = [value]
|
||||||
del self.objectspace.space.constraints.fill
|
del self.objectspace.space.constraints.fill
|
||||||
|
|
||||||
@ -1116,7 +1064,6 @@ class ConstraintAnnotator:
|
|||||||
if hasattr(self.objectspace.space.constraints, 'index'):
|
if hasattr(self.objectspace.space.constraints, 'index'):
|
||||||
del self.objectspace.space.constraints.index
|
del self.objectspace.space.constraints.index
|
||||||
del self.objectspace.space.constraints.namespace
|
del self.objectspace.space.constraints.namespace
|
||||||
del self.objectspace.space.constraints.xmlfiles
|
|
||||||
if vars(self.objectspace.space.constraints):
|
if vars(self.objectspace.space.constraints):
|
||||||
raise Exception('constraints again?')
|
raise Exception('constraints again?')
|
||||||
del self.objectspace.space.constraints
|
del self.objectspace.space.constraints
|
||||||
@ -1177,7 +1124,7 @@ class FamilyAnnotator:
|
|||||||
# 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'
|
||||||
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()
|
||||||
new_value.name = True
|
new_value.name = True
|
||||||
new_value.type = 'boolean'
|
new_value.type = 'boolean'
|
||||||
variable.value = [new_value]
|
variable.value = [new_value]
|
||||||
|
@ -3,20 +3,17 @@
|
|||||||
fichier de configuration pour rougail
|
fichier de configuration pour rougail
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from os.path import join, abspath, dirname
|
from os.path import join, isfile, abspath, dirname
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
rougailroot = '/var/rougail'
|
rougailroot = '/var/rougail'
|
||||||
|
patch_dir = join(rougailroot, 'patches')
|
||||||
|
manifests_dir = join(rougailroot, 'manifests')
|
||||||
|
templates_dir = join(rougailroot, 'templates')
|
||||||
dtddir = join(dirname(abspath(__file__)), 'data')
|
dtddir = join(dirname(abspath(__file__)), 'data')
|
||||||
|
dtdfilename = join(dtddir, 'rougail.dtd')
|
||||||
|
|
||||||
|
|
||||||
Config = {'rougailroot': rougailroot,
|
|
||||||
'patch_dir': join(rougailroot, 'patches'),
|
|
||||||
'manifests_dir': join(rougailroot, 'manifests'),
|
|
||||||
'templates_dir': join(rougailroot, 'templates'),
|
|
||||||
'dtdfilename': join(dtddir, 'rougail.dtd'),
|
|
||||||
'dtddir': dtddir,
|
|
||||||
# chemin du répertoire source des fichiers templates
|
# chemin du répertoire source des fichiers templates
|
||||||
'patch_dir': '/srv/rougail/patch',
|
patch_dir = '/srv/rougail/patch'
|
||||||
'variable_namespace': 'rougail',
|
|
||||||
}
|
variable_namespace = 'rougail'
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<!ELEMENT services (service*)>
|
<!ELEMENT services (service*)>
|
||||||
|
|
||||||
<!ELEMENT service ((port* | tcpwrapper* | ip* | interface* | package* | file* | override*)*) >
|
<!ELEMENT service ((port* | tcpwrapper* | ip* | interface* | package* | file* | digitalcertificate* | override*)*) >
|
||||||
<!ATTLIST service name CDATA #REQUIRED>
|
<!ATTLIST service name CDATA #REQUIRED>
|
||||||
<!ATTLIST service manage (True|False) "True">
|
<!ATTLIST service manage (True|False) "True">
|
||||||
|
|
||||||
@ -75,6 +75,14 @@
|
|||||||
<!ATTLIST file redefine (True|False) "False">
|
<!ATTLIST file redefine (True|False) "False">
|
||||||
<!ATTLIST file templating (True|False) "True">
|
<!ATTLIST file templating (True|False) "True">
|
||||||
|
|
||||||
|
<!ELEMENT digitalcertificate EMPTY>
|
||||||
|
<!ATTLIST digitalcertificate name CDATA #REQUIRED >
|
||||||
|
<!ATTLIST digitalcertificate digitalcertificate_type (variable) "variable">
|
||||||
|
<!ATTLIST digitalcertificate certificate CDATA #REQUIRED >
|
||||||
|
<!ATTLIST digitalcertificate certificate_type (variable) "variable">
|
||||||
|
<!ATTLIST digitalcertificate type CDATA #REQUIRED >
|
||||||
|
<!ATTLIST digitalcertificate ca CDATA #REQUIRED >
|
||||||
|
|
||||||
<!ELEMENT override EMPTY>
|
<!ELEMENT override EMPTY>
|
||||||
<!ATTLIST override source CDATA #IMPLIED >
|
<!ATTLIST override source CDATA #IMPLIED >
|
||||||
<!ATTLIST override templating (True|False) "True">
|
<!ATTLIST override templating (True|False) "True">
|
||||||
@ -102,7 +110,6 @@
|
|||||||
<!ATTLIST variable mode (basic|normal|expert) "normal">
|
<!ATTLIST variable mode (basic|normal|expert) "normal">
|
||||||
<!ATTLIST variable remove_check (True|False) "False">
|
<!ATTLIST variable remove_check (True|False) "False">
|
||||||
<!ATTLIST variable remove_condition (True|False) "False">
|
<!ATTLIST variable remove_condition (True|False) "False">
|
||||||
<!ATTLIST variable remove_fill (True|False) "False">
|
|
||||||
<!ATTLIST variable test CDATA #IMPLIED>
|
<!ATTLIST variable test CDATA #IMPLIED>
|
||||||
|
|
||||||
<!ELEMENT separators (separator*)>
|
<!ELEMENT separators (separator*)>
|
||||||
@ -131,7 +138,6 @@
|
|||||||
|
|
||||||
<!ELEMENT group (follower+)>
|
<!ELEMENT group (follower+)>
|
||||||
<!ATTLIST group leader CDATA #REQUIRED>
|
<!ATTLIST group leader CDATA #REQUIRED>
|
||||||
<!ATTLIST group name CDATA #IMPLIED>
|
|
||||||
<!ATTLIST group description CDATA #IMPLIED>
|
<!ATTLIST group description CDATA #IMPLIED>
|
||||||
|
|
||||||
<!ELEMENT param (#PCDATA)>
|
<!ELEMENT param (#PCDATA)>
|
||||||
|
@ -32,7 +32,7 @@ from .tiramisureflector import TiramisuReflector
|
|||||||
from .utils import normalize_family
|
from .utils import normalize_family
|
||||||
from .error import OperationError, SpaceObjShallNotBeUpdated, DictConsistencyError
|
from .error import OperationError, SpaceObjShallNotBeUpdated, DictConsistencyError
|
||||||
from .path import Path
|
from .path import Path
|
||||||
from .config import Config
|
from .config import variable_namespace
|
||||||
|
|
||||||
# CreoleObjSpace's elements like 'family' or 'follower', that shall be forced to the Redefinable type
|
# CreoleObjSpace's elements like 'family' or 'follower', that shall be forced to the Redefinable type
|
||||||
FORCE_REDEFINABLES = ('family', 'follower', 'service', 'disknod', 'variables')
|
FORCE_REDEFINABLES = ('family', 'follower', 'service', 'disknod', 'variables')
|
||||||
@ -59,10 +59,7 @@ CONVERT_EXPORT = {'Leadership': 'leader',
|
|||||||
# _____________________________________________________________________________
|
# _____________________________________________________________________________
|
||||||
# special types definitions for the Object Space's internal representation
|
# special types definitions for the Object Space's internal representation
|
||||||
class RootCreoleObject:
|
class RootCreoleObject:
|
||||||
def __init__(self, xmlfiles):
|
""
|
||||||
if not isinstance(xmlfiles, list):
|
|
||||||
xmlfiles = [xmlfiles]
|
|
||||||
self.xmlfiles = xmlfiles
|
|
||||||
|
|
||||||
|
|
||||||
class CreoleObjSpace:
|
class CreoleObjSpace:
|
||||||
@ -95,7 +92,6 @@ class CreoleObjSpace:
|
|||||||
self.xmlreflector = XMLReflector()
|
self.xmlreflector = XMLReflector()
|
||||||
self.xmlreflector.parse_dtd(dtdfilename)
|
self.xmlreflector.parse_dtd(dtdfilename)
|
||||||
self.redefine_variables = None
|
self.redefine_variables = None
|
||||||
self.fill_removed = None
|
|
||||||
self.check_removed = None
|
self.check_removed = None
|
||||||
self.condition_removed = None
|
self.condition_removed = None
|
||||||
|
|
||||||
@ -157,17 +153,14 @@ class CreoleObjSpace:
|
|||||||
"""
|
"""
|
||||||
for xmlfile, document in self.xmlreflector.load_xml_from_folders(xmlfolders):
|
for xmlfile, document in self.xmlreflector.load_xml_from_folders(xmlfolders):
|
||||||
self.redefine_variables = []
|
self.redefine_variables = []
|
||||||
self.fill_removed = []
|
|
||||||
self.check_removed = []
|
self.check_removed = []
|
||||||
self.condition_removed = []
|
self.condition_removed = []
|
||||||
self.xml_parse_document(xmlfile,
|
self.xml_parse_document(document,
|
||||||
document,
|
|
||||||
self.space,
|
self.space,
|
||||||
namespace,
|
namespace,
|
||||||
)
|
)
|
||||||
|
|
||||||
def xml_parse_document(self,
|
def xml_parse_document(self,
|
||||||
xmlfile,
|
|
||||||
document,
|
document,
|
||||||
space,
|
space,
|
||||||
namespace,
|
namespace,
|
||||||
@ -184,7 +177,7 @@ class CreoleObjSpace:
|
|||||||
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}"'))
|
raise DictConsistencyError(_('Family {} is set several times').format(child.attrib['name']))
|
||||||
family_names.append(child.attrib['name'])
|
family_names.append(child.attrib['name'])
|
||||||
if child.tag == 'variables':
|
if child.tag == 'variables':
|
||||||
child.attrib['name'] = namespace
|
child.attrib['name'] = namespace
|
||||||
@ -193,8 +186,7 @@ class CreoleObjSpace:
|
|||||||
continue
|
continue
|
||||||
# variable objects creation
|
# variable objects creation
|
||||||
try:
|
try:
|
||||||
variableobj = self.generate_variableobj(xmlfile,
|
variableobj = self.generate_variableobj(child,
|
||||||
child,
|
|
||||||
space,
|
space,
|
||||||
namespace,
|
namespace,
|
||||||
)
|
)
|
||||||
@ -203,8 +195,7 @@ class CreoleObjSpace:
|
|||||||
self.set_text_to_obj(child,
|
self.set_text_to_obj(child,
|
||||||
variableobj,
|
variableobj,
|
||||||
)
|
)
|
||||||
self.set_xml_attributes_to_obj(xmlfile,
|
self.set_xml_attributes_to_obj(child,
|
||||||
child,
|
|
||||||
variableobj,
|
variableobj,
|
||||||
)
|
)
|
||||||
self.variableobj_tree_visitor(child,
|
self.variableobj_tree_visitor(child,
|
||||||
@ -222,14 +213,12 @@ class CreoleObjSpace:
|
|||||||
child,
|
child,
|
||||||
)
|
)
|
||||||
if list(child) != []:
|
if list(child) != []:
|
||||||
self.xml_parse_document(xmlfile,
|
self.xml_parse_document(child,
|
||||||
child,
|
|
||||||
variableobj,
|
variableobj,
|
||||||
namespace,
|
namespace,
|
||||||
)
|
)
|
||||||
|
|
||||||
def generate_variableobj(self,
|
def generate_variableobj(self,
|
||||||
xmlfile,
|
|
||||||
child,
|
child,
|
||||||
space,
|
space,
|
||||||
namespace,
|
namespace,
|
||||||
@ -237,10 +226,9 @@ class CreoleObjSpace:
|
|||||||
"""
|
"""
|
||||||
instanciates or creates Creole Object Subspace objects
|
instanciates or creates Creole Object Subspace objects
|
||||||
"""
|
"""
|
||||||
variableobj = getattr(self, child.tag)(xmlfile)
|
variableobj = getattr(self, child.tag)()
|
||||||
if isinstance(variableobj, self.Redefinable):
|
if isinstance(variableobj, self.Redefinable):
|
||||||
variableobj = self.create_or_update_redefinable_object(xmlfile,
|
variableobj = self.create_or_update_redefinable_object(child.attrib,
|
||||||
child.attrib,
|
|
||||||
space,
|
space,
|
||||||
child,
|
child,
|
||||||
namespace,
|
namespace,
|
||||||
@ -258,7 +246,6 @@ class CreoleObjSpace:
|
|||||||
return variableobj
|
return variableobj
|
||||||
|
|
||||||
def create_or_update_redefinable_object(self,
|
def create_or_update_redefinable_object(self,
|
||||||
xmlfile,
|
|
||||||
subspace,
|
subspace,
|
||||||
space,
|
space,
|
||||||
child,
|
child,
|
||||||
@ -292,17 +279,15 @@ class CreoleObjSpace:
|
|||||||
name = child.text
|
name = child.text
|
||||||
else:
|
else:
|
||||||
name = subspace['name']
|
name = subspace['name']
|
||||||
existed_var = self.is_already_exists(name,
|
if self.is_already_exists(name,
|
||||||
space,
|
space,
|
||||||
child,
|
child,
|
||||||
namespace,
|
namespace,
|
||||||
)
|
):
|
||||||
if existed_var:
|
|
||||||
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))
|
||||||
exists = self.convert_boolean(subspace.get('exists', True))
|
exists = self.convert_boolean(subspace.get('exists', True))
|
||||||
if redefine is True:
|
if redefine is True:
|
||||||
existed_var.xmlfiles.append(xmlfile)
|
|
||||||
return self.translate_in_space(name,
|
return self.translate_in_space(name,
|
||||||
space,
|
space,
|
||||||
child,
|
child,
|
||||||
@ -310,21 +295,12 @@ class CreoleObjSpace:
|
|||||||
)
|
)
|
||||||
elif exists is False:
|
elif exists is False:
|
||||||
raise SpaceObjShallNotBeUpdated()
|
raise SpaceObjShallNotBeUpdated()
|
||||||
xmlfiles = self.display_xmlfiles(existed_var.xmlfiles)
|
raise DictConsistencyError(_(f'Already present in another XML file, {name} cannot be re-created'))
|
||||||
raise DictConsistencyError(_(f'"{child.tag}" named "{name}" cannot be re-created in "{xmlfile}", already defined in {xmlfiles}'))
|
|
||||||
redefine = self.convert_boolean(subspace.get('redefine', False))
|
redefine = self.convert_boolean(subspace.get('redefine', False))
|
||||||
exists = self.convert_boolean(subspace.get('exists', False))
|
exists = self.convert_boolean(subspace.get('exists', False))
|
||||||
if redefine is False or exists is True:
|
if redefine is False or exists is True:
|
||||||
return getattr(self, child.tag)(xmlfile)
|
return getattr(self, child.tag)()
|
||||||
raise DictConsistencyError(_(f'Redefined object in "{xmlfile}": "{name}" does not exist yet'))
|
raise DictConsistencyError(_(f'Redefined object: {name} does not exist yet'))
|
||||||
|
|
||||||
def display_xmlfiles(self,
|
|
||||||
xmlfiles: list,
|
|
||||||
) -> str:
|
|
||||||
if len(xmlfiles) == 1:
|
|
||||||
return '"' + xmlfiles[0] + '"'
|
|
||||||
else:
|
|
||||||
return '"' + '", "'.join(xmlfiles[:-1]) + '"' + ' and ' + '"' + xmlfiles[-1] + '"'
|
|
||||||
|
|
||||||
def create_tree_structure(self,
|
def create_tree_structure(self,
|
||||||
space,
|
space,
|
||||||
@ -351,25 +327,16 @@ class CreoleObjSpace:
|
|||||||
raise OperationError(_("Creole object {} "
|
raise OperationError(_("Creole object {} "
|
||||||
"has a wrong type").format(type(variableobj)))
|
"has a wrong type").format(type(variableobj)))
|
||||||
|
|
||||||
def is_already_exists(self,
|
def is_already_exists(self, name, space, child, namespace):
|
||||||
name: str,
|
|
||||||
space: str,
|
|
||||||
child,
|
|
||||||
namespace: str,
|
|
||||||
):
|
|
||||||
if isinstance(space, self.family): # pylint: disable=E1101
|
if isinstance(space, self.family): # pylint: disable=E1101
|
||||||
if namespace != Config['variable_namespace']:
|
if namespace != variable_namespace:
|
||||||
name = space.path + '.' + name
|
name = space.path + '.' + name
|
||||||
if self.paths.path_is_defined(name):
|
return self.paths.path_is_defined(name)
|
||||||
return self.paths.get_variable_obj(name)
|
|
||||||
return
|
|
||||||
if child.tag == 'family':
|
if child.tag == 'family':
|
||||||
norm_name = normalize_family(name)
|
norm_name = normalize_family(name)
|
||||||
else:
|
else:
|
||||||
norm_name = name
|
norm_name = name
|
||||||
children = getattr(space, child.tag, {})
|
return norm_name in getattr(space, child.tag, {})
|
||||||
if norm_name in children:
|
|
||||||
return children[norm_name]
|
|
||||||
|
|
||||||
def convert_boolean(self, value): # pylint: disable=R0201
|
def convert_boolean(self, value): # pylint: disable=R0201
|
||||||
"""Boolean coercion. The Creole XML may contain srings like `True` or `False`
|
"""Boolean coercion. The Creole XML may contain srings like `True` or `False`
|
||||||
@ -395,14 +362,14 @@ class CreoleObjSpace:
|
|||||||
else:
|
else:
|
||||||
norm_name = name
|
norm_name = name
|
||||||
return getattr(family, variable.tag)[norm_name]
|
return getattr(family, variable.tag)[norm_name]
|
||||||
if namespace == Config['variable_namespace']:
|
if namespace == variable_namespace:
|
||||||
path = name
|
path = name
|
||||||
else:
|
else:
|
||||||
path = family.path + '.' + name
|
path = family.path + '.' + name
|
||||||
old_family_name = self.paths.get_variable_family_name(path)
|
old_family_name = self.paths.get_variable_family_name(path)
|
||||||
if normalize_family(family.name) == old_family_name:
|
if normalize_family(family.name) == old_family_name:
|
||||||
return getattr(family, variable.tag)[name]
|
return getattr(family, variable.tag)[name]
|
||||||
old_family = self.space.variables[Config['variable_namespace']].family[old_family_name] # pylint: disable=E1101
|
old_family = self.space.variables[variable_namespace].family[old_family_name] # pylint: disable=E1101
|
||||||
variable_obj = old_family.variable[name]
|
variable_obj = old_family.variable[name]
|
||||||
del old_family.variable[name]
|
del old_family.variable[name]
|
||||||
if 'variable' not in vars(family):
|
if 'variable' not in vars(family):
|
||||||
@ -416,18 +383,6 @@ class CreoleObjSpace:
|
|||||||
)
|
)
|
||||||
return variable_obj
|
return variable_obj
|
||||||
|
|
||||||
def remove_fill(self, name): # pylint: disable=C0111
|
|
||||||
if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'fill'):
|
|
||||||
remove_fills= []
|
|
||||||
for idx, fill in enumerate(self.space.constraints.fill): # pylint: disable=E1101
|
|
||||||
if hasattr(fill, 'target') and fill.target == name:
|
|
||||||
remove_fills.append(idx)
|
|
||||||
|
|
||||||
remove_fills = list(set(remove_fills))
|
|
||||||
remove_fills.sort(reverse=True)
|
|
||||||
for idx in remove_fills:
|
|
||||||
self.space.constraints.fill.pop(idx) # pylint: disable=E1101
|
|
||||||
|
|
||||||
def remove_check(self, name): # pylint: disable=C0111
|
def remove_check(self, name): # pylint: disable=C0111
|
||||||
if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'check'):
|
if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'check'):
|
||||||
remove_checks = []
|
remove_checks = []
|
||||||
@ -482,7 +437,6 @@ class CreoleObjSpace:
|
|||||||
variableobj.text = text
|
variableobj.text = text
|
||||||
|
|
||||||
def set_xml_attributes_to_obj(self,
|
def set_xml_attributes_to_obj(self,
|
||||||
xmlfile,
|
|
||||||
child,
|
child,
|
||||||
variableobj,
|
variableobj,
|
||||||
):
|
):
|
||||||
@ -495,8 +449,7 @@ class CreoleObjSpace:
|
|||||||
# UNREDEFINABLE concerns only 'variable' node so we can fix name
|
# UNREDEFINABLE concerns only 'variable' node so we can fix name
|
||||||
# to child.attrib['name']
|
# to child.attrib['name']
|
||||||
name = child.attrib['name']
|
name = child.attrib['name']
|
||||||
xmlfiles = self.display_xmlfiles(variableobj.xmlfiles[:-1])
|
raise DictConsistencyError(_(f'cannot redefine attribute {attr} for variable {name}'))
|
||||||
raise DictConsistencyError(_(f'cannot redefine attribute "{attr}" for variable "{name}" in "{xmlfile}", already defined in {xmlfiles}'))
|
|
||||||
if attr in self.booleans_attributs:
|
if attr in self.booleans_attributs:
|
||||||
val = self.convert_boolean(val)
|
val = self.convert_boolean(val)
|
||||||
if not (attr == 'name' and getattr(variableobj, 'name', None) != None):
|
if not (attr == 'name' and getattr(variableobj, 'name', None) != None):
|
||||||
@ -515,21 +468,16 @@ class CreoleObjSpace:
|
|||||||
self.remove_check(variableobj.name)
|
self.remove_check(variableobj.name)
|
||||||
if child.attrib.get('remove_condition', False):
|
if child.attrib.get('remove_condition', False):
|
||||||
self.remove_condition(variableobj.name)
|
self.remove_condition(variableobj.name)
|
||||||
if child.attrib.get('remove_fill', False):
|
|
||||||
self.remove_fill(variableobj.name)
|
|
||||||
if child.tag == 'fill':
|
if child.tag == 'fill':
|
||||||
# if variable is a redefine in current dictionary
|
# if variable is a redefine in current dictionary
|
||||||
# XXX not working with variable not in variable and in leader/followers
|
# XXX not working with variable not in variable and in leader/followers
|
||||||
variableobj.redefine = child.attrib['target'] in self.redefine_variables
|
variableobj.redefine = child.attrib['target'] in self.redefine_variables
|
||||||
if child.attrib['target'] in self.redefine_variables and child.attrib['target'] not in self.fill_removed:
|
|
||||||
self.remove_fill(child.attrib['target'])
|
|
||||||
self.fill_removed.append(child.attrib['target'])
|
|
||||||
if not hasattr(variableobj, 'index'):
|
if not hasattr(variableobj, 'index'):
|
||||||
variableobj.index = self.index
|
variableobj.index = self.index
|
||||||
if child.tag == 'check' and child.attrib['target'] in self.redefine_variables and child.attrib['target'] not in self.check_removed:
|
if child.tag == 'check' and child.attrib['target'] in self.redefine_variables and child.attrib['target'] not in self.check_removed:
|
||||||
self.remove_check(child.attrib['target'])
|
self.remove_check(child.attrib['target'])
|
||||||
self.check_removed.append(child.attrib['target'])
|
self.check_removed.append(child.attrib['target'])
|
||||||
if child.tag == 'condition' and child.attrib['source'] in self.redefine_variables and child.attrib['source'] not in self.condition_removed:
|
if child.tag == 'condition' and child.attrib['source'] in self.redefine_variables and child.attrib['source'] not in self.check_removed:
|
||||||
self.remove_condition(child.attrib['source'])
|
self.remove_condition(child.attrib['source'])
|
||||||
self.condition_removed.append(child.attrib['source'])
|
self.condition_removed.append(child.attrib['source'])
|
||||||
variableobj.namespace = namespace
|
variableobj.namespace = namespace
|
||||||
@ -553,7 +501,7 @@ class CreoleObjSpace:
|
|||||||
document.attrib.get('dynamic') != None,
|
document.attrib.get('dynamic') != None,
|
||||||
variableobj)
|
variableobj)
|
||||||
if child.attrib.get('redefine', 'False') == 'True':
|
if child.attrib.get('redefine', 'False') == 'True':
|
||||||
if namespace == Config['variable_namespace']:
|
if namespace == variable_namespace:
|
||||||
self.redefine_variables.append(child.attrib['name'])
|
self.redefine_variables.append(child.attrib['name'])
|
||||||
else:
|
else:
|
||||||
self.redefine_variables.append(namespace + '.' + family_name + '.' +
|
self.redefine_variables.append(namespace + '.' + family_name + '.' +
|
||||||
@ -561,7 +509,7 @@ class CreoleObjSpace:
|
|||||||
|
|
||||||
elif child.tag == 'family':
|
elif child.tag == 'family':
|
||||||
family_name = normalize_family(child.attrib['name'])
|
family_name = normalize_family(child.attrib['name'])
|
||||||
if namespace != Config['variable_namespace']:
|
if namespace != variable_namespace:
|
||||||
family_name = namespace + '.' + family_name
|
family_name = namespace + '.' + family_name
|
||||||
self.paths.add_family(namespace,
|
self.paths.add_family(namespace,
|
||||||
family_name,
|
family_name,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from .i18n import _
|
from .i18n import _
|
||||||
from .utils import normalize_family
|
from .utils import normalize_family
|
||||||
from .error import OperationError, DictConsistencyError
|
from .error import OperationError, DictConsistencyError
|
||||||
from .config import Config
|
from .config import variable_namespace
|
||||||
|
|
||||||
|
|
||||||
class Path:
|
class Path:
|
||||||
@ -13,8 +13,7 @@ class Path:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.variables = {}
|
self.variables = {}
|
||||||
self.families = {}
|
self.families = {}
|
||||||
self.full_paths_families = {}
|
self.full_paths = {}
|
||||||
self.full_paths_variables = {}
|
|
||||||
|
|
||||||
# Family
|
# Family
|
||||||
def add_family(self,
|
def add_family(self,
|
||||||
@ -22,9 +21,9 @@ class Path:
|
|||||||
name: str,
|
name: str,
|
||||||
variableobj: str,
|
variableobj: str,
|
||||||
) -> str: # pylint: disable=C0111
|
) -> str: # pylint: disable=C0111
|
||||||
if '.' not in name and namespace == Config['variable_namespace']:
|
if '.' not in name and namespace == variable_namespace:
|
||||||
full_name = '.'.join([namespace, name])
|
full_name = '.'.join([namespace, name])
|
||||||
self.full_paths_families[name] = full_name
|
self.full_paths[name] = full_name
|
||||||
else:
|
else:
|
||||||
full_name = name
|
full_name = name
|
||||||
if full_name in self.families and self.families[full_name]['variableobj'] != variableobj:
|
if full_name in self.families and self.families[full_name]['variableobj'] != variableobj:
|
||||||
@ -42,12 +41,12 @@ class Path:
|
|||||||
check_name=False,
|
check_name=False,
|
||||||
allow_dot=True,
|
allow_dot=True,
|
||||||
)
|
)
|
||||||
if '.' not in name and current_namespace == Config['variable_namespace'] and name in self.full_paths_families:
|
if '.' not in name and current_namespace == variable_namespace and name in self.full_paths:
|
||||||
name = self.full_paths_families[name]
|
name = self.full_paths[name]
|
||||||
if current_namespace is None: # pragma: no cover
|
if current_namespace is None: # pragma: no cover
|
||||||
raise OperationError('current_namespace must not be None')
|
raise OperationError('current_namespace must not be None')
|
||||||
dico = self.families[name]
|
dico = self.families[name]
|
||||||
if dico['namespace'] != Config['variable_namespace'] and current_namespace != dico['namespace']:
|
if dico['namespace'] != variable_namespace and current_namespace != dico['namespace']:
|
||||||
raise DictConsistencyError(_('A family located in the {} namespace '
|
raise DictConsistencyError(_('A family located in the {} namespace '
|
||||||
'shall not be used in the {} namespace').format(
|
'shall not be used in the {} namespace').format(
|
||||||
dico['namespace'], current_namespace))
|
dico['namespace'], current_namespace))
|
||||||
@ -56,8 +55,8 @@ class Path:
|
|||||||
def get_family_obj(self,
|
def get_family_obj(self,
|
||||||
name: str,
|
name: str,
|
||||||
) -> 'Family': # pylint: disable=C0111
|
) -> 'Family': # pylint: disable=C0111
|
||||||
if '.' not in name and name in self.full_paths_families:
|
if '.' not in name and name in self.full_paths:
|
||||||
name = self.full_paths_families[name]
|
name = self.full_paths[name]
|
||||||
if name not in self.families:
|
if name not in self.families:
|
||||||
raise DictConsistencyError(_('unknown family {}').format(name))
|
raise DictConsistencyError(_('unknown family {}').format(name))
|
||||||
dico = self.families[name]
|
dico = self.families[name]
|
||||||
@ -66,7 +65,7 @@ class Path:
|
|||||||
def family_is_defined(self,
|
def family_is_defined(self,
|
||||||
name: str,
|
name: str,
|
||||||
) -> str: # pylint: disable=C0111
|
) -> str: # pylint: disable=C0111
|
||||||
if '.' not in name and name not in self.families and name in self.full_paths_families:
|
if '.' not in name and name not in self.families and name in self.full_paths:
|
||||||
return True
|
return True
|
||||||
return name in self.families
|
return name in self.families
|
||||||
|
|
||||||
@ -88,8 +87,8 @@ class Path:
|
|||||||
False,
|
False,
|
||||||
dico['variableobj'],
|
dico['variableobj'],
|
||||||
)
|
)
|
||||||
if namespace == Config['variable_namespace']:
|
if namespace == variable_namespace:
|
||||||
self.full_paths_variables[name] = new_path
|
self.full_paths[name] = new_path
|
||||||
else:
|
else:
|
||||||
name = new_path
|
name = new_path
|
||||||
dico = self._get_variable(name)
|
dico = self._get_variable(name)
|
||||||
@ -111,10 +110,10 @@ class Path:
|
|||||||
) -> str: # pylint: disable=C0111
|
) -> str: # pylint: disable=C0111
|
||||||
if '.' not in name:
|
if '.' not in name:
|
||||||
full_name = '.'.join([namespace, family, name])
|
full_name = '.'.join([namespace, family, name])
|
||||||
self.full_paths_variables[name] = full_name
|
self.full_paths[name] = full_name
|
||||||
else:
|
else:
|
||||||
full_name = name
|
full_name = name
|
||||||
if namespace == Config['variable_namespace']:
|
if namespace == variable_namespace:
|
||||||
name = name.rsplit('.', 1)[1]
|
name = name.rsplit('.', 1)[1]
|
||||||
self.variables[full_name] = dict(name=name,
|
self.variables[full_name] = dict(name=name,
|
||||||
family=family,
|
family=family,
|
||||||
@ -158,7 +157,7 @@ class Path:
|
|||||||
else:
|
else:
|
||||||
dico = self._get_variable(name)
|
dico = self._get_variable(name)
|
||||||
if not allow_source:
|
if not allow_source:
|
||||||
if dico['namespace'] not in [Config['variable_namespace'], 'services'] and current_namespace != dico['namespace']:
|
if dico['namespace'] not in [variable_namespace, 'services'] and current_namespace != dico['namespace']:
|
||||||
raise DictConsistencyError(_('A variable located in the {} namespace '
|
raise DictConsistencyError(_('A variable located in the {} namespace '
|
||||||
'shall not be used in the {} namespace').format(
|
'shall not be used in the {} namespace').format(
|
||||||
dico['namespace'], current_namespace))
|
dico['namespace'], current_namespace))
|
||||||
@ -177,7 +176,7 @@ class Path:
|
|||||||
def path_is_defined(self,
|
def path_is_defined(self,
|
||||||
name: str,
|
name: str,
|
||||||
) -> str: # pylint: disable=C0111
|
) -> str: # pylint: disable=C0111
|
||||||
if '.' not in name and name not in self.variables and name in self.full_paths_variables:
|
if '.' not in name and name not in self.variables and name in self.full_paths:
|
||||||
return True
|
return True
|
||||||
return name in self.variables
|
return name in self.variables
|
||||||
|
|
||||||
@ -187,8 +186,8 @@ class Path:
|
|||||||
) -> str:
|
) -> str:
|
||||||
if name not in self.variables:
|
if name not in self.variables:
|
||||||
if name not in self.variables:
|
if name not in self.variables:
|
||||||
if '.' not in name and name in self.full_paths_variables:
|
if '.' not in name and name in self.full_paths:
|
||||||
name = self.full_paths_variables[name]
|
name = self.full_paths[name]
|
||||||
if name not in self.variables:
|
if name not in self.variables:
|
||||||
for var_name, variable in self.variables.items():
|
for var_name, variable in self.variables.items():
|
||||||
if variable['is_dynamic'] and name.startswith(var_name):
|
if variable['is_dynamic'] and name.startswith(var_name):
|
||||||
@ -196,9 +195,9 @@ class Path:
|
|||||||
raise Exception('This option is dynamic, should use "with_suffix" attribute')
|
raise Exception('This option is dynamic, should use "with_suffix" attribute')
|
||||||
return variable, name[len(var_name):]
|
return variable, name[len(var_name):]
|
||||||
if '.' not in name:
|
if '.' not in name:
|
||||||
for var_name, path in self.full_paths_variables.items():
|
for var_name, path in self.full_paths.items():
|
||||||
if name.startswith(var_name):
|
if name.startswith(var_name):
|
||||||
variable = self.variables[self.full_paths_variables[var_name]]
|
variable = self.variables[self.full_paths[var_name]]
|
||||||
if variable['is_dynamic']:
|
if variable['is_dynamic']:
|
||||||
if not with_suffix:
|
if not with_suffix:
|
||||||
raise Exception('This option is dynamic, should use "with_suffix" attribute')
|
raise Exception('This option is dynamic, should use "with_suffix" attribute')
|
||||||
|
@ -9,20 +9,16 @@ from shutil import copy
|
|||||||
import logging
|
import logging
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from os import listdir, makedirs, getcwd, chdir
|
from os import listdir, makedirs
|
||||||
from os.path import dirname, join, isfile, abspath, normpath, relpath
|
from os.path import dirname, join, isfile
|
||||||
|
|
||||||
from Cheetah.Template import Template as ChtTemplate
|
from Cheetah.Template import Template as ChtTemplate
|
||||||
from Cheetah.NameMapper import NotFound as CheetahNotFound
|
from Cheetah.NameMapper import NotFound as CheetahNotFound
|
||||||
|
|
||||||
try:
|
|
||||||
from tiramisu3 import Config
|
|
||||||
from tiramisu3.error import PropertiesOptionError
|
|
||||||
except:
|
|
||||||
from tiramisu import Config
|
from tiramisu import Config
|
||||||
from tiramisu.error import PropertiesOptionError
|
from tiramisu.error import PropertiesOptionError
|
||||||
|
|
||||||
from .config import Config
|
from .config import patch_dir, variable_namespace
|
||||||
from .error import FileNotFound, TemplateError
|
from .error import FileNotFound, TemplateError
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
from .utils import normalize_family
|
from .utils import normalize_family
|
||||||
@ -79,8 +75,7 @@ class CheetahTemplate(ChtTemplate):
|
|||||||
context,
|
context,
|
||||||
eosfunc: Dict,
|
eosfunc: Dict,
|
||||||
destfilename,
|
destfilename,
|
||||||
variable,
|
variable):
|
||||||
):
|
|
||||||
"""Initialize Creole CheetahTemplate
|
"""Initialize Creole CheetahTemplate
|
||||||
"""
|
"""
|
||||||
extra_context = {'is_defined' : IsDefined(context),
|
extra_context = {'is_defined' : IsDefined(context),
|
||||||
@ -93,24 +88,6 @@ class CheetahTemplate(ChtTemplate):
|
|||||||
file=filename,
|
file=filename,
|
||||||
searchList=[context, eosfunc, extra_context])
|
searchList=[context, eosfunc, extra_context])
|
||||||
|
|
||||||
# FORK of Cheetah fonction, do not replace '\\' by '/'
|
|
||||||
def serverSidePath(self,
|
|
||||||
path=None,
|
|
||||||
normpath=normpath,
|
|
||||||
abspath=abspath
|
|
||||||
):
|
|
||||||
|
|
||||||
# strange...
|
|
||||||
if path is None and isinstance(self, str):
|
|
||||||
path = self
|
|
||||||
if path:
|
|
||||||
return normpath(abspath(path))
|
|
||||||
# return normpath(abspath(path.replace("\\", '/')))
|
|
||||||
elif hasattr(self, '_filePath') and self._filePath:
|
|
||||||
return normpath(abspath(self._filePath))
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
class CreoleLeader:
|
class CreoleLeader:
|
||||||
def __init__(self, value, follower=None, index=None):
|
def __init__(self, value, follower=None, index=None):
|
||||||
@ -306,43 +283,37 @@ class CreoleTemplateEngine:
|
|||||||
return CreoleExtra(families)
|
return CreoleExtra(families)
|
||||||
|
|
||||||
def patch_template(self,
|
def patch_template(self,
|
||||||
filename: str,
|
filename: str):
|
||||||
tmp_dir: str,
|
|
||||||
patch_dir: str,
|
|
||||||
) -> None:
|
|
||||||
"""Apply patch to a template
|
"""Apply patch to a template
|
||||||
"""
|
"""
|
||||||
patch_cmd = ['patch', '-d', tmp_dir, '-N', '-p1']
|
patch_cmd = ['patch', '-d', self.tmp_dir, '-N', '-p1']
|
||||||
patch_no_debug = ['-s', '-r', '-', '--backup-if-mismatch']
|
patch_no_debug = ['-s', '-r', '-', '--backup-if-mismatch']
|
||||||
|
|
||||||
patch_file = join(patch_dir, f'{filename}.patch')
|
# patches variante + locaux
|
||||||
|
for directory in [join(patch_dir, 'variante'), patch_dir]:
|
||||||
|
patch_file = join(directory, f'{filename}.patch')
|
||||||
if isfile(patch_file):
|
if isfile(patch_file):
|
||||||
log.info(_("Patching template '{filename}' with '{patch_file}'"))
|
log.info(_("Patching template '{filename}' with '{patch_file}'"))
|
||||||
rel_patch_file = relpath(patch_file, tmp_dir)
|
ret = call(patch_cmd + patch_no_debug + ['-i', patch_file])
|
||||||
ret = call(patch_cmd + patch_no_debug + ['-i', rel_patch_file])
|
|
||||||
if ret:
|
if ret:
|
||||||
patch_cmd_err = ' '.join(patch_cmd + ['-i', rel_patch_file])
|
patch_cmd_err = ' '.join(patch_cmd + ['-i', patch_file])
|
||||||
log.error(_(f"Error applying patch: '{rel_patch_file}'\nTo reproduce and fix this error {patch_cmd_err}"))
|
log.error(_(f"Error applying patch: '{patch_file}'\nTo reproduce and fix this error {patch_cmd_err}"))
|
||||||
copy(join(self.distrib_dir, filename), tmp_dir)
|
copy(filename, self.tmp_dir)
|
||||||
|
|
||||||
def prepare_template(self,
|
def prepare_template(self,
|
||||||
filename: str,
|
filename: str):
|
||||||
tmp_dir: str,
|
|
||||||
patch_dir: str,
|
|
||||||
) -> None:
|
|
||||||
"""Prepare template source file
|
"""Prepare template source file
|
||||||
"""
|
"""
|
||||||
log.info(_("Copy template: '{filename}' -> '{tmp_dir}'"))
|
log.info(_("Copy template: '{filename}' -> '{self.tmp_dir}'"))
|
||||||
copy(filename, tmp_dir)
|
copy(filename, self.tmp_dir)
|
||||||
self.patch_template(filename, tmp_dir, patch_dir)
|
self.patch_template(filename)
|
||||||
|
|
||||||
def process(self,
|
def process(self,
|
||||||
source: str,
|
source: str,
|
||||||
true_destfilename: str,
|
true_destfilename: str,
|
||||||
destfilename: str,
|
destfilename: str,
|
||||||
filevar: Dict,
|
filevar: Dict,
|
||||||
variable: Any,
|
variable: Any):
|
||||||
):
|
|
||||||
"""Process a cheetah template
|
"""Process a cheetah template
|
||||||
"""
|
"""
|
||||||
# full path of the destination file
|
# full path of the destination file
|
||||||
@ -357,19 +328,16 @@ class CreoleTemplateEngine:
|
|||||||
data = str(cheetah_template)
|
data = str(cheetah_template)
|
||||||
except CheetahNotFound as err:
|
except CheetahNotFound as err:
|
||||||
varname = err.args[0][13:-1]
|
varname = err.args[0][13:-1]
|
||||||
raise TemplateError(_(f"Error: unknown variable used in template {source} to {destfilename} : {varname}"))
|
raise TemplateError(_(f"Error: unknown variable used in template {destfilename} : {varname}"))
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
raise TemplateError(_(f"Error while instantiating template {source} to {destfilename}: {err}"))
|
raise TemplateError(_(f"Error while instantiating template {destfilename}: {err}"))
|
||||||
|
|
||||||
with open(destfilename, 'w') as file_h:
|
with open(destfilename, 'w') as file_h:
|
||||||
file_h.write(data)
|
file_h.write(data)
|
||||||
|
|
||||||
def instance_file(self,
|
def instance_file(self,
|
||||||
filevar: Dict,
|
filevar: Dict,
|
||||||
service_name: str,
|
service_name: str) -> None:
|
||||||
tmp_dir: str,
|
|
||||||
dest_dir: str,
|
|
||||||
) -> None:
|
|
||||||
"""Run templatisation on one file
|
"""Run templatisation on one file
|
||||||
"""
|
"""
|
||||||
log.info(_("Instantiating file '{filename}'"))
|
log.info(_("Instantiating file '{filename}'"))
|
||||||
@ -383,13 +351,13 @@ class CreoleTemplateEngine:
|
|||||||
if variable:
|
if variable:
|
||||||
variable = [variable]
|
variable = [variable]
|
||||||
for idx, filename in enumerate(filenames):
|
for idx, filename in enumerate(filenames):
|
||||||
destfilename = join(dest_dir, filename[1:])
|
destfilename = join(self.dest_dir, filename[1:])
|
||||||
makedirs(dirname(destfilename), exist_ok=True)
|
makedirs(dirname(destfilename), exist_ok=True)
|
||||||
if variable:
|
if variable:
|
||||||
var = variable[idx]
|
var = variable[idx]
|
||||||
else:
|
else:
|
||||||
var = None
|
var = None
|
||||||
source = join(tmp_dir, filevar['source'])
|
source = join(self.tmp_dir, filevar['source'])
|
||||||
if filevar['templating']:
|
if filevar['templating']:
|
||||||
self.process(source,
|
self.process(source,
|
||||||
filename,
|
filename,
|
||||||
@ -402,21 +370,16 @@ class CreoleTemplateEngine:
|
|||||||
async def instance_files(self) -> None:
|
async def instance_files(self) -> None:
|
||||||
"""Run templatisation on all files
|
"""Run templatisation on all files
|
||||||
"""
|
"""
|
||||||
ori_dir = getcwd()
|
|
||||||
tmp_dir = relpath(self.tmp_dir, self.distrib_dir)
|
|
||||||
dest_dir = relpath(self.dest_dir, self.distrib_dir)
|
|
||||||
patch_dir = relpath(Config['patch_dir'], self.distrib_dir)
|
|
||||||
chdir(self.distrib_dir)
|
|
||||||
for option in await self.config.option.list(type='all'):
|
for option in await self.config.option.list(type='all'):
|
||||||
namespace = await option.option.name()
|
namespace = await option.option.name()
|
||||||
if namespace == Config['variable_namespace']:
|
if namespace == variable_namespace:
|
||||||
await self.load_eole_variables_rougail(option)
|
await self.load_eole_variables_rougail(option)
|
||||||
else:
|
else:
|
||||||
families = await self.load_eole_variables(namespace,
|
families = await self.load_eole_variables(namespace,
|
||||||
option)
|
option)
|
||||||
self.rougail_variables_dict[namespace] = families
|
self.rougail_variables_dict[namespace] = families
|
||||||
for template in listdir('.'):
|
for template in listdir(self.distrib_dir):
|
||||||
self.prepare_template(template, tmp_dir, patch_dir)
|
self.prepare_template(join(self.distrib_dir, template))
|
||||||
for service_obj in await self.config.option('services').list('all'):
|
for service_obj in await self.config.option('services').list('all'):
|
||||||
service_name = await service_obj.option.doc()
|
service_name = await service_obj.option.doc()
|
||||||
for fills in await service_obj.list('all'):
|
for fills in await service_obj.list('all'):
|
||||||
@ -424,17 +387,15 @@ class CreoleTemplateEngine:
|
|||||||
for fill_obj in await fills.list('all'):
|
for fill_obj in await fills.list('all'):
|
||||||
fill = await fill_obj.value.dict()
|
fill = await fill_obj.value.dict()
|
||||||
filename = fill['source']
|
filename = fill['source']
|
||||||
if not isfile(filename):
|
distib_file = join(self.distrib_dir, filename)
|
||||||
raise FileNotFound(_(f"File {filename} does not exist."))
|
if not isfile(distib_file):
|
||||||
|
raise FileNotFound(_(f"File {distib_file} does not exist."))
|
||||||
if fill.get('activate', False):
|
if fill.get('activate', False):
|
||||||
self.instance_file(fill,
|
self.instance_file(fill,
|
||||||
service_name,
|
service_name,
|
||||||
tmp_dir,
|
|
||||||
dest_dir,
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
log.debug(_("Instantiation of file '{filename}' disabled"))
|
log.debug(_("Instantiation of file '{filename}' disabled"))
|
||||||
chdir(ori_dir)
|
|
||||||
|
|
||||||
|
|
||||||
async def generate(config: Config,
|
async def generate(config: Config,
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
try:
|
|
||||||
from tiramisu3 import DynOptionDescription
|
|
||||||
except:
|
|
||||||
from tiramisu import DynOptionDescription
|
from tiramisu import DynOptionDescription
|
||||||
from .utils import normalize_family
|
from .utils import normalize_family
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
"""loader
|
"""loader
|
||||||
flattened XML specific
|
flattened XML specific
|
||||||
"""
|
"""
|
||||||
from .config import Config
|
from os.path import isfile
|
||||||
|
from lxml.etree import DTD
|
||||||
|
|
||||||
|
from .config import dtdfilename, variable_namespace
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
from .error import LoaderError
|
from .error import LoaderError
|
||||||
from .annotator import ERASED_ATTRIBUTES, CONVERT_OPTION
|
from .annotator import ERASED_ATTRIBUTES
|
||||||
|
|
||||||
|
|
||||||
FUNC_TO_DICT = ['valid_not_equal']
|
FUNC_TO_DICT = ['valid_not_equal']
|
||||||
@ -12,22 +15,42 @@ FORCE_INFORMATIONS = ['help', 'test', 'separator', 'manage']
|
|||||||
ATTRIBUTES_ORDER = ('name', 'doc', 'default', 'multi')
|
ATTRIBUTES_ORDER = ('name', 'doc', 'default', 'multi')
|
||||||
|
|
||||||
|
|
||||||
|
CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
|
||||||
|
'choice': dict(opttype="ChoiceOption"),
|
||||||
|
'string': dict(opttype="StrOption"),
|
||||||
|
'password': dict(opttype="PasswordOption"),
|
||||||
|
'mail': dict(opttype="EmailOption"),
|
||||||
|
'boolean': dict(opttype="BoolOption"),
|
||||||
|
'symlink': dict(opttype="SymLinkOption"),
|
||||||
|
'filename': dict(opttype="FilenameOption"),
|
||||||
|
'date': dict(opttype="DateOption"),
|
||||||
|
'unix_user': dict(opttype="UsernameOption"),
|
||||||
|
'ip': dict(opttype="IPOption", initkwargs={'allow_reserved': True}),
|
||||||
|
'local_ip': dict(opttype="IPOption", initkwargs={'private_only': True, 'warnings_only': True}),
|
||||||
|
'netmask': dict(opttype="NetmaskOption"),
|
||||||
|
'network': dict(opttype="NetworkOption"),
|
||||||
|
'broadcast': dict(opttype="BroadcastOption"),
|
||||||
|
'netbios': dict(opttype="DomainnameOption", initkwargs={'type': 'netbios', 'warnings_only': True}),
|
||||||
|
'domain': dict(opttype="DomainnameOption", initkwargs={'type': 'domainname', '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}),
|
||||||
|
'mac': dict(opttype="MACOption"),
|
||||||
|
'cidr': dict(opttype="IPOption", initkwargs={'cidr': True}),
|
||||||
|
'network_cidr': dict(opttype="NetworkOption", initkwargs={'cidr': True}),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class TiramisuReflector:
|
class TiramisuReflector:
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
xmlroot,
|
xmlroot,
|
||||||
funcs_path,
|
funcs_path,
|
||||||
):
|
):
|
||||||
self.storage = ElementStorage()
|
self.storage = ElementStorage()
|
||||||
self.storage.text = ["import imp",
|
self.storage.text = ["from tiramisu import *",
|
||||||
f"func = imp.load_source('func', '{funcs_path}')",
|
|
||||||
"for key, value in dict(locals()).items():",
|
|
||||||
" if key != ['imp', 'func']:",
|
|
||||||
" setattr(func, key, value)",
|
|
||||||
"try:",
|
|
||||||
" from tiramisu3 import *",
|
|
||||||
"except:",
|
|
||||||
" from tiramisu import *",
|
|
||||||
"from rougail.tiramisu import ConvertDynOptionDescription",
|
"from rougail.tiramisu import ConvertDynOptionDescription",
|
||||||
|
"import imp",
|
||||||
|
f"func = imp.load_source('func', '{funcs_path}')",
|
||||||
]
|
]
|
||||||
self.make_tiramisu_objects(xmlroot)
|
self.make_tiramisu_objects(xmlroot)
|
||||||
# parse object
|
# parse object
|
||||||
@ -57,10 +80,10 @@ class TiramisuReflector:
|
|||||||
# variable_namespace family has to be loaded before any other family
|
# variable_namespace family has to be loaded before any other family
|
||||||
# because `extra` family could use `variable_namespace` variables.
|
# because `extra` family could use `variable_namespace` variables.
|
||||||
if hasattr(xmlroot, 'variables'):
|
if hasattr(xmlroot, 'variables'):
|
||||||
if Config['variable_namespace'] in xmlroot.variables:
|
if variable_namespace in xmlroot.variables:
|
||||||
yield xmlroot.variables[Config['variable_namespace']]
|
yield xmlroot.variables[variable_namespace]
|
||||||
for xmlelt, value in xmlroot.variables.items():
|
for xmlelt, value in xmlroot.variables.items():
|
||||||
if xmlelt != Config['variable_namespace']:
|
if xmlelt != variable_namespace:
|
||||||
yield value
|
yield value
|
||||||
if hasattr(xmlroot, 'services'):
|
if hasattr(xmlroot, 'services'):
|
||||||
yield xmlroot.services
|
yield xmlroot.services
|
||||||
@ -318,8 +341,6 @@ class Variable(Common):
|
|||||||
value = value.split(',')
|
value = value.split(',')
|
||||||
if self.object_type == 'IntOption':
|
if self.object_type == 'IntOption':
|
||||||
value = [int(v) for v in value]
|
value = [int(v) for v in value]
|
||||||
elif self.object_type == 'FloatOption':
|
|
||||||
value = [float(v) for v in value]
|
|
||||||
self.informations[key] = value
|
self.informations[key] = value
|
||||||
else:
|
else:
|
||||||
self.attrib[key] = value
|
self.attrib[key] = value
|
||||||
@ -373,7 +394,7 @@ class Variable(Common):
|
|||||||
function = child.name
|
function = child.name
|
||||||
if hasattr(child, 'param'):
|
if hasattr(child, 'param'):
|
||||||
for param in child.param:
|
for param in child.param:
|
||||||
value = self.populate_param(function, param)
|
value = self.populate_param(param)
|
||||||
if not hasattr(param, 'name'):
|
if not hasattr(param, 'name'):
|
||||||
args.append(str(value))
|
args.append(str(value))
|
||||||
else:
|
else:
|
||||||
@ -387,7 +408,6 @@ class Variable(Common):
|
|||||||
return ret + ')'
|
return ret + ')'
|
||||||
|
|
||||||
def populate_param(self,
|
def populate_param(self,
|
||||||
function: str,
|
|
||||||
param,
|
param,
|
||||||
):
|
):
|
||||||
if param.type == 'string':
|
if param.type == 'string':
|
||||||
@ -397,7 +417,7 @@ class Variable(Common):
|
|||||||
elif param.type == 'variable':
|
elif param.type == 'variable':
|
||||||
value = {'option': param.text,
|
value = {'option': param.text,
|
||||||
'notraisepropertyerror': param.notraisepropertyerror,
|
'notraisepropertyerror': param.notraisepropertyerror,
|
||||||
'todict': function in FUNC_TO_DICT,
|
'todict': param.text in FUNC_TO_DICT,
|
||||||
}
|
}
|
||||||
if hasattr(param, 'suffix'):
|
if hasattr(param, 'suffix'):
|
||||||
value['suffix'] = param.suffix
|
value['suffix'] = param.suffix
|
||||||
@ -420,7 +440,7 @@ class Variable(Common):
|
|||||||
self.attrib['default'].append(value)
|
self.attrib['default'].append(value)
|
||||||
if not self.is_leader:
|
if not self.is_leader:
|
||||||
self.attrib['default_multi'] = value
|
self.attrib['default_multi'] = value
|
||||||
elif isinstance(value, (int, float)):
|
elif isinstance(value, int):
|
||||||
self.attrib['default'].append(value)
|
self.attrib['default'].append(value)
|
||||||
else:
|
else:
|
||||||
self.attrib['default'].append("'" + value + "'")
|
self.attrib['default'].append("'" + value + "'")
|
||||||
|
@ -37,7 +37,7 @@ class XMLReflector(object):
|
|||||||
# document = parse(BytesIO(xmlfile), XMLParser(remove_blank_text=True))
|
# document = parse(BytesIO(xmlfile), XMLParser(remove_blank_text=True))
|
||||||
document = parse(xmlfile)
|
document = parse(xmlfile)
|
||||||
if not self.dtd.validate(document):
|
if not self.dtd.validate(document):
|
||||||
raise DictConsistencyError(_(f'"{xmlfile}" not a valid xml file: {self.dtd.error_log.filter_from_errors()[0]}'))
|
raise DictConsistencyError(_("not a valid xml file: {}").format(xmlfile))
|
||||||
return document.getroot()
|
return document.getroot()
|
||||||
|
|
||||||
def load_xml_from_folders(self, xmlfolders):
|
def load_xml_from_folders(self, xmlfolders):
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_2 = OptionDescription(name='tata', doc='tata', children=[])
|
|
||||||
option_2.impl_set_information("manage", True)
|
|
||||||
option_1 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,20 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services>
|
|
||||||
<service name="test">
|
|
||||||
<file name="/etc/file"/>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="Description">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/etc/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": true}
|
|
@ -1,26 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_8 = StrOption(name='group', doc='group', multi=False, default='root')
|
|
||||||
option_9 = StrOption(name='mode', doc='mode', multi=False, default='0644')
|
|
||||||
option_10 = StrOption(name='name', doc='name', multi=False, default='/etc/file')
|
|
||||||
option_11 = StrOption(name='owner', doc='owner', multi=False, default='root')
|
|
||||||
option_12 = StrOption(name='source', doc='source', multi=False, default='file')
|
|
||||||
option_13 = BoolOption(name='templating', doc='templating', multi=False, default=True)
|
|
||||||
option_14 = BoolOption(name='activate', doc='activate', multi=False, default=True)
|
|
||||||
option_7 = OptionDescription(name='file', doc='file', children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
|
|
||||||
option_6 = OptionDescription(name='files', doc='files', children=[option_7])
|
|
||||||
option_5 = OptionDescription(name='test', doc='test', children=[option_6])
|
|
||||||
option_5.impl_set_information("manage", True)
|
|
||||||
option_4 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_5])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_4])
|
|
@ -1 +0,0 @@
|
|||||||
%include "incfile"
|
|
@ -1 +0,0 @@
|
|||||||
%%mode_conteneur_actif
|
|
@ -1,20 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services>
|
|
||||||
<service name="test">
|
|
||||||
<file name="/etc/file"/>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="Description">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/etc/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true, "services.test.files.file.activate": true}
|
|
@ -1,5 +0,0 @@
|
|||||||
--- tmpl/file 2020-11-20 07:44:38.588472784 +0100
|
|
||||||
+++ dest/file 2020-11-20 07:44:54.588536011 +0100
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-unpatched
|
|
||||||
+patched
|
|
@ -1 +0,0 @@
|
|||||||
patched
|
|
@ -1,26 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_8 = StrOption(name='group', doc='group', multi=False, default='root')
|
|
||||||
option_9 = StrOption(name='mode', doc='mode', multi=False, default='0644')
|
|
||||||
option_10 = StrOption(name='name', doc='name', multi=False, default='/etc/file')
|
|
||||||
option_11 = StrOption(name='owner', doc='owner', multi=False, default='root')
|
|
||||||
option_12 = StrOption(name='source', doc='source', multi=False, default='file')
|
|
||||||
option_13 = BoolOption(name='templating', doc='templating', multi=False, default=True)
|
|
||||||
option_14 = BoolOption(name='activate', doc='activate', multi=False, default=True)
|
|
||||||
option_7 = OptionDescription(name='file', doc='file', children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
|
|
||||||
option_6 = OptionDescription(name='files', doc='files', children=[option_7])
|
|
||||||
option_5 = OptionDescription(name='test', doc='test', children=[option_6])
|
|
||||||
option_5.impl_set_information("manage", True)
|
|
||||||
option_4 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_5])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_4])
|
|
@ -1 +0,0 @@
|
|||||||
unpatched
|
|
@ -1,20 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services>
|
|
||||||
<service name="test">
|
|
||||||
<file name="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel"/>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="Description">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.mode_conteneur_actif": "non", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.group": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.mode": "0644", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.name": "/etc/systemd-makefs@dev-disk-by\\x2dpartlabel", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.owner": "root", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.source": "systemd-makefs@dev-disk-by\\x2dpartlabel", "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.templating": true, "services.test.files.systemd_makefs@dev_disk_by\\x2dpartlabel.activate": true}
|
|
@ -1 +0,0 @@
|
|||||||
non
|
|
@ -1,26 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_8 = StrOption(name='group', doc='group', multi=False, default='root')
|
|
||||||
option_9 = StrOption(name='mode', doc='mode', multi=False, default='0644')
|
|
||||||
option_10 = StrOption(name='name', doc='name', multi=False, default='/etc/systemd-makefs@dev-disk-by\\x2dpartlabel')
|
|
||||||
option_11 = StrOption(name='owner', doc='owner', multi=False, default='root')
|
|
||||||
option_12 = StrOption(name='source', doc='source', multi=False, default='systemd-makefs@dev-disk-by\\x2dpartlabel')
|
|
||||||
option_13 = BoolOption(name='templating', doc='templating', multi=False, default=True)
|
|
||||||
option_14 = BoolOption(name='activate', doc='activate', multi=False, default=True)
|
|
||||||
option_7 = OptionDescription(name='systemd_makefs@dev_disk_by\\x2dpartlabel', doc='systemd-makefs@dev-disk-by\\x2dpartlabel', children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
|
|
||||||
option_6 = OptionDescription(name='files', doc='files', children=[option_7])
|
|
||||||
option_5 = OptionDescription(name='test', doc='test', children=[option_6])
|
|
||||||
option_5.impl_set_information("manage", True)
|
|
||||||
option_4 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_5])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_4])
|
|
@ -1 +0,0 @@
|
|||||||
%%mode_conteneur_actif
|
|
@ -1,16 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="float" type="float" description="Description">
|
|
||||||
<value>0.527</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="float_multi" type="float" description="Description" multi="True">
|
|
||||||
<value>0.527</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.float": 0.527, "rougail.general.float_multi": [0.527]}
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = FloatOption(properties=frozenset({'mandatory', 'normal'}), name='float', doc='Description', multi=False, default=0.527)
|
|
||||||
option_4 = FloatOption(properties=frozenset({'mandatory', 'normal'}), name='float_multi', doc='Description', multi=True, default=[0.527], default_multi=0.527)
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="general" type="oui/non" description="description">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
</variables>
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.general": "non"}
|
|
@ -1,14 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='general', doc='description', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', '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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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.impl_set_information("separator", "Établissement")
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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.impl_set_information("separator", "Établissement")
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_4 = StrOption(properties=frozenset({'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('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), 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_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
|
|
||||||
option_4 = IntOption(properties=frozenset({'normal'}), name='int', doc='No change', multi=False, max_number=100, min_number=0)
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
|
|
||||||
option_4 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_lower, Params((ParamSelfOption()), kwargs={}), warnings_only=False)], name='int', doc='No change', multi=False)
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
|
|
||||||
option_4 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='int2', doc='No change', multi=False, default=100)
|
|
||||||
option_5 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_lower, Params((ParamSelfOption()), kwargs={'mini': ParamValue("0"), 'maxi': ParamOption(option_4, notraisepropertyerror=False, todict=False)}), warnings_only=False)], name='int', doc='No change', multi=False)
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
|
|
||||||
option_5 = IntOption(properties=frozenset({'normal'}), name='int2', doc='No change', multi=False)
|
|
||||||
option_4 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=True)), kwargs={}), warnings_only=False)], name='int', doc='No change', multi=False)
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=True)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non'))
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,17 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=True)), kwargs={}), warnings_only=False), Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=True)), 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_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,17 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=True)), kwargs={}), warnings_only=False), Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=True)), 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_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>oui</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="adresse_ip_eth0" type="local_ip" description="Adresse IP de la carte" mandatory="True" mode="basic"/>
|
|
||||||
<variable name="adresse_netmask_eth0" type="netmask" description="Masque de sous réseau de la carte" mandatory="True" mode="basic"/>
|
|
||||||
<variable name="adresse_ip" type="local_ip" description="IP" mandatory="True" mode="basic"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_in_network" target="adresse_ip" level="warning">
|
|
||||||
<param type="variable">adresse_ip_eth0</param>
|
|
||||||
<param type="variable">adresse_netmask_eth0</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.adresse_ip_eth0": null, "rougail.general.adresse_netmask_eth0": null, "rougail.general.adresse_ip": null}
|
|
@ -1,17 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5, option_6])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,27 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>oui</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="adresse_ip_eth0" type="cidr" description="Adresse IP de la carte" mandatory="True" mode="basic"/>
|
|
||||||
<variable name="adresse_ip" type="local_ip" description="IP" mandatory="True" mode="basic"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_in_network" target="adresse_ip" level="warning">
|
|
||||||
<param type="variable">adresse_ip_eth0</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
@ -1 +0,0 @@
|
|||||||
{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.adresse_ip_eth0": null, "rougail.general.adresse_ip": null}
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_ip_netmask, 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_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,20 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
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_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
|
||||||
option_9 = StrOption(properties=frozenset({'normal'}), name='follower3', doc='follower3', multi=True)
|
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8, option_9])
|
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,19 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower3', doc='follower3', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
|
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7, option_8])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,19 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_7 = StrOption(properties=frozenset({'expert'}), name='follower1', doc='follower1', multi=True)
|
|
||||||
option_8 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True)
|
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'expert'}), children=[option_6, option_7, option_8])
|
|
||||||
option_4 = OptionDescription(name='leadermode', doc='leadermode', properties=frozenset({'expert'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,19 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower1', doc='follower1', multi=True)
|
|
||||||
option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower2', doc='follower2', multi=True)
|
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'hidden', 'normal'}), children=[option_6, option_7, option_8])
|
|
||||||
option_4 = OptionDescription(name='leadermode', doc='leadermode', properties=frozenset({'normal'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,19 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_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_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_8 = 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='follower2', doc='follower2', multi=True)
|
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), children=[option_6, option_7, option_8])
|
|
||||||
option_4 = OptionDescription(name='leadermode', doc='leadermode', properties=frozenset({'normal'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_5 = StrOption(properties=frozenset({'mandatory'}), 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_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_4 = Leadership(name='leader', doc='leader', properties=frozenset({'basic'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_5 = StrOption(name='leader', doc='leader', multi=True)
|
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', '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_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,17 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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='oui', values=('oui', 'non'))
|
|
||||||
option_5 = NetmaskOption(name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', multi=True)
|
|
||||||
option_6 = NetworkOption(properties=frozenset({'mandatory', 'normal'}), name='nut_monitor_host', doc='Adresse IP du réseau de l\'esclave', multi=True)
|
|
||||||
option_4 = Leadership(name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', properties=frozenset({'normal'}), children=[option_5, option_6])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,23 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
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_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
|
||||||
option_10 = StrOption(name='leader1', doc='leader', multi=True)
|
|
||||||
option_11 = StrOption(properties=frozenset({'normal'}), name='follower11', doc='follower1', multi=True)
|
|
||||||
option_12 = StrOption(properties=frozenset({'normal'}), name='follower21', doc='follower2', multi=True)
|
|
||||||
option_9 = Leadership(name='leader1', doc='leader', properties=frozenset({'normal'}), children=[option_10, option_11, option_12])
|
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5, option_9])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non')
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_7 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif3', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_6 = OptionDescription(name='general2', doc='Général2', properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), children=[option_7])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_6])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'disabled', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,15 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = StrOption(properties=frozenset({'normal'}), name='mode_conteneur_actif', doc='No change', multi=False)
|
|
||||||
option_4 = StrOption(properties=frozenset({'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False)
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("non")), kwargs={})), values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='tous', values=('tous', 'authentifié', 'aucun'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,16 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='tous', values=('tous', 'authentifié', 'aucun'))
|
|
||||||
option_4 = 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_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_7 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif3', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_6 = OptionDescription(name='general2', doc='Général2', properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), children=[option_7])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_6])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,19 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
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_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
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_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='leader', multi=True, default=['non'], default_multi='non', values=('oui', 'non'))
|
|
||||||
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default_multi='value')
|
|
||||||
option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True)
|
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -1,18 +0,0 @@
|
|||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='leader', multi=True, default=['non'], default_multi='non', values=('oui', 'non'))
|
|
||||||
option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True, default=['leader'])
|
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=submulti, default_multi=['value'])
|
|
||||||
option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower2', doc='follower2', multi=submulti, default_multi=['value1', 'value2'])
|
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
|
||||||
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_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user