diff --git a/creole/annotator.py b/creole/annotator.py
index 12415f1..dc7c3c5 100644
--- a/creole/annotator.py
+++ b/creole/annotator.py
@@ -52,7 +52,8 @@ modes = mode_factory()
# a CreoleObjSpace's attribute has some annotations
# that shall not be present in the exported (flatened) XML
ERASED_ATTRIBUTES = ('redefine', 'exists', 'fallback', 'optional', 'remove_check', 'namespace',
- 'remove_condition', 'path', 'instance_mode', 'index', 'is_in_leadership') # , '_real_container')
+ 'remove_condition', 'path', 'instance_mode', 'index', 'is_in_leadership',
+ 'level') # , '_real_container')
ERASED_CONTAINER_ATTRIBUTES = ('id', 'container', 'group_id', 'group', 'container_group')
NOT_NEED_ACTIVATE = ('disknod',)
@@ -1036,13 +1037,11 @@ class SpaceAnnotator(object):
else:
check.warnings_only = False
check.level = None
- transitive = True
if hasattr(check, 'param'):
for param in check.param:
if not param.hidden is True:
- transitive = False
+ check.transitive = False
param.hidden = None
- check.transitive = transitive
if not self.space.constraints.check:
del self.space.constraints.check
@@ -1054,7 +1053,6 @@ class SpaceAnnotator(object):
for check in self.space.constraints.check:
variable = self.paths.get_variable_obj(check.target)
check_ = self.objectspace.check()
- check_.type = 'calculation'
name = check.name
if name == 'valid_differ':
name = 'valid_not_equal'
@@ -1077,7 +1075,6 @@ class SpaceAnnotator(object):
raise CreoleLoaderError(_('{} must have {} param').format(name, params_len))
check_.name = name
check_.warnings_only = check.warnings_only
- check_.transitive = check.transitive
if hasattr(check, 'param'):
check_.param = check.param
if not hasattr(variable, 'check'):
@@ -1160,6 +1157,10 @@ class SpaceAnnotator(object):
value.type = 'calculation'
value.name = fill.name
if hasattr(fill, 'param'):
+ for param in fill.param:
+ if param.hidden is True:
+ param.transitive = False
+ param.hidden = None
value.param = fill.param
if not hasattr(variable, 'value'):
variable.value = []
diff --git a/creole/loader.py b/creole/loader.py
index 7fee10f..3c9af24 100644
--- a/creole/loader.py
+++ b/creole/loader.py
@@ -81,14 +81,10 @@ CONVERT_OPTION = {'number': dict(opttype=IntOption),
'hostname_strict': 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) # FIXME YO
+ 'mac': dict(opttype=MACOption)
}
-# FIXME help
-REMOVED_ATTRIB = ['path', 'type']
-
-
class Elt(object):
def __init__(self, attrib):
self.attrib = attrib
@@ -215,7 +211,7 @@ class PopulateTiramisuObjects(object):
subpath = self._build_path(subpath, child)
for c in child:
self._iter_family(c, family, subpath=subpath)
- if child.tag == 'leader':
+ elif child.tag == 'leader':
leader = self._iter_leader(child, subpath)
family.add(leader)
elif child.tag == 'separators':
@@ -235,6 +231,8 @@ class PopulateTiramisuObjects(object):
family.add(variable)
elif child.tag == 'property':
self._parse_properties(family, child)
+ else:
+ raise Exception('unknown tag {}'.format(child.tag))
def _parse_properties(self, family, child):
if child.get('type') == 'calculation':
@@ -302,14 +300,6 @@ class ElementStorage:
elt = self.get(path)
elt.add_information(name, information)
- def add_consistency(self, path, consistence, variables, warnings_only, transitive):
- elt = self.get(path)
- elt.add_consistency(consistence, variables, warnings_only, transitive)
-
- def add_requires(self, path, requires):
- elt = self.get(path)
- elt.add_requires(requires)
-
def get(self, path):
if path not in self.paths:
raise CreoleLoaderError(_('there is no element for path {}').format(path))
@@ -337,17 +327,11 @@ class Variable(Common):
self.option = None
self.informations = {}
self.attrib = {}
- self.requires = []
- self.consistencies = []
self.attrib['properties'] = []
+ self.attrib['validators'] = []
self.eosfunc = eosfunc
self.storage = storage
for key, value in elt.attrib.items():
- if key in REMOVED_ATTRIB:
- continue
- #if key != 'name':
- # value = unicode(value)
-
if key in booleans:
if value == 'True':
value = True
@@ -357,6 +341,8 @@ class Variable(Common):
raise CreoleLoaderError(_('unknown value {} for {}').format(value, key))
if key == 'help':
self.add_information(key, value)
+ elif key == 'type':
+ pass
else:
self.attrib[key] = value
convert_option = CONVERT_OPTION[elt.attrib['type']]
@@ -393,7 +379,7 @@ class Variable(Common):
params = []
for param in child:
params.append(self.parse_param(param))
- self.attrib['default'] = (child.attrib['name'], params)
+ self.attrib['default'] = (child.attrib['name'], params, False)
else:
if "type" in child.attrib:
type_ = CONVERT_OPTION[child.attrib['type']]['opttype']
@@ -417,6 +403,17 @@ class Variable(Common):
self.attrib['default_multi'] = value
else:
self.attrib['default'] = value
+ elif child.tag == 'choice':
+ # already load
+ pass
+ elif child.tag == 'check':
+ params = []
+ for param in child:
+ params.append(self.parse_param(param))
+ #check.params = params
+ self.attrib['validators'].append((child.attrib['name'], params, child.attrib['warnings_only']))
+ else:
+ raise Exception('unknown tag {}'.format(child.tag))
if 'initkwargs' in convert_option:
self.attrib.update(convert_option['initkwargs'])
if elt.attrib['type'] == 'symlink':
@@ -429,14 +426,14 @@ class Variable(Common):
if param.attrib['type'] == 'string':
value = param.text
elif param.attrib['type'] == 'eole':
- hidden = param.attrib['hidden']
- if hidden == 'True':
- hidden = False
- elif hidden == 'False':
- hidden = True
+ transitive = param.attrib.get('transitive', 'False')
+ if transitive == 'True':
+ transitive = True
+ elif transitive == 'False':
+ transitive = False
else:
- raise CreoleLoaderError(_('unknown hidden boolean {}').format(hidden))
- value = [param.text, hidden]
+ raise CreoleLoaderError(_('unknown transitive boolean {}').format(transitive))
+ value = [param.text, transitive]
elif param.attrib['type'] == 'number':
value = int(param.text)
else:
@@ -448,68 +445,40 @@ class Variable(Common):
raise CreoleLoaderError(_('key already exists in information {}').format(key))
self.informations[key] = value
- def add_requires(self, requires):
- self.requires.extend(requires)
+ def build_calculator(self, key):
+ if key in self.attrib:
+ values = self.attrib[key]
+ if isinstance(values, list):
+ is_list = True
+ else:
+ is_list = False
+ values = [values]
+ ret = []
+ for value in values:
+ if isinstance(value, tuple):
+ args = []
+ kwargs = {}
+ if len(value) == 3:
+ for param in value[1]:
+ if isinstance(param[1], list):
+ param_value = ParamOption(self.storage.get(param[1][0]).get(), notraisepropertyerror=param[1][1])
+ else:
+ param_value = ParamValue(param[1])
+ if not param[0]:
+ args.append(param_value)
+ else:
+ kwargs[param[0]] = param_value
- def add_consistency(self, consistence, variables, warnings_only, transitive):
- self.consistencies.append((consistence, variables, warnings_only, transitive))
+ ret.append(Calculation(getattr(self.eosfunc, value[0]),
+ Params(tuple(args),
+ kwargs=kwargs)))
+ else:
+ ret.append(value)
+ if not is_list:
+ self.attrib[key] = ret[0]
+ else:
+ self.attrib[key] = ret
- def build_params(self, params):
- if params != None:
- new_params = Params()
- for key, values in params.items():
- new_values = []
- for value in values:
- if isinstance(value, list):
- # retrieve object
- value = ParamOption(value[0].get(), value[1])
- elif value == (None,):
- value = ParamContext()
- else:
- value = ParamValue(value)
- if key == '':
- args = list(new_params.args)
- args.append(value)
- new_params.args = tuple(args)
- else:
- new_params.kwargs[key] = value
- return new_params
- return params
-
- def build_default(self):
- if 'default' in self.attrib:
- default = self.attrib['default']
- if isinstance(default, tuple):
- #('calc_val', [('', ['creole.general.mode_conteneur_actif1', False])])
- args = []
- kwargs = {}
- if len(default) == 2:
- for param in default[1]:
- if isinstance(param[1], list):
- value = ParamOption(self.storage.get(param[1][0]).get(), notraisepropertyerror=param[1][1])
- else:
- value = ParamValue(param[1])
- if not param[0]:
- args.append(value)
- else:
- kwargs[param[0]] = value
-
- self.attrib['default'] = Calculation(getattr(self.eosfunc, default[0]),
- Params(tuple(args),
- kwargs=kwargs))
- #for index, obj in enumerate(self.attrib.get('values', [])):
- # print(obj)
- #if isinstance(prop, tuple):
- # action, kwargs = prop
- # kwargs['condition'] = ParamOption(self.storage.get(kwargs['condition']).get(), todict=True)
- # prop = Calculation(calc_value,
- # Params(action,
- # kwargs=kwargs))
- # self.attrib['properties'][index] = prop
- #if self.attrib['properties']:
- # self.attrib['properties'] = tuple(self.attrib['properties'])
- #else:
- # del self.attrib['properties']
def get(self):
if self.option is None:
@@ -517,19 +486,12 @@ class Variable(Common):
self.attrib['opt'] = self.attrib['opt'].get()
else:
self.build_properties()
- self.build_default()
- #for callback, callback_params in self.callbacks:
- # self.attrib['callback'] = callback
- # self.attrib['callback_params'] = self.build_params(callback_params)
- #for require in self.requires:
- # if isinstance(require['option'], Variable):
- # require['option'] = require['option'].get()
- #if self.requires != []:
- # self.attrib['requires'] = self.requires
- #if self.validator:
- # self.attrib['validator'] = self.validator[0]
- # self.attrib['validator_params'] = self.build_params(self.validator[1])
+ self.build_calculator('default')
+ self.build_calculator('validators')
+ if not self.attrib['validators']:
+ del self.attrib['validators']
try:
+ print(self.attrib)
option = self.object_type(**self.attrib)
except Exception as err:
import traceback
@@ -538,27 +500,12 @@ class Variable(Common):
raise CreoleLoaderError(_('cannot create option {}: {}').format(name, err))
for key, value in self.informations.items():
option.impl_set_information(key, value)
- #for consistency in self.consistencies:
- # options = []
- # for variable in consistency[1]:
- # options.append(variable.get())
- # try:
- # kwargs = {}
- # if consistency[2] == 'True':
- # kwargs['warnings_only'] = True
- # if consistency[3] == 'False':
- # kwargs['transitive'] = False
- # option.impl_add_consistency(consistency[0], *options, **kwargs)
- # except ConfigError as err:
- # name = self.attrib['name']
- # raise CreoleLoaderError(_('cannot load consistency for {}: {}').format(name, err))
self.option = option
return self.option
class Family(Common):
def __init__(self, elt, booleans, storage, force_icon=False):
- self.requires = []
self.option = None
self.attrib = {}
self.is_leader = False
@@ -570,8 +517,6 @@ class Family(Common):
self.storage = storage
self.attrib['properties'] = []
for key, value in elt.attrib.items():
- if key in REMOVED_ATTRIB:
- continue
if key in booleans:
if value == 'True':
value = True
@@ -589,6 +534,8 @@ class Family(Common):
self.attrib['properties'].append(value)
elif key == 'help':
self.add_information(key, value)
+ elif key == 'type':
+ pass
else:
self.attrib[key] = value
if 'doc' not in self.attrib:
@@ -605,19 +552,11 @@ class Family(Common):
def set_leader(self):
self.is_leader = True
- def add_requires(self, requires):
- self.requires.extend(requires)
-
def get(self):
if self.option is None:
self.attrib['children'] = []
for child in self.children:
self.attrib['children'].append(child.get())
- for require in self.requires:
- if isinstance(require['option'], Variable):
- require['option'] = require['option'].get()
- if self.requires != []:
- self.attrib['requires'] = self.requires
self.build_properties()
try:
if not self.is_leader:
diff --git a/tests/eosfunc/test.py b/tests/eosfunc/test.py
index 08e9d35..9aefc58 100644
--- a/tests/eosfunc/test.py
+++ b/tests/eosfunc/test.py
@@ -1,3 +1,5 @@
+from tiramisu import valid_not_equal, valid_ip_netmask
+
def calc_val(*args, **kwargs):
pass
diff --git a/tests/flattener_dicos/01auto_base/result/00-base.xml b/tests/flattener_dicos/01auto_base/result/00-base.xml
index 6544d72..432fdac 100644
--- a/tests/flattener_dicos/01auto_base/result/00-base.xml
+++ b/tests/flattener_dicos/01auto_base/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/01fill_autofreeze/result/00-base.xml b/tests/flattener_dicos/01fill_autofreeze/result/00-base.xml
index 01c6018..8865158 100644
--- a/tests/flattener_dicos/01fill_autofreeze/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_autofreeze/result/00-base.xml
@@ -12,7 +12,7 @@
basic
auto_frozen
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/01fill_autosave/result/00-base.xml b/tests/flattener_dicos/01fill_autosave/result/00-base.xml
index 6c4300d..7febc10 100644
--- a/tests/flattener_dicos/01fill_autosave/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_autosave/result/00-base.xml
@@ -10,7 +10,7 @@
mandatory
basic
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/01fill_base/result/00-base.xml b/tests/flattener_dicos/01fill_base/result/00-base.xml
index 6544d72..432fdac 100644
--- a/tests/flattener_dicos/01fill_base/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_base/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/01fill_baseaccent/result/00-base.xml b/tests/flattener_dicos/01fill_baseaccent/result/00-base.xml
index 6594c91..b8db1c5 100644
--- a/tests/flattener_dicos/01fill_baseaccent/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_baseaccent/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/01fill_mandatory/result/00-base.xml b/tests/flattener_dicos/01fill_mandatory/result/00-base.xml
index f22cd35..da02f1a 100644
--- a/tests/flattener_dicos/01fill_mandatory/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_mandatory/result/00-base.xml
@@ -7,7 +7,7 @@
mandatory
expert
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/01fill_number/result/00-base.xml b/tests/flattener_dicos/01fill_number/result/00-base.xml
index 76bae2a..c3cc42a 100644
--- a/tests/flattener_dicos/01fill_number/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_number/result/00-base.xml
@@ -9,7 +9,7 @@
hidden
normal
- 3
+ 3
diff --git a/tests/flattener_dicos/01fill_optional/result/00-base.xml b/tests/flattener_dicos/01fill_optional/result/00-base.xml
index 6544d72..432fdac 100644
--- a/tests/flattener_dicos/01fill_optional/result/00-base.xml
+++ b/tests/flattener_dicos/01fill_optional/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- creole.general.mode_conteneur_actif1
+ creole.general.mode_conteneur_actif1
diff --git a/tests/flattener_dicos/10autosave_hidden/result/00-base.xml b/tests/flattener_dicos/10autosave_hidden/result/00-base.xml
index 6af1c9d..1e68627 100644
--- a/tests/flattener_dicos/10autosave_hidden/result/00-base.xml
+++ b/tests/flattener_dicos/10autosave_hidden/result/00-base.xml
@@ -19,7 +19,7 @@
hidden
basic
- oui
+ oui
diff --git a/tests/flattener_dicos/10autosave_hidden_frozenifin/result/00-base.xml b/tests/flattener_dicos/10autosave_hidden_frozenifin/result/00-base.xml
index 8835471..7a9264b 100644
--- a/tests/flattener_dicos/10autosave_hidden_frozenifin/result/00-base.xml
+++ b/tests/flattener_dicos/10autosave_hidden_frozenifin/result/00-base.xml
@@ -20,7 +20,7 @@
hidden
force_default_on_freeze
- oui
+ oui
diff --git a/tests/flattener_dicos/10check_base/result/00-base.xml b/tests/flattener_dicos/10check_base/result/00-base.xml
index dbd4abf..e2e286c 100644
--- a/tests/flattener_dicos/10check_base/result/00-base.xml
+++ b/tests/flattener_dicos/10check_base/result/00-base.xml
@@ -9,7 +9,7 @@
b
-
+
0
100
diff --git a/tests/flattener_dicos/10check_option/result/00-base.xml b/tests/flattener_dicos/10check_option/result/00-base.xml
index 3f54476..f65ebd9 100644
--- a/tests/flattener_dicos/10check_option/result/00-base.xml
+++ b/tests/flattener_dicos/10check_option/result/00-base.xml
@@ -14,7 +14,7 @@
100
-
+
0
creole.general.int2
diff --git a/tests/flattener_dicos/10check_optional/result/00-base.xml b/tests/flattener_dicos/10check_optional/result/00-base.xml
index 6c2da63..e664e46 100644
--- a/tests/flattener_dicos/10check_optional/result/00-base.xml
+++ b/tests/flattener_dicos/10check_optional/result/00-base.xml
@@ -9,10 +9,10 @@
b
-
+
creole.general.int2
-
+
normal
diff --git a/tests/flattener_dicos/10check_valid_differ/result/00-base.xml b/tests/flattener_dicos/10check_valid_differ/result/00-base.xml
index 449999a..0e3d62b 100644
--- a/tests/flattener_dicos/10check_valid_differ/result/00-base.xml
+++ b/tests/flattener_dicos/10check_valid_differ/result/00-base.xml
@@ -4,7 +4,7 @@
normal
-
+
creole.general.mode_conteneur_actif1
oui
diff --git a/tests/flattener_dicos/10check_valid_differ_add/result/00-base.xml b/tests/flattener_dicos/10check_valid_differ_add/result/00-base.xml
index 947f6c6..5ef78af 100644
--- a/tests/flattener_dicos/10check_valid_differ_add/result/00-base.xml
+++ b/tests/flattener_dicos/10check_valid_differ_add/result/00-base.xml
@@ -25,16 +25,16 @@
non
-
+
creole.general.mode_conteneur_actif1
-
+
creole.general.mode_conteneur_actif2
-
+
creole.general.mode_conteneur_actif1
-
+
creole.general.mode_conteneur_actif2
mandatory
diff --git a/tests/flattener_dicos/10check_valid_differ_removecheck/result/00-base.xml b/tests/flattener_dicos/10check_valid_differ_removecheck/result/00-base.xml
index f12591c..4c01226 100644
--- a/tests/flattener_dicos/10check_valid_differ_removecheck/result/00-base.xml
+++ b/tests/flattener_dicos/10check_valid_differ_removecheck/result/00-base.xml
@@ -25,10 +25,10 @@
non
-
+
creole.general.mode_conteneur_actif1
-
+
creole.general.mode_conteneur_actif2
mandatory
diff --git a/tests/flattener_dicos/10check_valid_ipnetmask/result/00-base.xml b/tests/flattener_dicos/10check_valid_ipnetmask/result/00-base.xml
index dfdd4d0..3479a38 100644
--- a/tests/flattener_dicos/10check_valid_ipnetmask/result/00-base.xml
+++ b/tests/flattener_dicos/10check_valid_ipnetmask/result/00-base.xml
@@ -15,7 +15,7 @@
basic
-
+
creole.general.adresse_ip_eth0
mandatory
diff --git a/tests/flattener_dicos/10load_frozenifin_auto/result/00-base.xml b/tests/flattener_dicos/10load_frozenifin_auto/result/00-base.xml
index 09ddcfe..34f73d3 100644
--- a/tests/flattener_dicos/10load_frozenifin_auto/result/00-base.xml
+++ b/tests/flattener_dicos/10load_frozenifin_auto/result/00-base.xml
@@ -19,7 +19,7 @@
hidden
force_default_on_freeze
- non
+ non
diff --git a/tests/flattener_dicos/10load_masterslaves/result/00-base.xml b/tests/flattener_dicos/10load_masterslaves/result/00-base.xml
index 787dae2..49f9a7d 100644
--- a/tests/flattener_dicos/10load_masterslaves/result/00-base.xml
+++ b/tests/flattener_dicos/10load_masterslaves/result/00-base.xml
@@ -19,13 +19,13 @@
normal
- valfill
+ valfill
normal
- creole.general1.master.slave1
+ creole.general1.master.slave1
diff --git a/tests/flattener_dicos/10masterslave_autosaveexpert/result/00-base.xml b/tests/flattener_dicos/10masterslave_autosaveexpert/result/00-base.xml
index 1ffed95..de99fb9 100644
--- a/tests/flattener_dicos/10masterslave_autosaveexpert/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslave_autosaveexpert/result/00-base.xml
@@ -16,13 +16,13 @@
normal
- valfill
+ valfill
expert
- creole.general.master.slave1
+ creole.general.master.slave1
diff --git a/tests/flattener_dicos/10masterslave_mandatory/result/00-base.xml b/tests/flattener_dicos/10masterslave_mandatory/result/00-base.xml
index c91d911..869457e 100644
--- a/tests/flattener_dicos/10masterslave_mandatory/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslave_mandatory/result/00-base.xml
@@ -17,13 +17,13 @@
mandatory
normal
- valfill
+ valfill
normal
- creole.general.master.slave1
+ creole.general.master.slave1
diff --git a/tests/flattener_dicos/10masterslave_mastermandatory/result/00-base.xml b/tests/flattener_dicos/10masterslave_mastermandatory/result/00-base.xml
index 6c406af..3038677 100644
--- a/tests/flattener_dicos/10masterslave_mastermandatory/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslave_mastermandatory/result/00-base.xml
@@ -18,13 +18,13 @@
normal
- valfill
+ valfill
normal
- creole.general.master.slave1
+ creole.general.master.slave1
diff --git a/tests/flattener_dicos/10masterslave_multi/result/00-base.xml b/tests/flattener_dicos/10masterslave_multi/result/00-base.xml
index cb83482..1389076 100644
--- a/tests/flattener_dicos/10masterslave_multi/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslave_multi/result/00-base.xml
@@ -19,13 +19,13 @@
normal
- valfill
+ valfill
normal
- creole.general1.master.slave1
+ creole.general1.master.slave1
diff --git a/tests/flattener_dicos/10masterslaves_append/result/00-base.xml b/tests/flattener_dicos/10masterslaves_append/result/00-base.xml
index b3b32e5..0600edf 100644
--- a/tests/flattener_dicos/10masterslaves_append/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslaves_append/result/00-base.xml
@@ -19,13 +19,13 @@
normal
- valfill
+ valfill
normal
- creole.general1.master.slave1
+ creole.general1.master.slave1
diff --git a/tests/flattener_dicos/10masterslaves_auto/result/00-base.xml b/tests/flattener_dicos/10masterslaves_auto/result/00-base.xml
index 9835cc5..8b5f072 100644
--- a/tests/flattener_dicos/10masterslaves_auto/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslaves_auto/result/00-base.xml
@@ -19,7 +19,7 @@
hidden
normal
- valfill
+ valfill
@@ -28,7 +28,7 @@
hidden
normal
- creole.general.master.slave1
+ creole.general.master.slave1
@@ -37,7 +37,7 @@
hidden
normal
- creole.general.master.master
+ creole.general.master.master
diff --git a/tests/flattener_dicos/10masterslaves_automaster/result/00-base.xml b/tests/flattener_dicos/10masterslaves_automaster/result/00-base.xml
index 3aad830..3040e55 100644
--- a/tests/flattener_dicos/10masterslaves_automaster/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslaves_automaster/result/00-base.xml
@@ -19,7 +19,7 @@
hidden
normal
- valfill
+ valfill
@@ -28,7 +28,7 @@
hidden
normal
- creole.general.master.master
+ creole.general.master.master
diff --git a/tests/flattener_dicos/10masterslaves_automaster_expert/result/00-base.xml b/tests/flattener_dicos/10masterslaves_automaster_expert/result/00-base.xml
index a9cdddf..8fba03d 100644
--- a/tests/flattener_dicos/10masterslaves_automaster_expert/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslaves_automaster_expert/result/00-base.xml
@@ -20,7 +20,7 @@
force_default_on_freeze
frozen
- valfill
+ valfill
diff --git a/tests/flattener_dicos/10masterslaves_familyaccent/result/00-base.xml b/tests/flattener_dicos/10masterslaves_familyaccent/result/00-base.xml
index cb98751..f462f37 100644
--- a/tests/flattener_dicos/10masterslaves_familyaccent/result/00-base.xml
+++ b/tests/flattener_dicos/10masterslaves_familyaccent/result/00-base.xml
@@ -16,13 +16,13 @@
normal
- valfill
+ valfill
normal
- creole.general.master.slave1
+ creole.general.master.slave1
diff --git a/tests/flattener_dicos/30mandatory_withoutvaluecalc/result/00-base.xml b/tests/flattener_dicos/30mandatory_withoutvaluecalc/result/00-base.xml
index 49daa39..886d436 100644
--- a/tests/flattener_dicos/30mandatory_withoutvaluecalc/result/00-base.xml
+++ b/tests/flattener_dicos/30mandatory_withoutvaluecalc/result/00-base.xml
@@ -9,7 +9,7 @@
hidden
normal
- value
+ value
diff --git a/tests/flattener_dicos/30mandatory_withvaluecalc/result/00-base.xml b/tests/flattener_dicos/30mandatory_withvaluecalc/result/00-base.xml
index cb7e140..aa279c9 100644
--- a/tests/flattener_dicos/30mandatory_withvaluecalc/result/00-base.xml
+++ b/tests/flattener_dicos/30mandatory_withvaluecalc/result/00-base.xml
@@ -6,7 +6,7 @@
normal
- value
+ value
diff --git a/tests/flattener_dicos/40ifin_masterslavesauto/result/00-base.xml b/tests/flattener_dicos/40ifin_masterslavesauto/result/00-base.xml
index 49c2048..180b37d 100644
--- a/tests/flattener_dicos/40ifin_masterslavesauto/result/00-base.xml
+++ b/tests/flattener_dicos/40ifin_masterslavesauto/result/00-base.xml
@@ -27,7 +27,7 @@
normal
disabled
- valfill
+ valfill
diff --git a/tests/flattener_dicos/51redefine_auto/result/00-base.xml b/tests/flattener_dicos/51redefine_auto/result/00-base.xml
index 24ce203..7361297 100644
--- a/tests/flattener_dicos/51redefine_auto/result/00-base.xml
+++ b/tests/flattener_dicos/51redefine_auto/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- non
+ non
diff --git a/tests/flattener_dicos/51redefine_autofill/result/00-base.xml b/tests/flattener_dicos/51redefine_autofill/result/00-base.xml
index 67ee6f6..41ee99c 100644
--- a/tests/flattener_dicos/51redefine_autofill/result/00-base.xml
+++ b/tests/flattener_dicos/51redefine_autofill/result/00-base.xml
@@ -9,7 +9,7 @@
mandatory
normal
- non
+ non
diff --git a/tests/flattener_dicos/51redefine_fill/result/00-base.xml b/tests/flattener_dicos/51redefine_fill/result/00-base.xml
index 24ce203..7361297 100644
--- a/tests/flattener_dicos/51redefine_fill/result/00-base.xml
+++ b/tests/flattener_dicos/51redefine_fill/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- non
+ non
diff --git a/tests/flattener_dicos/51redefine_fillauto/result/00-base.xml b/tests/flattener_dicos/51redefine_fillauto/result/00-base.xml
index 24ce203..7361297 100644
--- a/tests/flattener_dicos/51redefine_fillauto/result/00-base.xml
+++ b/tests/flattener_dicos/51redefine_fillauto/result/00-base.xml
@@ -12,7 +12,7 @@
mandatory
normal
- non
+ non
diff --git a/tests/flattener_dicos/60action_external/result/00-base.xml b/tests/flattener_dicos/60action_external/result/00-base.xml
index 3159d66..45509c1 100644
--- a/tests/flattener_dicos/60action_external/result/00-base.xml
+++ b/tests/flattener_dicos/60action_external/result/00-base.xml
@@ -87,7 +87,7 @@
hidden
normal
- http://localhost/
+ http://localhost/
diff --git a/tests/flattener_dicos/60extra_help/result/00-base.xml b/tests/flattener_dicos/60extra_help/result/00-base.xml
index 3fb23e9..0f9edc1 100644
--- a/tests/flattener_dicos/60extra_help/result/00-base.xml
+++ b/tests/flattener_dicos/60extra_help/result/00-base.xml
@@ -42,10 +42,10 @@
mandatory
normal
- non
- creole.general.activer_ejabberd
- none
- daily
+ non
+ creole.general.activer_ejabberd
+ none
+ daily
diff --git a/tests/flattener_dicos/60extra_load/result/00-base.xml b/tests/flattener_dicos/60extra_load/result/00-base.xml
index b5eb1cf..36df5d3 100644
--- a/tests/flattener_dicos/60extra_load/result/00-base.xml
+++ b/tests/flattener_dicos/60extra_load/result/00-base.xml
@@ -42,10 +42,10 @@
mandatory
normal
- non
- creole.general.activer_ejabberd
- none
- daily
+ non
+ creole.general.activer_ejabberd
+ none
+ daily
diff --git a/tests/flattener_dicos/60extra_mandatory/result/00-base.xml b/tests/flattener_dicos/60extra_mandatory/result/00-base.xml
index a5b227c..fef7a21 100644
--- a/tests/flattener_dicos/60extra_mandatory/result/00-base.xml
+++ b/tests/flattener_dicos/60extra_mandatory/result/00-base.xml
@@ -42,10 +42,10 @@
mandatory
normal
- non
- creole.general.activer_ejabberd
- none
- daily
+ non
+ creole.general.activer_ejabberd
+ none
+ daily
diff --git a/tests/flattener_dicos/60extra_redefine/result/00-base.xml b/tests/flattener_dicos/60extra_redefine/result/00-base.xml
index 1483a00..05bb6f4 100644
--- a/tests/flattener_dicos/60extra_redefine/result/00-base.xml
+++ b/tests/flattener_dicos/60extra_redefine/result/00-base.xml
@@ -45,10 +45,10 @@
mandatory
normal
- non
- creole.general.activer_ejabberd
- none
- daily
+ non
+ creole.general.activer_ejabberd
+ none
+ daily
diff --git a/tests/flattener_dicos/70container_disknod/result/00-base.xml b/tests/flattener_dicos/70container_disknod/result/00-base.xml
index f8fed41..ec53d3b 100644
--- a/tests/flattener_dicos/70container_disknod/result/00-base.xml
+++ b/tests/flattener_dicos/70container_disknod/result/00-base.xml
@@ -9,8 +9,8 @@
frozen
hidden
- major
- /etc/mailname'
+ major
+ /etc/mailname'
@@ -18,8 +18,8 @@
frozen
hidden
- minor
- /etc/mailname'
+ minor
+ /etc/mailname'
@@ -36,7 +36,7 @@
frozen
hidden
- /etc/mailname'
+ /etc/mailname'
diff --git a/tests/test_flattener.py b/tests/test_flattener.py
index 6e4559e..27bd188 100644
--- a/tests/test_flattener.py
+++ b/tests/test_flattener.py
@@ -30,8 +30,8 @@ for test in listdir(dico_dirs):
excludes = set([])
test_ok -= excludes
test_raise -= excludes
-# test_ok = ['10check_base']
-# test_raise = []
+#test_ok = ['10autosave_hidden']
+#test_raise = []
test_ok = list(test_ok)
@@ -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)