fill is a value

This commit is contained in:
Emmanuel Garette 2019-11-26 22:05:28 +01:00
parent 04dcf2baeb
commit 590283ef25
39 changed files with 219 additions and 242 deletions

View file

@ -484,6 +484,8 @@ class SpaceAnnotator(object):
self.filter_separators()
self.absolute_path_for_symlink_in_containers()
self.convert_helps()
#if hasattr(self.space, 'constraints'):
# print(vars(self.space.constraints))
def absolute_path_for_symlink_in_containers(self):
if not hasattr(self.space, 'containers'):
@ -758,7 +760,7 @@ class SpaceAnnotator(object):
is_follower = True
else:
is_follower = False
path = '{}.{}.{}.{}'.format(variables.name, family.name, variable.name, follower.name)
path = '{}.{}.{}'.format(family.path, variable.name, follower.name)
self._annotate_variable(follower, family_mode, path, is_follower)
if HIGH_COMPATIBILITY:
# leader's variable are right
@ -781,7 +783,7 @@ class SpaceAnnotator(object):
# auto_freeze's variable is set in 'basic' mode if its mode is 'normal'
if variable.auto_freeze is True and variable.mode != modes_level[-1]:
variable.mode = modes_level[0]
path = '{}.{}.{}'.format(variables.name, family.name, variable.name)
path = '{}.{}'.format(family.path, variable.name)
self._annotate_variable(variable, family_mode, path)
def get_variable(self, name): # pylint: disable=C0111
@ -1103,6 +1105,18 @@ class SpaceAnnotator(object):
del_idx.sort(reverse=True)
for idx in del_idx:
space.constraints.fill.pop(idx)
for fill in space.constraints.fill:
variable = self.paths.get_variable_obj(fill.target)
value = self.objectspace.value()
value.type = 'calculation'
value.name = fill.name
if hasattr(fill, 'param'):
value.param = fill.param
if not hasattr(variable, 'value'):
variable.value = []
variable.value.append(value)
self.force_not_mandatory.append(fill.target)
del space.constraints.fill
def filter_targets(self): # pylint: disable=C0111
for condition_idx, condition in enumerate(self.space.constraints.condition):

View file

@ -506,7 +506,7 @@ class CreoleObjSpace(object):
if not attr.startswith('_'):
yield attr
def _sub_xml_export(self, name, node, node_name, space):
def _sub_xml_export(self, name, node, node_name, space, current_space):
if isinstance(space, dict):
space = list(space.values())
if isinstance(space, list):
@ -533,13 +533,13 @@ class CreoleObjSpace(object):
child_node = SubElement(node, name)
for subname in self._get_attributes(space):
subspace = getattr(space, subname)
self._sub_xml_export(subname, child_node, name, subspace)
self._sub_xml_export(subname, child_node, name, subspace, space)
elif isinstance(space, self.Redefinable):
child_node = SubElement(node, 'family')
child_node.attrib['name'] = name
for subname in self._get_attributes(space):
subspace = getattr(space, subname)
self._sub_xml_export(subname, child_node, name, subspace)
self._sub_xml_export(subname, child_node, name, subspace, space)
else:
# FIXME plutot dans annotator ...
if name in PROPERTIES and node.tag in ['variable', 'family', 'leader']:
@ -548,7 +548,7 @@ class CreoleObjSpace(object):
SubElement(node, 'property').text = prop
elif name not in ERASED_ATTRIBUTES:
if name == 'name' and node_name in self.forced_text_elts_as_name:
if name == 'name' and node_name in self.forced_text_elts_as_name and not hasattr(current_space, 'param'):
if isinstance(space, str):
node.text = space
else:
@ -571,7 +571,7 @@ class CreoleObjSpace(object):
def _xml_export(self, node, space, node_name='creole'):
for name in self._get_attributes(space):
subspace = getattr(space, name)
self._sub_xml_export(name, node, node_name, subspace)
self._sub_xml_export(name, node, node_name, subspace, space)
class Path(object):
@ -683,9 +683,8 @@ class Path(object):
def _get_variable(self, name):
if name not in self.variables:
if name.startswith('creole.'):
raise CreoleDictConsistencyError(
_("don't set full path variable in creole's namespace "
"(set '{}' not '{}')").format(name.split('.')[-1], name))
name = name.split('.')[-1]
if name not in self.variables:
raise CreoleDictConsistencyError(_('unknown option {}').format(name))
return self.variables[name]

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,8 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif"/>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -14,6 +12,7 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="calculation">calc_val</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>basic</property>
@ -16,6 +12,9 @@
<property>mandatory</property>
<property>basic</property>
<property expected="oui" inverse="True" source="creole.general.module_instancie" type="calculation">auto_frozen</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>basic</property>
@ -14,6 +10,9 @@
<choice type="string">non</choice>
<property>mandatory</property>
<property>basic</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="Général" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,11 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="get_zone_name_bridge" target="creole.general.mode_conteneur_actif1">
<param hidden="True" name="nom_carte" type="eole">creole.general.mode_conteneur_actif</param>
<param hidden="True" name="context" type="context"/>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -24,6 +19,10 @@
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value name="get_zone_name_bridge" type="calculation">
<param hidden="True" name="nom_carte" type="eole">creole.general.mode_conteneur_actif</param>
<param hidden="True" name="context" type="context"/>
</value>
</variable>
</family>
<separators/>

View file

@ -1,16 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="domain">
<property>mandatory</property>
<property>expert</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="number">3</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -13,6 +9,9 @@
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="number">3</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.autosavevar">
<param hidden="True" type="string">oui</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>basic</property>
@ -23,6 +19,9 @@
<property>frozen</property>
<property>hidden</property>
<property>basic</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="string">oui</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.autosavevar">
<param hidden="True" type="string">oui</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>basic</property>
@ -24,6 +20,9 @@
<property expected="oui" inverse="False" source="creole.general.mode_conteneur_actif" type="calculation">frozen</property>
<property expected="oui" inverse="False" source="creole.general.mode_conteneur_actif" type="calculation">hidden</property>
<property expected="oui" inverse="False" source="creole.general.mode_conteneur_actif" type="calculation">force_default_on_freeze</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="string">oui</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="string">non</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -23,6 +19,9 @@
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">frozen</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">hidden</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">force_default_on_freeze</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="string">non</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general1.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general1.master.slave2">
<param hidden="True" type="eole">creole.general1.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -26,9 +19,15 @@
<variable doc="master" multi="True" name="master" type="string"/>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general1.master.slave1</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave2">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -23,9 +16,15 @@
<variable doc="master" multi="True" name="master" type="string"/>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>expert</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave2">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -24,9 +17,15 @@
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave2">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>basic</property>
@ -25,9 +18,15 @@
</variable>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general1.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general1.master.slave2">
<param hidden="True" type="eole">creole.general1.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -26,9 +19,15 @@
<variable doc="master" multi="True" name="master" type="string"/>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general1.master.slave1</param>
</value>
</variable>
</leader>
<leader doc="master" name="master1">

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general1.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general1.master.slave2">
<param hidden="True" type="eole">creole.general1.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -26,9 +19,15 @@
<variable doc="master" multi="True" name="master" type="string"/>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general1.master.slave1</param>
</value>
</variable>
<variable doc="slave3" multi="True" name="slave3" type="string">
<property>normal</property>

View file

@ -1,16 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave2">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave3">
<param hidden="True" type="eole">creole.general.master.master</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -29,18 +19,27 @@
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</value>
</variable>
<variable doc="slave3" multi="True" name="slave3" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.master</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave2">
<param hidden="True" type="eole">creole.general.master.master</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -26,12 +19,18 @@
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.master</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.mastermode.master.master">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>expert</property>
@ -24,6 +20,9 @@
<variable doc="master" multi="True" name="master" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>expert</property>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
<fill name="calc_val" target="creole.general.master.slave2">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="Général" name="general">
<property>normal</property>
@ -23,9 +16,15 @@
<variable doc="master" multi="True" name="master" type="string"/>
<variable doc="slave1" multi="True" name="slave1" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="eole">creole.general.master.slave1</param>
</value>
</variable>
</leader>
</family>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="string">value</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -13,6 +9,9 @@
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="string">value</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,15 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.mode_conteneur_actif">
<param hidden="True" type="string">value</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="string">
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="string">value</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_val" target="creole.general.master.slave1">
<param hidden="True" name="valeur" type="string">valfill</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -31,6 +27,9 @@
<property>hidden</property>
<property>normal</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property>
<value name="calc_val" type="calculation">
<param hidden="True" name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="slave2" multi="True" name="slave2" type="string">
<property>normal</property>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="concat" target="creole.general.mode_conteneur_actif">
<param hidden="True" name="valeur" type="string">non</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="concat" type="calculation">
<param hidden="True" name="valeur" type="string">non</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="concat" target="creole.general.mode_conteneur_actif">
<param hidden="True" name="valeur" type="string">non</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -13,6 +9,9 @@
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value name="concat" type="calculation">
<param hidden="True" name="valeur" type="string">non</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="concat" target="creole.general.mode_conteneur_actif">
<param hidden="True" name="valeur" type="string">non</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="concat" type="calculation">
<param hidden="True" name="valeur" type="string">non</param>
</value>
</variable>
</family>
<separators/>

View file

@ -1,10 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="concat" target="creole.general.mode_conteneur_actif">
<param hidden="True" name="valeur" type="string">non</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
@ -16,6 +12,9 @@
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="concat" type="calculation">
<param hidden="True" name="valeur" type="string">non</param>
</value>
</variable>
</family>
<separators/>

View file

@ -57,11 +57,7 @@
</variable>
</family>
</family>
<constraints>
<fill name="calc_val" target="extra.test.calc_url">
<param hidden="True" type="string">http://localhost/</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>normal</property>
@ -91,6 +87,9 @@
<property>frozen</property>
<property>hidden</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param hidden="True" type="string">http://localhost/</param>
</value>
</variable>
</family>
</family>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_multi_condition" target="extra.ejabberd.day">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>normal</property>
@ -49,6 +42,12 @@
<choice type="string">monthly</choice>
<property>mandatory</property>
<property>normal</property>
<value name="calc_multi_condition" type="calculation">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</value>
</variable>
<variable doc="mode" multi="False" name="mode" type="choice">
<choice type="string">pre</choice>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_multi_condition" target="extra.ejabberd.day">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>normal</property>
@ -49,6 +42,12 @@
<choice type="string">monthly</choice>
<property>mandatory</property>
<property>normal</property>
<value name="calc_multi_condition" type="calculation">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</value>
</variable>
<variable doc="mode" multi="False" name="mode" type="choice">
<choice type="string">pre</choice>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_multi_condition" target="extra.ejabberd.day">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>normal</property>
@ -49,6 +42,12 @@
<choice type="string">monthly</choice>
<property>mandatory</property>
<property>normal</property>
<value name="calc_multi_condition" type="calculation">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</value>
</variable>
<variable doc="mode" multi="False" name="mode" type="choice">
<choice type="string">pre</choice>

View file

@ -1,13 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="calc_multi_condition" target="extra.ejabberd.day">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</fill>
</constraints>
<constraints/>
<family doc="" name="creole">
<family doc="général" name="general">
<property>normal</property>
@ -52,6 +45,12 @@
<choice type="string">monthly</choice>
<property>mandatory</property>
<property>normal</property>
<value name="calc_multi_condition" type="calculation">
<param hidden="True" type="string">non</param>
<param hidden="False" name="condition_1" type="eole">creole.general.activer_ejabberd</param>
<param hidden="True" name="match" type="string">none</param>
<param hidden="True" name="mismatch" type="string">daily</param>
</value>
</variable>
<variable doc="mode" multi="False" name="mode" type="choice">
<choice type="string">pre</choice>

View file

@ -1,18 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<constraints>
<fill name="cdrom_minormajor" target="containers.container0.disknods.disknod0.minor">
<param hidden="True" type="string">minor</param>
<param hidden="True" type="string">/etc/mailname'</param>
</fill>
<fill name="cdrom_minormajor" target="containers.container0.disknods.disknod0.major">
<param hidden="True" type="string">major</param>
<param hidden="True" type="string">/etc/mailname'</param>
</fill>
<fill name="device_type" target="containers.container0.disknods.disknod0.type">
<param hidden="True" type="string">/etc/mailname'</param>
</fill>
</constraints>
<constraints/>
<family name="containers">
<family name="container0" doc="test">
<family doc="disknods" name="disknods">
@ -21,11 +9,19 @@
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<value name="cdrom_minormajor" type="calculation">
<param hidden="True" type="string">major</param>
<param hidden="True" type="string">/etc/mailname'</param>
</value>
</variable>
<variable doc="" multi="False" name="minor" type="number">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<value name="cdrom_minormajor" type="calculation">
<param hidden="True" type="string">minor</param>
<param hidden="True" type="string">/etc/mailname'</param>
</value>
</variable>
<variable doc="" multi="False" name="mode" type="string">
<value>rwm</value>
@ -40,6 +36,9 @@
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<value name="device_type" type="calculation">
<param hidden="True" type="string">/etc/mailname'</param>
</value>
</variable>
</family>
</family>

View file

@ -30,7 +30,7 @@ for test in listdir(dico_dirs):
excludes = set([])
test_ok -= excludes
test_raise -= excludes
# test_ok = ['70container_serviceaccesslist_servicelist']
# test_ok = ['10autosave_hidden']
# test_raise = []
@ -85,7 +85,7 @@ def launch_flattener(test_dir):
eolobj.save(destfile)
result_file = join(test_dir, 'result/00-base.xml')
if isfile(result_file):
# eolobj.save(result_file)
eolobj.save(result_file)
compare_xml(destfile, result_file)