merge flattener_dico and templates in tests
This commit is contained in:
22
tests/dictionaries/60familyaction_mandatory/00-base.xml
Normal file
22
tests/dictionaries/60familyaction_mandatory/00-base.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
|
||||
<services/>
|
||||
|
||||
<variables>
|
||||
<family name="général">
|
||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help/>
|
||||
|
||||
</rougail>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<rougail>
|
||||
|
||||
<files/>
|
||||
<containers/>
|
||||
|
||||
<variables>
|
||||
<family name='général'>
|
||||
<variable name='mode_conteneur_actif' type='oui/non' description="No change" hidden="True">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
</constraints>
|
||||
|
||||
<help/>
|
||||
|
||||
</rougail>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1,26 @@
|
||||
<creole>
|
||||
<family_action name="systeme"
|
||||
description="Liste des actions pour gérer le système EOLE"
|
||||
color="#ddc9e6"
|
||||
image="system.svg">
|
||||
<action type="form"
|
||||
title="Reconfigure"
|
||||
description="Reconfigurer le serveur"
|
||||
image="backup.svg">
|
||||
<input>Reconfigurer</input>
|
||||
<profile>ead_admin</profile>
|
||||
<ewtapp>ead</ewtapp>
|
||||
<tag>reconfigure</tag>
|
||||
</action>
|
||||
</family_action>
|
||||
<variables>
|
||||
<family name="test">
|
||||
<variable name="delay" type="number" description="délai en minutes avant lancement">
|
||||
<value>0</value>
|
||||
</variable>
|
||||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
</constraints>
|
||||
<help/>
|
||||
</creole>
|
@ -0,0 +1,154 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
<family name="actions" hidden="False" doc="actions">
|
||||
<family hidden="False" doc="systeme" name="systeme">
|
||||
<family doc="" hidden="False" name="action0">
|
||||
<variable doc="" multi="False" name="description" type="string">
|
||||
<value>Reconfigurer le serveur</value>
|
||||
</variable>
|
||||
<variable doc="" multi="True" name="ewtapp" type="string">
|
||||
<value>ead</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="image" type="string">
|
||||
<value>backup.svg</value>
|
||||
</variable>
|
||||
<variable doc="" multi="True" name="input" type="string">
|
||||
<value>Reconfigurer</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="name" type="string">
|
||||
<value>extra</value>
|
||||
</variable>
|
||||
<variable doc="" multi="True" name="profile" type="string">
|
||||
<value>ead_admin</value>
|
||||
</variable>
|
||||
<variable doc="" multi="True" name="tag" type="string">
|
||||
<value>reconfigure</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="title" type="string">
|
||||
<value>Reconfigure</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="type" type="choice">
|
||||
<choice>form</choice>
|
||||
<choice>custom</choice>
|
||||
<choice>external</choice>
|
||||
<value>form</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="activate" type="boolean">
|
||||
<value>True</value>
|
||||
</variable>
|
||||
</family>
|
||||
<variable doc="" multi="False" name="name" type="string">
|
||||
<value>systeme</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="color" type="string">
|
||||
<value>#ddc9e6</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="image" type="string">
|
||||
<value>system.svg</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="description" type="string">
|
||||
<value>Liste des actions pour gérer le système EOLE</value>
|
||||
</variable>
|
||||
</family>
|
||||
</family>
|
||||
<constraints/>
|
||||
<family name="containers">
|
||||
<family name="containers">
|
||||
<family name="container0" doc="" hidden="False">
|
||||
<variable doc="" multi="False" name="group" type="string">
|
||||
<value>root</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="name" type="string">
|
||||
<value>root</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="container_group" type="string">
|
||||
<value>root</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="real_container" type="string">
|
||||
<value>root</value>
|
||||
</variable>
|
||||
<variable doc="" multi="False" name="id" type="number">
|
||||
<value>1</value>
|
||||
</variable>
|
||||
<variable multi="False" name="ip" opt="creole.containers.container_ip_root" type="symlink"/>
|
||||
<variable multi="False" name="path" opt="creole.containers.container_path_root" type="symlink"/>
|
||||
</family>
|
||||
</family>
|
||||
<family doc="" hidden="False" name="network">
|
||||
<variable multi="False" name="adresse_ip_br0" opt="creole.containers.adresse_ip_br0" type="symlink">
|
||||
<property>expert</property>
|
||||
</variable>
|
||||
<variable multi="False" name="adresse_netmask_br0" opt="creole.containers.adresse_netmask_br0" type="symlink">
|
||||
<property>expert</property>
|
||||
</variable>
|
||||
<variable multi="False" name="adresse_network_br0" opt="creole.containers.adresse_network_br0" type="symlink">
|
||||
<property>expert</property>
|
||||
</variable>
|
||||
<variable multi="False" name="adresse_broadcast_br0" opt="creole.containers.adresse_broadcast_br0" type="symlink">
|
||||
<property>expert</property>
|
||||
</variable>
|
||||
</family>
|
||||
<family doc="" hidden="False" name="services"/>
|
||||
<family doc="" hidden="False" name="service_accesss"/>
|
||||
<family doc="" hidden="False" name="service_restrictions"/>
|
||||
<family doc="" hidden="False" name="interfaces"/>
|
||||
<family doc="" hidden="False" name="packages"/>
|
||||
<family doc="" hidden="False" name="files"/>
|
||||
<family doc="" hidden="False" name="disknods"/>
|
||||
<family doc="" hidden="False" name="hosts"/>
|
||||
<family doc="" hidden="False" name="fstabs"/>
|
||||
</family>
|
||||
<help/>
|
||||
<family doc="" name="creole">
|
||||
<family doc="Containers informations" hidden="True" icon="puzzle-piece" mode="normal" name="containers">
|
||||
<variable doc="Bridge IP address" multi="False" name="adresse_ip_br0" type="string">
|
||||
<value>127.0.0.1</value>
|
||||
</variable>
|
||||
<variable doc="Bridge IP subnet mask" multi="False" name="adresse_netmask_br0" type="string">
|
||||
<value>255.0.0.0</value>
|
||||
</variable>
|
||||
<variable doc="Bridge IP network_br0 address" multi="False" name="adresse_network_br0" type="string">
|
||||
<value>127.0.0.0</value>
|
||||
</variable>
|
||||
<variable doc="Bridge broadcast IP address" multi="False" name="adresse_broadcast_br0" type="string">
|
||||
<value>127.255.255.255</value>
|
||||
</variable>
|
||||
<variable doc="Path of container root" multi="False" name="container_path_root" type="string">
|
||||
<value></value>
|
||||
</variable>
|
||||
<variable doc="IP address of container root" multi="False" name="container_ip_root" type="string">
|
||||
<value>127.0.0.1</value>
|
||||
</variable>
|
||||
<variable doc="Group name of container root" multi="False" name="container_name_root" type="string">
|
||||
<value>root</value>
|
||||
</variable>
|
||||
<variable doc="Path of container root" multi="False" name="adresse_ip_root" type="string">
|
||||
<property>force_default_on_freeze</property>
|
||||
<property>frozen</property>
|
||||
<value>localhost</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family hidden="False" mode="basic" doc="général" name="general">
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
|
||||
<choice>oui</choice>
|
||||
<choice>non</choice>
|
||||
<property>force_default_on_freeze</property>
|
||||
<property>frozen</property>
|
||||
<property>hidden</property>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value>non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
<family doc="" name="extra">
|
||||
<family hidden="False" mode="basic" doc="test" name="test">
|
||||
<variable doc="délai en minutes avant lancement" multi="False" name="delay" type="number">
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value>0</value>
|
||||
</variable>
|
||||
</family>
|
||||
</family>
|
||||
</rougail>
|
@ -0,0 +1,13 @@
|
||||
<rougail>
|
||||
<variables>
|
||||
<family name="test">
|
||||
<variable name="delay" type="number" description="délai en minutes avant lancement">
|
||||
<value>0</value>
|
||||
</variable>
|
||||
<variable name="day" type="number" description="day avant lancement" mandatory="True"/>
|
||||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
</constraints>
|
||||
<help/>
|
||||
</rougail>
|
@ -0,0 +1 @@
|
||||
{"rougail.general.mode_conteneur_actif": "non", "extra.test.delay": 0, "extra.test.day": null}
|
12
tests/dictionaries/60familyaction_mandatory/tiramisu/base.py
Normal file
12
tests/dictionaries/60familyaction_mandatory/tiramisu/base.py
Normal file
@ -0,0 +1,12 @@
|
||||
from tiramisu import *
|
||||
from rougail.tiramisu import ConvertDynOptionDescription
|
||||
import imp
|
||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||
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_6 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='delay', doc='délai en minutes avant lancement', multi=False, default=0)
|
||||
option_7 = IntOption(properties=frozenset({'basic', 'mandatory'}), name='day', doc='day avant lancement', multi=False)
|
||||
option_5 = OptionDescription(name='test', doc='test', properties=frozenset({'basic'}), children=[option_6, option_7])
|
||||
option_4 = OptionDescription(name='extra', doc='extra', children=[option_5])
|
||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_4])
|
Reference in New Issue
Block a user