refactoring
This commit is contained in:
@ -1,84 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
<family name="containers">
|
||||
<family name="container0" doc="test">
|
||||
<family doc="files" name="files">
|
||||
<family doc="file0" name="file0">
|
||||
<variable doc="" multi="False" name="mkdir" type="boolean">
|
||||
<value>False</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="name" type="string">
|
||||
<value>/etc/mailname</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="rm" type="boolean">
|
||||
<value>False</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="source" type="string">
|
||||
<value>mailname</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="activate" type="boolean">
|
||||
<value>True</value>
|
||||
</variable>
|
||||
</family>
|
||||
</family>
|
||||
<property>basic</property>
|
||||
</family>
|
||||
</family>
|
||||
<family doc="" name="creole">
|
||||
<family doc="général" name="general">
|
||||
<property>normal</property>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
|
||||
<choice type="string">oui</choice>
|
||||
<choice type="string">non</choice>
|
||||
<property>force_default_on_freeze</property>
|
||||
<property>frozen</property>
|
||||
<property>hidden</property>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value type="string">non</value>
|
||||
</variable>
|
||||
<variable doc="No change" multi="False" name="activer_ejabberd" type="choice">
|
||||
<choice type="string">oui</choice>
|
||||
<choice type="string">non</choice>
|
||||
<property>force_default_on_freeze</property>
|
||||
<property>frozen</property>
|
||||
<property>hidden</property>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value type="string">non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
<family doc="" name="extra">
|
||||
<family doc="ejabberd" name="ejabberd">
|
||||
<property>normal</property>
|
||||
<variable doc="description" multi="False" name="description" type="string">
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value>Exportation de la base de ejabberd</value>
|
||||
</variable>
|
||||
<variable doc="day" multi="False" name="day" type="choice">
|
||||
<choice type="string">none</choice>
|
||||
<choice type="string">daily</choice>
|
||||
<choice type="string">weekly</choice>
|
||||
<choice type="string">monthly</choice>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value name="calc_multi_condition" type="calculation">
|
||||
<param transitive="False" type="string">non</param>
|
||||
<param name="condition_1" type="variable">creole.general.activer_ejabberd</param>
|
||||
<param name="match" transitive="False" type="string">none</param>
|
||||
<param name="mismatch" transitive="False" type="string">daily</param>
|
||||
</value>
|
||||
</variable>
|
||||
<variable doc="mode" multi="False" name="mode" type="choice">
|
||||
<choice type="string">pre</choice>
|
||||
<choice type="string">post</choice>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value type="string">pre</value>
|
||||
</variable>
|
||||
</family>
|
||||
</family>
|
||||
</rougail>
|
@ -1 +0,0 @@
|
||||
Exportation de la base de ejabberd
|
@ -1 +0,0 @@
|
||||
%%extra.ejabberd.description
|
0
tests/flattener_dicos/60extra_help/__init__.py
Normal file
0
tests/flattener_dicos/60extra_help/__init__.py
Normal file
@ -15,7 +15,7 @@
|
||||
<constraints>
|
||||
<fill name='calc_multi_condition' target='extra.ejabberd.day'>
|
||||
<param>non</param>
|
||||
<param type='variable' name='condition_1' hidden='False'>activer_ejabberd</param>
|
||||
<param type='variable' name='condition_1' notraisepropertyerror='True'>activer_ejabberd</param>
|
||||
<param name='match'>none</param>
|
||||
<param name='mismatch'>daily</param>
|
||||
</fill>
|
||||
|
@ -6,25 +6,25 @@
|
||||
<family name="files" doc="files">
|
||||
<family doc="mailname" name="mailname">
|
||||
<variable doc="group" multi="False" name="group" type="string">
|
||||
<value>root</value>
|
||||
<value type="string">root</value>
|
||||
</variable>
|
||||
<variable doc="mode" multi="False" name="mode" type="string">
|
||||
<value>0644</value>
|
||||
<value type="string">0644</value>
|
||||
</variable>
|
||||
<variable doc="name" multi="False" name="name" type="string">
|
||||
<value>/etc/mailname</value>
|
||||
<value type="string">/etc/mailname</value>
|
||||
</variable>
|
||||
<variable doc="owner" multi="False" name="owner" type="string">
|
||||
<value>root</value>
|
||||
<value type="string">root</value>
|
||||
</variable>
|
||||
<variable doc="source" multi="False" name="source" type="string">
|
||||
<value>mailname</value>
|
||||
<value type="string">mailname</value>
|
||||
</variable>
|
||||
<variable doc="templating" multi="False" name="templating" type="boolean">
|
||||
<value>True</value>
|
||||
<value type="boolean">True</value>
|
||||
</variable>
|
||||
<variable doc="activate" multi="False" name="activate" type="boolean">
|
||||
<value>True</value>
|
||||
<value type="boolean">True</value>
|
||||
</variable>
|
||||
</family>
|
||||
</family>
|
||||
@ -61,7 +61,7 @@
|
||||
<variable doc="description" multi="False" name="description" type="string">
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value>Exportation de la base de ejabberd</value>
|
||||
<value type="string">Exportation de la base de ejabberd</value>
|
||||
</variable>
|
||||
<variable doc="day" help="Test help" multi="False" name="day" type="choice">
|
||||
<choice type="string">none</choice>
|
||||
@ -71,10 +71,10 @@
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value name="calc_multi_condition" type="calculation">
|
||||
<param transitive="False" type="string">non</param>
|
||||
<param name="condition_1" type="variable">rougail.general.activer_ejabberd</param>
|
||||
<param name="match" transitive="False" type="string">none</param>
|
||||
<param name="mismatch" transitive="False" type="string">daily</param>
|
||||
<param type="string">non</param>
|
||||
<param name="condition_1" notraisepropertyerror="True" type="variable">rougail.general.activer_ejabberd</param>
|
||||
<param name="match" type="string">none</param>
|
||||
<param name="mismatch" type="string">daily</param>
|
||||
</value>
|
||||
</variable>
|
||||
<variable doc="mode" multi="False" name="mode" type="choice">
|
||||
|
26
tests/flattener_dicos/60extra_help/tiramisu/base.py
Normal file
26
tests/flattener_dicos/60extra_help/tiramisu/base.py
Normal file
@ -0,0 +1,26 @@
|
||||
from tiramisu import *
|
||||
from rougail.tiramisu import ConvertDynOptionDescription
|
||||
import imp
|
||||
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
|
||||
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non'))
|
||||
option_4 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='activer_ejabberd', default='non', values=('oui', 'non'))
|
||||
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3, option_4])
|
||||
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2])
|
||||
option_9 = StrOption(properties=frozenset([]), doc='group', multi=False, name='group', default='root')
|
||||
option_10 = StrOption(properties=frozenset([]), doc='mode', multi=False, name='mode', default='0644')
|
||||
option_11 = StrOption(properties=frozenset([]), doc='name', multi=False, name='name', default='/etc/mailname')
|
||||
option_12 = StrOption(properties=frozenset([]), doc='owner', multi=False, name='owner', default='root')
|
||||
option_13 = StrOption(properties=frozenset([]), doc='source', multi=False, name='source', default='mailname')
|
||||
option_14 = BoolOption(default=True, properties=frozenset([]), doc='templating', multi=False, name='templating')
|
||||
option_15 = BoolOption(default=True, properties=frozenset([]), doc='activate', multi=False, name='activate')
|
||||
option_8 = OptionDescription(doc='mailname', name='mailname', children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15])
|
||||
option_7 = OptionDescription(name='files', doc='files', children=[option_8])
|
||||
option_6 = OptionDescription(doc='test', name='test', children=[option_7])
|
||||
option_5 = OptionDescription(name='services', doc='services', properties=frozenset(['hidden']), children=[option_6])
|
||||
option_18 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='description', multi=False, name='description', default='Exportation de la base de ejabberd')
|
||||
option_19 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='day', multi=False, name='day', default=Calculation(func.calc_multi_condition, Params((ParamValue("non")), kwargs={'condition_1': ParamOption(option_4, notraisepropertyerror=True, todict=False), 'match': ParamValue("none"), 'mismatch': ParamValue("daily")})), values=('none', 'daily', 'weekly', 'monthly'))
|
||||
option_19.impl_set_information("help", "Test help")
|
||||
option_20 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='mode', multi=False, name='mode', default='pre', values=('pre', 'post'))
|
||||
option_17 = OptionDescription(doc='ejabberd', name='ejabberd', properties=frozenset(['normal']), children=[option_18, option_19, option_20])
|
||||
option_16 = OptionDescription(doc='extra', name='extra', children=[option_17])
|
||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_5, option_16])
|
Reference in New Issue
Block a user