group in extra

This commit is contained in:
Emmanuel Garette 2019-12-22 15:49:21 +01:00
parent 509bf21d08
commit 2207537b64
8 changed files with 184 additions and 1 deletions

View File

@ -318,7 +318,7 @@ class CreoleTemplateEngine:
for idx, suboption in enumerate(variable.list('all')):
if idx == 0:
leader = CreoleLeader(suboption.value.get())
leader_name = suboption.value.name()
leader_name = suboption.option.name()
else:
leader.add_slave(config,
suboption.option.name(),

View File

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<containers>
<container name='test' id='23'>
<file name='/etc/mailname'/>
</container>
</containers>
<variables>
<family name="général">
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True">
<value>non</value>
</variable>
<variable name="activer_ejabberd" type="oui/non" description="No change" hidden="True">
<value>non</value>
</variable>
</family>
<separators/>
</variables>
</creole>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<variables>
<family name='ejabberd'>
<variable name="description" type="string" multi="True">
<value>test</value>
</variable>
<variable name="mode" type="string" multi="True">
<value>pre</value>
</variable>
</family>
</variables>
<constraints>
<group master="extra.ejabberd.description">
<slave>mode</slave>
</group>
</constraints>
</creole>

View File

@ -0,0 +1 @@
{"containers.container0.files.file0.mkdir": false, "containers.container0.files.file0.name": "/etc/mailname", "containers.container0.files.file0.rm": false, "containers.container0.files.file0.source": "mailname", "containers.container0.files.file0.activate": true, "extra.ejabberd.description.description": ["test"], "extra.ejabberd.description.mode": ["pre"]}

View File

@ -0,0 +1,70 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<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>
<leader doc="description" name="description">
<property>normal</property>
<variable doc="description" multi="True" name="description" type="string">
<property>mandatory</property>
<value>test</value>
</variable>
<variable doc="mode" multi="True" name="mode" type="string">
<property>mandatory</property>
<property>normal</property>
<value>pre</value>
</variable>
</leader>
</family>
</family>
</creole>

View File

@ -0,0 +1,70 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<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>
<leader doc="description" name="description">
<property>normal</property>
<variable doc="description" multi="True" name="description" type="string">
<property>mandatory</property>
<value>test</value>
</variable>
<variable doc="mode" multi="True" name="mode" type="string">
<property>mandatory</property>
<property>normal</property>
<value>pre</value>
</variable>
</leader>
</family>
</family>
</creole>

View File

@ -0,0 +1 @@
pre

View File

@ -0,0 +1,3 @@
%for %%description in %%extra.ejabberd.description
%%description.mode
%end for