Compare commits

...

3 Commits

Author SHA1 Message Date
Emmanuel Garette b0588768af some correction 2021-02-14 17:48:50 +01:00
Emmanuel Garette c24ef61bff update french documentation 2021-02-14 10:12:42 +01:00
Emmanuel Garette 0abd4398c7 Simply library usage 2021-02-14 10:11:34 +01:00
253 changed files with 683 additions and 516 deletions

View File

@ -1,24 +1,42 @@
# Rougail # Rougail
Rougail est un bibliothèque python3 qui permet de charger des dictionnaires (fichiers au format XML), de charger les variables dans Tiramisu et de générer des templates.
## La bibliothèque
- [Utiliser la bibliothèque](dev/README.md)
- [Personnaliser la configration de la bibliothèque](dev/config.md)
## Les dictionnaires ## Les dictionnaires
FIXME : explications Un dictionnaire est un fichier XML donc la structure est expliqué ci-dessous.
FIXME : extra
## Les variables Un dictionnaire contient en ensemble de variable, utilisable à tout moment, notamment dans des templates.
Il est possible d'avoir plusieurs espace de nom pour classer les variables (appeler aussi "extra") mais il est aussi possible, à l'interieur de ce espace de nom de mettre des familles pour classer les variables.
Les familles et les variables peuvent être défini dans plusieurs dictionnaires. Ces dictionnaires s'aggrège alors. Il est possible de rajouter des familles des variables, des services, des éléments à un service et des contraintes.
Il est également possible de redéfinir des éléments pour changer les comportement d'une variable ou d'un service.
### Les variables
- [Les familles](family/README.md) - [Les familles](family/README.md)
- [Les variables](variable/README.md) - [Les variables](variable/README.md)
## Les services ### Les services
- [La gestion d'un fichier](service/file.md) - [La gestion d'un fichier](service/file.md)
- [La gestion d'un fichier de service systemd](service/override.md) - [La gestion d'un fichier de service systemd](service/override.md)
- [La gestion d'un port](service/port.md) - [La gestion d'un port](service/port.md)
- [La gestion d'une ip](service/ip.md) - [La gestion d'une ip](service/ip.md)
## Les contraintes ### Les contraintes
- [Les calcules automatiques](fill/README.md) - [Les calcules automatiques](fill/README.md)
- [Les vérifications des valeurs](check/README.md) - [Les vérifications des valeurs](check/README.md)
- [Les conditions](condition/README.md) - [Les conditions](condition/README.md)
## Les templates
- Type creole

187
doc/dev/README.md Normal file
View File

@ -0,0 +1,187 @@
# La bibliothèque rougail
Rougail est une bibliothèque simple a utiliser.
Dans les exemples suivant, nous utilisons la configuration par défaut de Rougail. Vous pouvez [personnaliser les répertoires utilisés](config.md).
## Convertisons un dictionnaire en objet tiramisu
Commençons par créer un dictionnaire simple.
Voici un premier dictionnaire /srv/rougail/dictionaries/00-base.xml :
```
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<variables>
<variable name="my_variable">
<value>my_value</value>
</variable>
</variables>
</rougail>
```
Construisons les objets tiramisu :
```
from rougail import RougailConvert
rougail = RougailConvert()
rougail.save('example1.py')
```
Un nouveau fichier 'example1.py' va être créé dans le répertoire local
## Convertisons un dictionnaire et un dictionnaire extra en objet tiramisu
En plus du dictionnaire précédent, créons un dictionnaire extra /srv/rougail/extra_dictionaries/00-base.xml
```
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<variables>
<variable name="my_variable_extra">
<value>my_value_extra</value>
</variable>
</variables>
</rougail>
```
Construisons les objets tiramisu :
```
from rougail import RougailConvert, RougailConfig
RougailConfig['extra_dictionaries']['example'] = ['/srv/rougail/extra_dictionaries/']
rougail = RougailConvert()
rougail.save('example2.py')
```
## Templatisons un template
Nous créons un dictionnaire complémentaire pour ajouter notre template /srv/rougail/dictionaries/00-template.xml :
```
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<services>
<service name="example">
<file name="/etc/example.conf"/>
</service>
</services>
</rougail>
```
Et un template /srv/rougail/templates/example.conf :
```
The value: %%my_variable
The extra value: %%example.my_variable_extra
```
Générons le fichier tiramisu :
```
from rougail import RougailConvert, RougailConfig
RougailConfig['extra_dictionaries']['example'] = ['/srv/rougail/extra_dictionaries/']
rougail = RougailConvert()
rougail.save('example3.py')
```
Créer les répertoires utils pour la templatisation : mkdir /srv/rougail/destinations /srv/rougail/tmp
Générons le template :
```
import asyncio
from tiramisu import Config
from rougail import RougailTemplate
from example3 import option_0
async def template():
config = await Config(option_0)
engine = RougailTemplate(config)
await engine.instance_files()
loop = asyncio.get_event_loop()
loop.run_until_complete(template())
loop.close()
```
Le fichier /srv/rougail/destinations/etc/example.conf est maintenant créé avec le contenu attendu suivant :
```
The value: my_value
The extra value: my_value_extra
```
## Appliquons un patch au template
Il peut être intéressant de réaliser un patch à un template pour corriger un problème spécifique à notre environnement, sans attendre que le mainteneur du template n'est fait la correction.
Testons en créant le patch /srv/rougail/patches/example.conf.patch :
```
--- /srv/rougail/templates/example.conf 2021-02-13 19:41:38.677491087 +0100
+++ tmp/example.conf 2021-02-13 20:12:55.525089820 +0100
@@ -1,3 +1,5 @@
The value: %%my_variable
The extra value: %%example.my_variable_extra
+
+Add by a patch
```
Le patch est bien appliquer sur notre fichier /srv/rougail/destinations/etc/example.conf :
```
The value: my_value
The extra value: my_value_extra
Add by a patch
```
Deux choses importantes à savoir sur les patchs :
- le nom du patch est obligatoire le nom du template source + ".patch"
- la deuxième ligne toujours commencer par "+++ tmp/" + le nom du template source
## Créons une fonction personnalisé
Nous créons un dictionnaire complémentaire pour ajouter un calcul à la variable my_variable_extra dans /srv/rougail/dictionaries/00-fill.xml :
```
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<constraints>
<fill name="return_no">
<target>my_variable</target>
</fill>
</constraints>
</rougail>
```
Puis créons la fonction "return_no" dans /srv/rougail/functions.py :
```
def return_no():
return 'no'
```
Après avoir reconverti les dictionnaires et regénérer le template nous avons donc le contenu du fichier /srv/rougail/destinations/etc/example.conf :
```
The value: no
The extra value: my_value_extra
Add by a patch
```
La valeur de la variable my_variable est bien calculé à partir de la fonction "return_no".

67
doc/dev/config.md Normal file
View File

@ -0,0 +1,67 @@
# Personnalisons la configuration de Rougail
La configuration de rougail se trouve dans l'objet RougailConfig :
```
from rougail import RougailConfig
```
C'est un simple dictionnaire python avec différentes clefs.
Pour modifier il suffit de faire :
```
RougailConfig[key] = value
```
## Les répertoires des dictionnaires
Il existe deux types de répertoires de dictionnaires :
- les dictionnaires principaux avec la clef "dictionaries_dir". La valeur par défaut est ['/srv/rougail/dictionaries']. Cette variable doit contenir la liste des répertoires contenants des dictionnaires.
Les dictionnaires sont chargés dans l'ordre des répertoires. Chaque répertoire est chargé les uns après les autres. A l'intérieur de ces répertoires les fichiers XML seront classés par ordre alphabétique.
Il n'y a pas de classement par ordre alphabétique de l'ensemble des fichiers XML de tous les répertoires.
Les familles et variable de ces dictionnaires sont classés, par défaut, dans l'espace de nom "rougail". Il est possible de changer le nom de cet espace de nom avec la clef "variable_namespace".
- les dictionnaires extra avec la clef "extra_dictionaries". La valeur est un dictionnaire avec l'ensemble des espaces de nom de extra. La clef étant l'espace de nom et la valeur étant une liste de répertoire.
Par exemple pour ajouter l'extra "example" il faut faire :
```
RougailConfig['extra_dictionaries']['example'] = ['/dir1', '/dir2']
```
Les dictionnaires sont chargés dans le même ordre que les dictionnaires principaux.
## La DTD
Rougail a besoin du fichier de DTD pour lire les fichiers dictionnaire.
Par défaut le fichier de la DTD est dans le sous répertoire "data" du répertoire de code. Le nom du fichier est rougail.dtd.
Pour pouvez changer le répertoire de destination de la DTD et le nom du fichier avec la clef "dtdfilename".
## Le fichier de fonction
Le fichier qui contient les fonctions personnalisés est géré dans la clef "functions_file" et a comme valeur par défaut "/srv/rougail/functions.py".
## Le répertoire des templates
Le répertoire des templates est géré dans la clef "templates_dir" et a comme valeur par défaut : "/srv/rougail/templates".
## Le répertoire des patchs
Le répertoire des patches est géré dans la clef "patches_dir" et a comme valeur par défaut : "/srv/rougail/patches".
## Le répertoire temporaire
Le répertoire temporaire est utile lors de la génération de template. Il contient une copie des templates avec, éventuellement, les patches appliqués sur les templates.
Le répertoire de temporaire est géré dans la clef "tmp_dir" et a comme valeur par défaut : "/srv/rougail/tmp".
## Le répertoire de destination des fichiers générés
Le répertoire de destination des fichiers générés est géré dans la clef "destinations_dir" et a comme valeur par défaut : "/srv/rougail/destinations".

View File

@ -1,4 +1,8 @@
# IP # La gestion d'une IP
## La balise ip
La gestion des IP se fait dans un conteneur de [service](service.md).
FIXME FIXME

View File

@ -2,6 +2,8 @@
## La balise override ## La balise override
La gestion des overrides se fait dans un conteneur de [service](service.md).
La balise override permet de redéfinir facilement un service systemd. La balise override permet de redéfinir facilement un service systemd.
Il suffit d'avoir un template dont le nom est par défaut le nom du service avec l'extension "service" et de déclarer la balise : Il suffit d'avoir un template dont le nom est par défaut le nom du service avec l'extension "service" et de déclarer la balise :

View File

@ -1,7 +1,9 @@
# Port # La gestion d'un port
## La balise port ## La balise port
La gestion des ports se fait dans un conteneur de [service](service.md).
La balise port permet d'associer un port à service : La balise port permet d'associer un port à service :
``` ```

View File

@ -24,7 +24,9 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from .rougail import Rougail from .convert import RougailConvert
from .template import RougailTemplate
from .config import RougailConfig
from .annotator import modes from .annotator import modes
__ALL__ = ('RougailObjSpace', 'modes') __ALL__ = ('RougailConvert', 'RougailTemplate', 'RougailConfig', 'modes')

View File

@ -66,8 +66,6 @@ class CheckAnnotator(TargetAnnotator, ParamAnnotator):
variable_type = None variable_type = None
if obj.name == 'valid_enum': if obj.name == 'valid_enum':
for target in obj.target: for target in obj.target:
if variable_type and target.name.type != variable_type:
raise Exception('pfff')
variable_type = target.name.type variable_type = target.name.type
return variable_type return variable_type

View File

@ -29,7 +29,7 @@ from typing import List, Any
from ..i18n import _ from ..i18n import _
from ..error import DictConsistencyError from ..error import DictConsistencyError
from ..config import Config from ..config import RougailConfig
from .target import TargetAnnotator from .target import TargetAnnotator
from .param import ParamAnnotator from .param import ParamAnnotator
@ -82,7 +82,7 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk):
) -> None: ) -> None:
if not variable.auto_freeze: if not variable.auto_freeze:
return return
if variable.namespace != Config['variable_namespace']: if variable.namespace != RougailConfig['variable_namespace']:
msg = _(f'auto_freeze is not allowed in extra "{variable.namespace}"') msg = _(f'auto_freeze is not allowed in extra "{variable.namespace}"')
raise DictConsistencyError(msg, 49, variable.xmlfiles) raise DictConsistencyError(msg, 49, variable.xmlfiles)
new_condition = self.objectspace.condition(variable.xmlfiles) new_condition = self.objectspace.condition(variable.xmlfiles)

View File

@ -78,8 +78,6 @@ class FamilyAnnotator(Walk):
return True return True
else: else:
return True return True
else:
return False
return False return False
def remove_empty_families(self) -> None: def remove_empty_families(self) -> None:
@ -99,8 +97,6 @@ class FamilyAnnotator(Walk):
for family in self.get_families(): for family in self.get_families():
if not hasattr(family, 'description'): if not hasattr(family, 'description'):
family.description = family.name family.description = family.name
if not hasattr(family, 'path'):
family.path = family.name
family.doc = family.description family.doc = family.description
del family.description del family.description
family.name = normalize_family(family.name) family.name = normalize_family(family.name)
@ -209,7 +205,7 @@ class FamilyAnnotator(Walk):
for variable in family.variable.values(): for variable in family.variable.values():
if isinstance(variable, self.objectspace.family): if isinstance(variable, self.objectspace.family):
msg = _(f'dynamic family "{family.name}" cannot contains another family') msg = _(f'dynamic family "{family.name}" cannot contains another family')
raise DictConsistencyError(msg, 2, family.xmlfiles) raise DictConsistencyError(msg, 22, family.xmlfiles)
def convert_help(self): def convert_help(self):
"""Convert variable help """Convert variable help

View File

@ -69,7 +69,8 @@ class ParamAnnotator:
) )
param.text = self.objectspace.paths.get_variable(path) param.text = self.objectspace.paths.get_variable(path)
if variable_type and param.text.type != variable_type: if variable_type and param.text.type != variable_type:
raise Exception('pfff', variable_type, param.text.type) msg = _(f'"{obj.name}" has type "{variable_type}" but param has type "{param.text.type}"')
raise DictConsistencyError(msg, 26, param.xmlfiles)
if suffix: if suffix:
param.suffix = suffix param.suffix = suffix
family_path = self.objectspace.paths.get_variable_family_path(path) family_path = self.objectspace.paths.get_variable_family_path(path)
@ -83,7 +84,7 @@ class ParamAnnotator:
elif variable_type: elif variable_type:
if 'type' in vars(param) and variable_type != param.type: if 'type' in vars(param) and variable_type != param.type:
msg = _(f'parameter has incompatible type "{param.type}" ' msg = _(f'parameter has incompatible type "{param.type}" '
f'with type "{variable_type}")') f'with type "{variable_type}"')
raise DictConsistencyError(msg, 7, param.xmlfiles) raise DictConsistencyError(msg, 7, param.xmlfiles)
try: try:
param.text = CONVERT_OPTION[variable_type].get('func', str)(param.text) param.text = CONVERT_OPTION[variable_type].get('func', str)(param.text)

View File

@ -184,6 +184,7 @@ class ServiceAnnotator:
self.objectspace.paths.add_family('services', self.objectspace.paths.add_family('services',
path, path,
family, family,
None,
) )
return family return family

View File

@ -60,7 +60,7 @@ class TargetAnnotator:
elif self.only_variable: elif self.only_variable:
msg = _(f'target to "{target.name}" with param type "{target.type}" ' msg = _(f'target to "{target.name}" with param type "{target.type}" '
f'is not allowed') f'is not allowed')
raise DictConsistencyError(msg, 2, obj.xmlfiles) raise DictConsistencyError(msg, 8, obj.xmlfiles)
if target.type == 'family': if target.type == 'family':
target.name = self.objectspace.paths.get_family(target.name, target.name = self.objectspace.paths.get_family(target.name,
obj.namespace, obj.namespace,

View File

@ -28,15 +28,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from os.path import join, abspath, dirname from os.path import join, abspath, dirname
ROUGAILROOT = '/var/rougail' ROUGAILROOT = '/srv/rougail'
DTDDIR = join(dirname(abspath(__file__)), 'data') DTDDIR = join(dirname(abspath(__file__)), 'data')
Config = {'rougailroot': ROUGAILROOT, RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')],
'patch_dir': join(ROUGAILROOT, 'patches'), 'extra_dictionaries': {},
'manifests_dir': join(ROUGAILROOT, 'manifests'), 'patches_dir': join(ROUGAILROOT, 'patches'),
'templates_dir': join(ROUGAILROOT, 'templates'), 'templates_dir': join(ROUGAILROOT, 'templates'),
'destinations_dir': join(ROUGAILROOT, 'destinations'),
'tmp_dir': join(ROUGAILROOT, 'tmp'),
'dtdfilename': join(DTDDIR, 'rougail.dtd'), 'dtdfilename': join(DTDDIR, 'rougail.dtd'),
'dtddir': DTDDIR,
'variable_namespace': 'rougail', 'variable_namespace': 'rougail',
'functions_file': join(ROUGAILROOT, 'functions.py'),
} }

106
src/rougail/convert.py Normal file
View File

@ -0,0 +1,106 @@
"""Takes a bunch of Rougail XML dispatched in differents folders
as an input and outputs a Tiramisu's file.
Created by:
EOLE (http://eole.orion.education.fr)
Copyright (C) 2005-2018
Forked by:
Cadoles (http://www.cadoles.com)
Copyright (C) 2019-2021
distribued with GPL-2 or later license
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sample usage::
>>> from rougail import Rougail
>>> rougail = Rougail()
>>> rougail.load_dictionaries(['/usr/share/rougail/dicos'])
>>> rougail.load_extra_dictionaries('extra1', ['/usr/share/rougail/extra1'])
>>> rougail.space_visitor('/usr/share/rougail/funcs.py')
>>> tiramisu = rougail.save()
The Rougail
- loads the XML into an internal RougailObjSpace representation
- visits/annotates the objects
- dumps the object space as Tiramisu string
The visit/annotation stage is a complex step that corresponds to the Rougail
procedures.
"""
from typing import List
from .i18n import _
from .config import RougailConfig
from .objspace import RougailObjSpace
from .xmlreflector import XMLReflector
from .tiramisureflector import TiramisuReflector
from .annotator import SpaceAnnotator
from .error import DictConsistencyError
class RougailConvert:
"""Rougail object
"""
def __init__(self) -> None:
xmlreflector = XMLReflector()
rougailobjspace = RougailObjSpace(xmlreflector)
self._load_dictionaries(xmlreflector,
rougailobjspace,
RougailConfig['variable_namespace'],
RougailConfig['dictionaries_dir'],
)
for namespace, extra_dir in RougailConfig['extra_dictionaries'].items():
if namespace in ['services', RougailConfig['variable_namespace']]:
msg = _(f'Namespace name "{namespace}" is not allowed')
raise DictConsistencyError(msg, 21, None)
self._load_dictionaries(xmlreflector,
rougailobjspace,
namespace,
extra_dir,
)
functions_file = RougailConfig['functions_file']
SpaceAnnotator(rougailobjspace,
functions_file,
)
self.output = TiramisuReflector(rougailobjspace,
functions_file,
).get_text() + '\n'
def _load_dictionaries(self,
xmlreflector: XMLReflector,
rougailobjspace: RougailObjSpace,
namespace: str,
xmlfolders: List[str],
) -> List[str]:
for xmlfile, document in xmlreflector.load_xml_from_folders(xmlfolders):
rougailobjspace.xml_parse_document(xmlfile,
document,
namespace,
)
def save(self,
filename: str,
) -> str:
"""Return tiramisu object declaration as a string
"""
if filename:
with open(filename, 'w') as tiramisu:
tiramisu.write(self.output)
return self.output

View File

@ -32,7 +32,7 @@ from .xmlreflector import XMLReflector
from .utils import normalize_family from .utils import normalize_family
from .error import SpaceObjShallNotBeUpdated, DictConsistencyError from .error import SpaceObjShallNotBeUpdated, DictConsistencyError
from .path import Path from .path import Path
from .config import Config from .config import RougailConfig
# RougailObjSpace's elements that shall be forced to the Redefinable type # RougailObjSpace's elements that shall be forced to the Redefinable type
FORCE_REDEFINABLES = ('family', 'follower', 'service', 'disknod', 'variables') FORCE_REDEFINABLES = ('family', 'follower', 'service', 'disknod', 'variables')
@ -109,6 +109,7 @@ class RougailObjSpace:
self.list_conditions = {} self.list_conditions = {}
self.valid_enums = {} self.valid_enums = {}
self.booleans_attributs = [] self.booleans_attributs = []
self.has_dyn_option = False
self.make_object_space_classes(xmlreflector) self.make_object_space_classes(xmlreflector)
@ -164,20 +165,14 @@ class RougailObjSpace:
def xml_parse_document(self, def xml_parse_document(self,
xmlfile, xmlfile,
document, document,
space,
namespace, namespace,
): ):
"""Parses a Rougail XML file and populates the RougailObjSpace """Parses a Rougail XML file and populates the RougailObjSpace
""" """
if namespace in ['services', Config['variable_namespace']]:
msg = _(f'Namespace name "{namespace}" is not allowed')
raise DictConsistencyError(msg, 21, xmlfile)
if not namespace:
namespace = Config['variable_namespace']
redefine_variables = [] redefine_variables = []
self._xml_parse(xmlfile, self._xml_parse(xmlfile,
document, document,
space, self.space,
namespace, namespace,
redefine_variables, redefine_variables,
) )
@ -224,6 +219,7 @@ class RougailObjSpace:
self.set_path(namespace, self.set_path(namespace,
document, document,
variableobj, variableobj,
space,
) )
self.add_to_tree_structure(variableobj, self.add_to_tree_structure(variableobj,
space, space,
@ -305,7 +301,7 @@ class RougailObjSpace:
redefine = convert_boolean(subspace.get('redefine', default_redefine)) redefine = convert_boolean(subspace.get('redefine', default_redefine))
if redefine is True: if redefine is True:
if isinstance(existed_var, self.variable): # pylint: disable=E1101 if isinstance(existed_var, self.variable): # pylint: disable=E1101
if namespace == Config['variable_namespace']: if namespace == RougailConfig['variable_namespace']:
redefine_variables.append(name) redefine_variables.append(name)
else: else:
redefine_variables.append(space.path + '.' + name) redefine_variables.append(space.path + '.' + name)
@ -330,7 +326,8 @@ class RougailObjSpace:
tag = FORCE_TAG.get(child.tag, child.tag) tag = FORCE_TAG.get(child.tag, child.tag)
if tag not in vars(space): if tag not in vars(space):
setattr(space, tag, {}) setattr(space, tag, {})
return getattr(self, child.tag)(xmlfile, name) obj = getattr(self, child.tag)(xmlfile, name)
return obj
def get_existed_obj(self, def get_existed_obj(self,
name: str, name: str,
@ -343,7 +340,7 @@ class RougailObjSpace:
if child.tag in ['variable', 'family']: if child.tag in ['variable', 'family']:
name = normalize_family(name) name = normalize_family(name)
if child.tag == 'variable': # pylint: disable=E1101 if child.tag == 'variable': # pylint: disable=E1101
if namespace != Config['variable_namespace']: if namespace != RougailConfig['variable_namespace']:
name = space.path + '.' + name name = space.path + '.' + name
if not self.paths.path_is_defined(name): if not self.paths.path_is_defined(name):
return None return None
@ -459,6 +456,7 @@ class RougailObjSpace:
namespace, namespace,
document, document,
variableobj, variableobj,
space,
): ):
"""Fill self.paths attributes """Fill self.paths attributes
""" """
@ -467,20 +465,24 @@ class RougailObjSpace:
family_name = normalize_family(document.attrib['name']) family_name = normalize_family(document.attrib['name'])
else: else:
family_name = namespace family_name = namespace
self.paths.add_variable(namespace, self.paths.add_variable(namespace,
normalize_family(variableobj.name), normalize_family(variableobj.name),
namespace + '.' + family_name, space.path,
document.attrib.get('dynamic') is not None, document.attrib.get('dynamic') is not None,
variableobj, variableobj,
) )
elif isinstance(variableobj, self.family): # pylint: disable=E1101 elif isinstance(variableobj, self.family): # pylint: disable=E1101
family_name = normalize_family(variableobj.name) family_name = normalize_family(variableobj.name)
if namespace != Config['variable_namespace']: if namespace != RougailConfig['variable_namespace']:
family_name = namespace + '.' + family_name family_name = namespace + '.' + family_name
self.paths.add_family(namespace, self.paths.add_family(namespace,
family_name, family_name,
variableobj, variableobj,
space.path,
) )
elif isinstance(variableobj, self.variables):
variableobj.path = variableobj.name
@staticmethod @staticmethod
def add_to_tree_structure(variableobj, def add_to_tree_structure(variableobj,

View File

@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from .i18n import _ from .i18n import _
from .error import DictConsistencyError from .error import DictConsistencyError
from .config import Config from .config import RougailConfig
from .utils import normalize_family from .utils import normalize_family
@ -47,11 +47,12 @@ class Path:
namespace: str, namespace: str,
name: str, name: str,
variableobj: str, variableobj: str,
subpath: str,
) -> str: # pylint: disable=C0111 ) -> str: # pylint: disable=C0111
"""Add a new family """Add a new family
""" """
if namespace == Config['variable_namespace']: if namespace == RougailConfig['variable_namespace']:
full_name = '.'.join([namespace, name]) full_name = '.'.join([subpath, name])
self.full_paths_families[name] = full_name self.full_paths_families[name] = full_name
else: else:
if '.' not in name: # pragma: no cover if '.' not in name: # pragma: no cover
@ -92,7 +93,7 @@ class Path:
if name not in self.families: if name not in self.families:
raise DictConsistencyError(_(f'unknown option {name}'), 42, []) raise DictConsistencyError(_(f'unknown option {name}'), 42, [])
dico = self.families[name] dico = self.families[name]
if current_namespace not in [Config['variable_namespace'], 'services'] and \ if current_namespace not in [RougailConfig['variable_namespace'], 'services'] and \
current_namespace != dico['namespace']: current_namespace != dico['namespace']:
msg = _(f'A family located in the "{dico["namespace"]}" namespace ' msg = _(f'A family located in the "{dico["namespace"]}" namespace '
f'shall not be used in the "{current_namespace}" namespace') f'shall not be used in the "{current_namespace}" namespace')
@ -116,7 +117,7 @@ class Path:
self.variables[new_path]['leader'] = leadership_path self.variables[new_path]['leader'] = leadership_path
self.variables[new_path]['variableobj'].path = new_path self.variables[new_path]['variableobj'].path = new_path
self.variables[new_path]['family'] = leadership_path self.variables[new_path]['family'] = leadership_path
if namespace == Config['variable_namespace']: if namespace == RougailConfig['variable_namespace']:
self.full_paths_variables[name] = new_path self.full_paths_variables[name] = new_path
def is_leader(self, path): # pylint: disable=C0111 def is_leader(self, path): # pylint: disable=C0111
@ -140,7 +141,7 @@ class Path:
""" """
if '.' not in name: if '.' not in name:
full_path = '.'.join([family, name]) full_path = '.'.join([family, name])
if namespace == Config['variable_namespace']: if namespace == RougailConfig['variable_namespace']:
self.full_paths_variables[name] = full_path self.full_paths_variables[name] = full_path
else: else:
full_path = name full_path = name
@ -179,7 +180,7 @@ class Path:
with_suffix=True, with_suffix=True,
) )
namespace = dico['variableobj'].namespace namespace = dico['variableobj'].namespace
if namespace not in [Config['variable_namespace'], 'services'] and \ if namespace not in [RougailConfig['variable_namespace'], 'services'] and \
current_namespace != namespace: current_namespace != namespace:
msg = _(f'A variable located in the "{namespace}" namespace shall not be used ' msg = _(f'A variable located in the "{namespace}" namespace shall not be used '
f'in the "{current_namespace}" namespace') f'in the "{current_namespace}" namespace')

View File

@ -1,94 +0,0 @@
"""Takes a bunch of Rougail XML dispatched in differents folders
as an input and outputs a Tiramisu's file.
Created by:
EOLE (http://eole.orion.education.fr)
Copyright (C) 2005-2018
Forked by:
Cadoles (http://www.cadoles.com)
Copyright (C) 2019-2021
distribued with GPL-2 or later license
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sample usage::
>>> from rougail import Rougail
>>> rougail = Rougail('/usr/share/rougail/rougail.dtd')
>>> rougail.create_or_populate_from_xml(['/usr/share/rougail/dicos'])
>>> rougail.create_or_populate_from_xml(['/usr/share/rougail/extra1'], 'extra1')
>>> rougail.space_visitor('/usr/share/rougail/funcs.py')
>>> tiramisu = rougail.save()
The Rougail
- loads the XML into an internal RougailObjSpace representation
- visits/annotates the objects
- dumps the object space as Tiramisu string
The visit/annotation stage is a complex step that corresponds to the Rougail
procedures.
"""
from typing import List
from .objspace import RougailObjSpace
from .xmlreflector import XMLReflector
from .tiramisureflector import TiramisuReflector
from .annotator import SpaceAnnotator
class Rougail:
"""Rougail object
"""
def __init__(self,
dtdfilename: str,
) -> None:
self.xmlreflector = XMLReflector()
self.xmlreflector.parse_dtd(dtdfilename)
self.rougailobjspace = RougailObjSpace(self.xmlreflector)
self.funcs_path = None
def create_or_populate_from_xml(self,
xmlfolders: List[str],
namespace: str=None,
) -> List[str]:
"""Parses a bunch of XML files and populates the RougailObjSpace
"""
for xmlfile in self.xmlreflector.load_xml_from_folders(xmlfolders):
document = self.xmlreflector.parse_xmlfile(xmlfile)
self.rougailobjspace.redefine_variables = []
self.rougailobjspace.xml_parse_document(xmlfile,
document,
self.rougailobjspace.space,
namespace,
)
def space_visitor(self,
eosfunc_file: str,
) -> None:
"""All XML are loader, now annotate content
"""
self.funcs_path = eosfunc_file
SpaceAnnotator(self.rougailobjspace, eosfunc_file)
def save(self) -> str:
"""Return tiramisu object declaration as a string
"""
tiramisu_objects = TiramisuReflector(self.rougailobjspace,
self.funcs_path,
)
return tiramisu_objects.get_text() + '\n'

View File

@ -30,7 +30,7 @@ import logging
from typing import Dict, Any from typing import Dict, Any
from subprocess import call from subprocess import call
from os import listdir, makedirs, getcwd, chdir from os import listdir, makedirs, getcwd, chdir
from os.path import dirname, join, isfile, abspath, normpath, relpath from os.path import dirname, join, isfile, abspath, normpath, isdir
from Cheetah.Template import Template as ChtTemplate from Cheetah.Template import Template as ChtTemplate
from Cheetah.NameMapper import NotFound as CheetahNotFound from Cheetah.NameMapper import NotFound as CheetahNotFound
@ -42,7 +42,7 @@ except ModuleNotFoundError: # pragma: no cover
from tiramisu import Config from tiramisu import Config
from tiramisu.error import PropertiesOptionError from tiramisu.error import PropertiesOptionError
from .config import Config from .config import RougailConfig
from .error import FileNotFound, TemplateError from .error import FileNotFound, TemplateError
from .i18n import _ from .i18n import _
from .utils import normalize_family, load_modules from .utils import normalize_family, load_modules
@ -104,7 +104,7 @@ class CheetahTemplate(ChtTemplate): # pylint: disable=W0223
return None return None
class CreoleLeaderIndex: class RougailLeaderIndex:
"""This object is create when access to a specified Index of the variable """This object is create when access to a specified Index of the variable
""" """
def __init__(self, def __init__(self,
@ -152,7 +152,7 @@ class CreoleLeaderIndex:
return value + self._value return value + self._value
class CreoleLeader: class RougailLeader:
"""Implement access to leader and follower variable """Implement access to leader and follower variable
For examples: %%leader, %%leader[0].follower1 For examples: %%leader, %%leader[0].follower1
""" """
@ -166,7 +166,7 @@ class CreoleLeader:
"""Get a leader.follower at requested index. """Get a leader.follower at requested index.
""" """
followers = {key: values[index] for key, values in self._follower.items()} followers = {key: values[index] for key, values in self._follower.items()}
return CreoleLeaderIndex(self._value[index], return RougailLeaderIndex(self._value[index],
followers, followers,
index, index,
) )
@ -201,7 +201,7 @@ class CreoleLeader:
self._follower[name].append(value) self._follower[name].append(value)
class CreoleExtra: class RougailExtra:
"""Object that implement access to extra variable """Object that implement access to extra variable
For example %%extra1.family.variable For example %%extra1.family.variable
""" """
@ -218,23 +218,21 @@ class CreoleExtra:
return iter(self.suboption.values()) return iter(self.suboption.values())
class CreoleTemplateEngine: class RougailTemplate:
"""Engine to process Creole cheetah template """Engine to process Creole cheetah template
""" """
def __init__(self, # pylint: disable=R0913 def __init__(self, # pylint: disable=R0913
config: Config, config: Config,
eosfunc_file: str,
distrib_dir: str,
tmp_dir: str,
dest_dir: str,
) -> None: ) -> None:
self.config = config self.config = config
self.dest_dir = dest_dir self.destinations_dir = abspath(RougailConfig['destinations_dir'])
self.tmp_dir = tmp_dir self.tmp_dir = abspath(RougailConfig['tmp_dir'])
self.distrib_dir = distrib_dir self.templates_dir = abspath(RougailConfig['templates_dir'])
self.patches_dir = abspath(RougailConfig['patches_dir'])
eos = {} eos = {}
if eosfunc_file is not None: functions_file = RougailConfig['functions_file']
eosfunc = load_modules(eosfunc_file) if isfile(functions_file):
eosfunc = load_modules(functions_file)
for func in dir(eosfunc): for func in dir(eosfunc):
if not func.startswith('_'): if not func.startswith('_'):
eos[func] = getattr(eosfunc, func) eos[func] = getattr(eosfunc, func)
@ -243,36 +241,33 @@ class CreoleTemplateEngine:
def patch_template(self, def patch_template(self,
filename: str, filename: str,
tmp_dir: str,
patch_dir: str,
) -> None: ) -> None:
"""Apply patch to a template """Apply patch to a template
""" """
patch_cmd = ['patch', '-d', tmp_dir, '-N', '-p1'] patch_cmd = ['patch', '-d', self.tmp_dir, '-N', '-p1', '-f']
patch_no_debug = ['-s', '-r', '-', '--backup-if-mismatch'] patch_no_debug = ['-s', '-r', '-', '--backup-if-mismatch']
patch_file = join(patch_dir, f'{filename}.patch') patch_file = join(self.patches_dir, f'{filename}.patch')
if isfile(patch_file): if isfile(patch_file):
log.info(_("Patching template '{filename}' with '{patch_file}'")) log.info(_("Patching template '{filename}' with '{patch_file}'"))
rel_patch_file = relpath(patch_file, tmp_dir) ret = call(patch_cmd + patch_no_debug + ['-i', patch_file])
ret = call(patch_cmd + patch_no_debug + ['-i', rel_patch_file])
if ret: # pragma: no cover if ret: # pragma: no cover
patch_cmd_err = ' '.join(patch_cmd + ['-i', rel_patch_file]) patch_cmd_err = ' '.join(patch_cmd + ['-i', patch_file])
msg = _(f"Error applying patch: '{rel_patch_file}'\n" msg = _(f"Error applying patch: '{patch_file}'\n"
f"To reproduce and fix this error {patch_cmd_err}") f"To reproduce and fix this error {patch_cmd_err}")
log.error(_(msg)) log.error(_(msg))
copy(join(self.distrib_dir, filename), tmp_dir) copy(join(self.templates_dir, filename), self.tmp_dir)
def prepare_template(self, def prepare_template(self,
filename: str, filename: str,
tmp_dir: str,
patch_dir: str,
) -> None: ) -> None:
"""Prepare template source file """Prepare template source file
""" """
log.info(_("Copy template: '{filename}' -> '{tmp_dir}'")) log.info(_("Copy template: '{filename}' -> '{self.tmp_dir}'"))
copy(filename, tmp_dir) if not isdir(self.tmp_dir):
self.patch_template(filename, tmp_dir, patch_dir) raise TemplateError(_(f'cannot find tmp_dir {self.tmp_dir}'))
copy(filename, self.tmp_dir)
self.patch_template(filename)
def process(self, def process(self,
source: str, source: str,
@ -309,8 +304,6 @@ class CreoleTemplateEngine:
def instance_file(self, def instance_file(self,
filevar: Dict, filevar: Dict,
tmp_dir: str,
dest_dir: str,
) -> None: ) -> None:
"""Run templatisation on one file """Run templatisation on one file
""" """
@ -324,14 +317,16 @@ class CreoleTemplateEngine:
filenames = [filenames] filenames = [filenames]
if variable: if variable:
variable = [variable] variable = [variable]
if not isdir(self.destinations_dir):
raise TemplateError(_(f'cannot find destinations_dir {self.destinations_dir}'))
for idx, filename in enumerate(filenames): for idx, filename in enumerate(filenames):
destfilename = join(dest_dir, filename[1:]) destfilename = join(self.destinations_dir, filename[1:])
makedirs(dirname(destfilename), exist_ok=True) makedirs(dirname(destfilename), exist_ok=True)
if variable: if variable:
var = variable[idx] var = variable[idx]
else: else:
var = None var = None
source = join(tmp_dir, filevar['source']) source = join(self.tmp_dir, filevar['source'])
if filevar['templating'] == 'creole': if filevar['templating'] == 'creole':
self.process(source, self.process(source,
filename, filename,
@ -345,18 +340,15 @@ class CreoleTemplateEngine:
"""Run templatisation on all files """Run templatisation on all files
""" """
ori_dir = getcwd() ori_dir = getcwd()
tmp_dir = relpath(self.tmp_dir, self.distrib_dir) chdir(self.templates_dir)
dest_dir = relpath(self.dest_dir, self.distrib_dir)
patch_dir = relpath(Config['patch_dir'], self.distrib_dir)
chdir(self.distrib_dir)
for option in await self.config.option.list(type='all'): for option in await self.config.option.list(type='all'):
namespace = await option.option.name() namespace = await option.option.name()
if namespace == Config['variable_namespace']: is_variable_namespace = namespace == RougailConfig['variable_namespace']
await self.load_variables_namespace(option) self.rougail_variables_dict[namespace] = await self.load_variables(option,
else: is_variable_namespace,
self.rougail_variables_dict[namespace] = await self.load_variables_extra(option) )
for template in listdir('.'): for template in listdir('.'):
self.prepare_template(template, tmp_dir, patch_dir) self.prepare_template(template)
for service_obj in await self.config.option('services').list('all'): for service_obj in await self.config.option('services').list('all'):
for fills in await service_obj.list('all'): for fills in await service_obj.list('all'):
if await fills.option.name() in ['files', 'overrides']: if await fills.option.name() in ['files', 'overrides']:
@ -366,51 +358,27 @@ class CreoleTemplateEngine:
if not isfile(filename): # pragma: no cover if not isfile(filename): # pragma: no cover
raise FileNotFound(_(f"File {filename} does not exist.")) raise FileNotFound(_(f"File {filename} does not exist."))
if fill['activate']: if fill['activate']:
self.instance_file(fill, self.instance_file(fill)
tmp_dir,
dest_dir,
)
else: else:
log.debug(_("Instantiation of file '{filename}' disabled")) log.debug(_("Instantiation of file '{filename}' disabled"))
chdir(ori_dir) chdir(ori_dir)
async def load_variables_namespace (self, async def load_variables(self,
optiondescription, optiondescription,
): is_variable_namespace,
"""load variables from the "variable namespace ) -> RougailExtra:
"""Load all variables and set it in RougailExtra objects
""" """
variables = {}
for option in await optiondescription.list('all'): for option in await optiondescription.list('all'):
if await option.option.isoptiondescription(): if await option.option.isoptiondescription():
if await option.option.isleadership(): if await option.option.isleadership():
for idx, suboption in enumerate(await option.list('all')): for idx, suboption in enumerate(await option.list('all')):
if idx == 0: if idx == 0:
leader = CreoleLeader(await suboption.value.get()) leader = RougailLeader(await suboption.value.get())
self.rougail_variables_dict[await suboption.option.name()] = leader
else:
await leader.add_follower(self.config,
await suboption.option.name(),
await suboption.option.path(),
)
else:
await self.load_variables_namespace(option)
else:
self.rougail_variables_dict[await option.option.name()] = await option.value.get()
async def load_variables_extra(self,
optiondescription,
) -> CreoleExtra:
"""Load all variables and set it in CreoleExtra objects
"""
families = {}
for family in await optiondescription.list('all'):
variables = {}
for variable in await family.list('all'):
if await variable.option.isoptiondescription():
if await variable.option.isleadership():
for idx, suboption in enumerate(await variable.list('all')):
if idx == 0:
leader = CreoleLeader(await suboption.value.get())
leader_name = await suboption.option.name() leader_name = await suboption.option.name()
if is_variable_namespace:
self.rougail_variables_dict[await suboption.option.name()] = leader
else: else:
await leader.add_follower(self.config, await leader.add_follower(self.config,
await suboption.option.name(), await suboption.option.name(),
@ -418,26 +386,12 @@ class CreoleTemplateEngine:
) )
variables[leader_name] = leader variables[leader_name] = leader
else: else:
subfamilies = await self.load_variables_extra(variable) subfamilies = await self.load_variables(option,
variables[await variable.option.name()] = subfamilies is_variable_namespace,
else:
variables[await variable.option.name()] = await variable.value.get()
families[await family.option.name()] = CreoleExtra(variables)
return CreoleExtra(families)
async def generate(config: Config,
eosfunc_file: str,
distrib_dir: str,
tmp_dir: str,
dest_dir: str,
) -> None:
"""Generate all files
"""
engine = CreoleTemplateEngine(config,
eosfunc_file,
distrib_dir,
tmp_dir,
dest_dir,
) )
await engine.instance_files() variables[await option.option.name()] = subfamilies
else:
if is_variable_namespace:
self.rougail_variables_dict[await option.option.name()] = await option.value.get()
variables[await option.option.name()] = await option.value.get()
return RougailExtra(variables)

View File

@ -26,8 +26,9 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from json import dumps from json import dumps
from os.path import isfile
from .config import Config from .config import RougailConfig
from .annotator import CONVERT_OPTION from .annotator import CONVERT_OPTION
from .objspace import RootRougailObject from .objspace import RootRougailObject
@ -54,7 +55,9 @@ class TiramisuReflector:
funcs_path, funcs_path,
): ):
self.index = 0 self.index = 0
self.text = ["from importlib.machinery import SourceFileLoader", self.text = []
if isfile(funcs_path):
self.text.extend(["from importlib.machinery import SourceFileLoader",
"from importlib.util import spec_from_loader, module_from_spec", "from importlib.util import spec_from_loader, module_from_spec",
f"loader = SourceFileLoader('func', '{funcs_path}')", f"loader = SourceFileLoader('func', '{funcs_path}')",
"spec = spec_from_loader(loader.name, loader)", "spec = spec_from_loader(loader.name, loader)",
@ -62,15 +65,16 @@ class TiramisuReflector:
"loader.exec_module(func)", "loader.exec_module(func)",
"for key, value in dict(locals()).items():", "for key, value in dict(locals()).items():",
" if key != ['SourceFileLoader', 'func']:", " if key != ['SourceFileLoader', 'func']:",
" setattr(func, key, value)", " setattr(func, key, value)"])
"try:", self.text.extend(["try:",
" from tiramisu3 import *", " from tiramisu3 import *",
"except:", "except:",
" from tiramisu import *", " from tiramisu import *",
"from rougail.tiramisu import ConvertDynOptionDescription", ])
]
self.objectspace = objectspace self.objectspace = objectspace
self.make_tiramisu_objects() self.make_tiramisu_objects()
if self.objectspace.has_dyn_option == True:
self.text.append("from rougail.tiramisu import ConvertDynOptionDescription")
def make_tiramisu_objects(self) -> None: def make_tiramisu_objects(self) -> None:
"""make tiramisu objects """make tiramisu objects
@ -85,18 +89,17 @@ class TiramisuReflector:
self.populate_family(basefamily, self.populate_family(basefamily,
elt, elt,
) )
# parse object self.baseelt = baseelt
baseelt.reflector_object.get() # pylint: disable=E1101
def reorder_family(self): def reorder_family(self):
"""variable_namespace family has to be loaded before any other family """variable_namespace family has to be loaded before any other family
because `extra` family could use `variable_namespace` variables. because `extra` family could use `variable_namespace` variables.
""" """
if hasattr(self.objectspace.space, 'variables'): if hasattr(self.objectspace.space, 'variables'):
if Config['variable_namespace'] in self.objectspace.space.variables: if RougailConfig['variable_namespace'] in self.objectspace.space.variables:
yield self.objectspace.space.variables[Config['variable_namespace']] yield self.objectspace.space.variables[RougailConfig['variable_namespace']]
for elt, value in self.objectspace.space.variables.items(): for elt, value in self.objectspace.space.variables.items():
if elt != Config['variable_namespace']: if elt != RougailConfig['variable_namespace']:
yield value yield value
if hasattr(self.objectspace.space, 'services'): if hasattr(self.objectspace.space, 'services'):
yield self.objectspace.space.services yield self.objectspace.space.services
@ -148,6 +151,7 @@ class TiramisuReflector:
def get_text(self): def get_text(self):
"""Get text """Get text
""" """
self.baseelt.reflector_object.get() # pylint: disable=E1101
return '\n'.join(self.text) return '\n'.join(self.text)
@ -348,6 +352,7 @@ class Family(Common):
): ):
super().__init__(elt, text, objectspace) super().__init__(elt, text, objectspace)
if hasattr(self.elt, 'suffixes'): if hasattr(self.elt, 'suffixes'):
self.objectspace.has_dyn_option = True
self.object_type = 'ConvertDynOptionDescription' self.object_type = 'ConvertDynOptionDescription'
elif isinstance(self.elt, self.objectspace.leadership): elif isinstance(self.elt, self.objectspace.leadership):
self.object_type = 'Leadership' self.object_type = 'Leadership'

View File

@ -32,6 +32,7 @@ from lxml.etree import DTD, parse, XMLSyntaxError # pylint: disable=E0611
from .i18n import _ from .i18n import _
from .error import DictConsistencyError from .error import DictConsistencyError
from .config import RougailConfig
class XMLReflector: class XMLReflector:
@ -40,37 +41,21 @@ class XMLReflector:
writing the xml result on the disk writing the xml result on the disk
""" """
def __init__(self): def __init__(self):
self.dtd = None
def parse_dtd(self, dtdfilename):
"""Loads the Creole DTD """Loads the Creole DTD
:raises IOError: if the DTD is not found :raises IOError: if the DTD is not found
:param dtdfilename: the full filename of the Creole DTD :param dtdfilename: the full filename of the Creole DTD
""" """
dtdfilename = RougailConfig['dtdfilename']
if not isfile(dtdfilename): if not isfile(dtdfilename):
raise IOError(_("no such DTD file: {}").format(dtdfilename)) raise IOError(_("no such DTD file: {}").format(dtdfilename))
with open(dtdfilename, 'r') as dtdfd: with open(dtdfilename, 'r') as dtdfd:
self.dtd = DTD(dtdfd) self.dtd = DTD(dtdfd)
def parse_xmlfile(self, xmlfile): def load_xml_from_folders(self,
"""Parses and validates some Creole XML against the Creole DTD xmlfolders: List[str],
):
:returns: the root element tree object
"""
try:
document = parse(xmlfile)
except XMLSyntaxError as err:
raise DictConsistencyError(_(f'not a XML file: {err}'), 52, [xmlfile]) from err
if not self.dtd.validate(document):
dtd_error = self.dtd.error_log.filter_from_errors()[0]
msg = _(f'not a valid XML file: {dtd_error}')
raise DictConsistencyError(msg, 43, [xmlfile])
return document.getroot()
@staticmethod
def load_xml_from_folders(xmlfolders: List[str]):
"""Loads all the XML files located in the xmlfolders' list """Loads all the XML files located in the xmlfolders' list
:param xmlfolders: list of full folder's name :param xmlfolders: list of full folder's name
@ -80,4 +65,12 @@ class XMLReflector:
filename.endswith('.xml')] filename.endswith('.xml')]
filenames.sort() filenames.sort()
for xmlfile in filenames: for xmlfile in filenames:
yield xmlfile try:
document = parse(xmlfile)
except XMLSyntaxError as err:
raise DictConsistencyError(_(f'not a XML file: {err}'), 52, [xmlfile]) from err
if not self.dtd.validate(document):
dtd_error = self.dtd.error_log.filter_from_errors()[0]
msg = _(f'not a valid XML file: {dtd_error}')
raise DictConsistencyError(msg, 43, [xmlfile])
yield xmlfile, document.getroot()

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_2 = OptionDescription(name="tata", doc="tata", children=[]) option_2 = OptionDescription(name="tata", doc="tata", children=[])
option_1 = OptionDescription(name="services", doc="services", children=[option_2], properties=frozenset({"hidden"})) option_1 = OptionDescription(name="services", doc="services", children=[option_2], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"auto_freeze", "basic", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"auto_freeze", "basic", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"basic"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"auto_freeze", "expert", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"auto_freeze", "expert", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "force_store_value", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"basic", "force_store_value", "mandatory"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"basic"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "force_store_value", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "force_store_value", "mandatory"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"expert"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"expert"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"auto_freeze", "basic", "force_store_value", "frozen", "hidden", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"auto_freeze", "basic", "force_store_value", "frozen", "hidden", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"basic"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "normal"})) option_3 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<services>
<service name="test">
<file name="/etc/file"/>
</service>
</services>
<variables>
<family name="general">
<variable name="mode_conteneur_actif" type="string" description="Description">
<value>non</value>
</variable>
</family>
</variables>
</rougail>
<!-- vim: ts=4 sw=4 expandtab
-->

View File

@ -0,0 +1 @@
{"rougail.general.mode_conteneur_actif": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/etc/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": "creole", "services.test.files.file.activate": true}

View File

@ -0,0 +1,2 @@
non
non

View File

@ -0,0 +1,28 @@
from importlib.machinery import SourceFileLoader
from importlib.util import spec_from_loader, module_from_spec
loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
spec = spec_from_loader(loader.name, loader)
func = module_from_spec(spec)
loader.exec_module(func)
for key, value in dict(locals()).items():
if key != ['SourceFileLoader', 'func']:
setattr(func, key, value)
try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/file")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file")
option_13 = StrOption(name="templating", doc="templating", default="creole")
option_14 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="file", doc="file", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
option_6 = OptionDescription(name="files", doc="files", children=[option_7])
option_5 = OptionDescription(name="test", doc="test", children=[option_6])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])

View File

@ -0,0 +1,2 @@
%%mode_conteneur_actif
%%rougail.general.mode_conteneur_actif

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"})) option_3 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "normal"}))
option_4 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"})) option_4 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"normal"}))
option_3.impl_set_information('help', "message with '") option_3.impl_set_information('help', "message with '")
option_4 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['quote"'], default_multi="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['quote"'], default_multi="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['quote\'"'], default_multi="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['quote\'"'], default_multi="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="general", doc="description", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="general", doc="description", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="Other description", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="Other description", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_5 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"auto_freeze", "basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"auto_freeze", "basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"basic", "force_store_value"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"basic", "force_store_value"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"basic"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_2 = OptionDescription(name="general", doc="Général", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="Général", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"expert", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"expert", "mandatory"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = IntOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue(3)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_3 = IntOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue(3)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params(())), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamOption(option_4)))), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("quote'")))), properties=frozenset({"normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("quote'")))), properties=frozenset({"normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("quote\"")))), properties=frozenset({"normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("quote\"")))), properties=frozenset({"normal"}))
option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("quote\"'")))), properties=frozenset({"normal"})) option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("quote\"'")))), properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="module_instancie", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"auto_freeze", "basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")})), Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"auto_freeze", "basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")})), Calculation(func.calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui"), 'reverse_condition': ParamValue(True)}))}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"basic"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"}))
option_3.impl_set_information('test', ('test',)) option_3.impl_set_information('test', ('test',))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"}))
option_3.impl_set_information('test', ('test1', 'test2')) option_3.impl_set_information('test', ('test1', 'test2'))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"}))
option_3.impl_set_information('test', (None, 'test1', 'test2')) option_3.impl_set_information('test', (None, 'test1', 'test2'))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"}))
option_3.impl_set_information('test', ('test1',)) option_3.impl_set_information('test', ('test1',))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="autosavevar", doc="autosave variable", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")}))})) option_4 = StrOption(name="autosavevar", doc="autosave variable", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"basic", "force_store_value", Calculation(func.calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")}))}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"basic"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="autosavevar", doc="autosave variable", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"basic", "force_store_value", "frozen", "hidden"})) option_4 = StrOption(name="autosavevar", doc="autosave variable", default=Calculation(func.calc_val, Params((ParamValue("oui")))), properties=frozenset({"basic", "force_store_value", "frozen", "hidden"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"basic"})) option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"basic"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"}))
option_4 = IntOption(name="int", doc="No change", min_number=0, max_number=100, properties=frozenset({"normal"})) option_4 = IntOption(name="int", doc="No change", min_number=0, max_number=100, properties=frozenset({"normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"}))
option_4 = IntOption(name="int", doc="No change", validators=[Calculation(func.valid_lower, Params((ParamSelfOption())), warnings_only=False)], properties=frozenset({"normal"})) option_4 = IntOption(name="int", doc="No change", validators=[Calculation(func.valid_lower, Params((ParamSelfOption())), warnings_only=False)], properties=frozenset({"normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"}))
option_4 = IntOption(name="int2", doc="No change", default=100, properties=frozenset({"mandatory", "normal"})) option_4 = IntOption(name="int2", doc="No change", default=100, properties=frozenset({"mandatory", "normal"}))
option_5 = IntOption(name="int", doc="No change", validators=[Calculation(func.valid_lower, Params((ParamSelfOption()), kwargs={'mini': ParamValue(0), 'maxi': ParamOption(option_4)}), warnings_only=False)], properties=frozenset({"normal"})) option_5 = IntOption(name="int", doc="No change", validators=[Calculation(func.valid_lower, Params((ParamSelfOption()), kwargs={'mini': ParamValue(0), 'maxi': ParamOption(option_4)}), warnings_only=False)], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="b", properties=frozenset({"mandatory", "normal"}))
option_5 = IntOption(name="int2", doc="No change", properties=frozenset({"normal"})) option_5 = IntOption(name="int2", doc="No change", properties=frozenset({"normal"}))
option_4 = IntOption(name="int", doc="No change", validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_5))), warnings_only=False)], properties=frozenset({"normal"})) option_4 = IntOption(name="int", doc="No change", validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_5))), warnings_only=False)], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4))), warnings_only=False)], properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", validators=[Calculation(func.valid_differ, Params((ParamSelfOption(), ParamOption(option_4))), warnings_only=False)], properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"}))
option_4 = IPOption(name="adresse_ip_eth0", doc="Adresse IP de la carte", private_only=True, warnings_only=True, properties=frozenset({"basic", "mandatory"})) option_4 = IPOption(name="adresse_ip_eth0", doc="Adresse IP de la carte", private_only=True, warnings_only=True, properties=frozenset({"basic", "mandatory"}))
option_5 = NetmaskOption(name="adresse_netmask_eth0", doc="Masque de sous réseau de la carte", properties=frozenset({"basic", "mandatory"})) option_5 = NetmaskOption(name="adresse_netmask_eth0", doc="Masque de sous réseau de la carte", properties=frozenset({"basic", "mandatory"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"}))
option_4 = IPOption(name="adresse_ip_eth0", doc="Adresse IP de la carte", cidr=True, properties=frozenset({"basic", "mandatory"})) option_4 = IPOption(name="adresse_ip_eth0", doc="Adresse IP de la carte", cidr=True, properties=frozenset({"basic", "mandatory"}))
option_5 = IPOption(name="adresse_ip", doc="IP", validators=[Calculation(func.valid_in_network, Params((ParamSelfOption(), ParamOption(option_4))), warnings_only=True)], private_only=True, warnings_only=True, properties=frozenset({"basic", "mandatory"})) option_5 = IPOption(name="adresse_ip", doc="IP", validators=[Calculation(func.valid_in_network, Params((ParamSelfOption(), ParamOption(option_4))), warnings_only=True)], private_only=True, warnings_only=True, properties=frozenset({"basic", "mandatory"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"mandatory", "normal"}))
option_4 = IPOption(name="adresse_ip_eth0", doc="Adresse IP de la carte", private_only=True, warnings_only=True, properties=frozenset({"basic", "mandatory"})) option_4 = IPOption(name="adresse_ip_eth0", doc="Adresse IP de la carte", private_only=True, warnings_only=True, properties=frozenset({"basic", "mandatory"}))
option_5 = NetmaskOption(name="adresse_netmask_eth0", doc="Masque de sous réseau de la carte", validators=[Calculation(func.valid_ipnetmask, Params((ParamSelfOption(), ParamOption(option_4))), warnings_only=True)], properties=frozenset({"basic", "mandatory"})) option_5 = NetmaskOption(name="adresse_netmask_eth0", doc="Masque de sous réseau de la carte", validators=[Calculation(func.valid_ipnetmask, Params((ParamSelfOption(), ParamOption(option_4))), warnings_only=True)], properties=frozenset({"basic", "mandatory"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamInformation("test_information", None)))), properties=frozenset({"normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default=Calculation(func.calc_val, Params((ParamInformation("test_information", None)))), properties=frozenset({"normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2]) option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"}))
option_5 = ChoiceOption(name="enumvar", doc="enumvar", values=(1, 2, 3), default=1, properties=frozenset({"expert", "mandatory"})) option_5 = ChoiceOption(name="enumvar", doc="enumvar", values=(1, 2, 3), default=1, properties=frozenset({"expert", "mandatory"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_6 = StrOption(name="leader", doc="leader", multi=True) option_6 = StrOption(name="leader", doc="leader", multi=True)

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_6 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen"})) option_6 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_6 = StrOption(name="leader", doc="leader", multi=True) option_6 = StrOption(name="leader", doc="leader", multi=True)

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="leader", doc="leader", multi=True) option_5 = StrOption(name="leader", doc="leader", multi=True)
option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="leader", doc="leader", multi=True) option_5 = StrOption(name="leader", doc="leader", multi=True)
option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"})) option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"}))
option_6 = StrOption(name="leader", doc="leader", multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(name="leader", doc="leader", multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="leader", doc="leader", multi=True) option_5 = StrOption(name="leader", doc="leader", multi=True)
option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"normal"})) option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="leader", doc="leader", multi=True) option_5 = StrOption(name="leader", doc="leader", multi=True)
option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"normal"})) option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"}))
option_6 = StrOption(name="leader", doc="leader", multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"force_default_on_freeze", "frozen"})) option_6 = StrOption(name="leader", doc="leader", multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"force_default_on_freeze", "frozen"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"}))
option_6 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")})), Calculation(func.calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")}))})) option_6 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")})), Calculation(func.calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")}))}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"expert", "mandatory"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"expert"}))
option_6 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")})), Calculation(func.calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")}))})) option_6 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")})), Calculation(func.calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("non")}))}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({"mandatory"})) option_5 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({"mandatory"}))
option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"normal"})) option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="leader", doc="leader", multi=True) option_5 = StrOption(name="leader", doc="leader", multi=True)
option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"mandatory", "normal"})) option_6 = StrOption(name="follower1", doc="follower1", multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})), properties=frozenset({"mandatory", "normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_5 = NetmaskOption(name="nut_monitor_netmask", doc="Masque de l'IP du réseau de l'esclave", multi=True) option_5 = NetmaskOption(name="nut_monitor_netmask", doc="Masque de l'IP du réseau de l'esclave", multi=True)
option_6 = NetworkOption(name="nut_monitor_host", doc="Adresse IP du réseau de l'esclave", multi=True, properties=frozenset({"mandatory", "normal"})) option_6 = NetworkOption(name="nut_monitor_host", doc="Adresse IP du réseau de l'esclave", multi=True, properties=frozenset({"mandatory", "normal"}))

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"})) option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
option_6 = StrOption(name="leader", doc="leader", multi=True) option_6 = StrOption(name="leader", doc="leader", multi=True)

View File

@ -11,7 +11,6 @@ try:
from tiramisu3 import * from tiramisu3 import *
except: except:
from tiramisu import * from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription
option_3 = StrOption(name="condition", doc="No change", default="non", properties=frozenset({"mandatory", "normal"})) option_3 = StrOption(name="condition", doc="No change", default="non", properties=frozenset({"mandatory", "normal"}))
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", Calculation(func.calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")}))})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", Calculation(func.calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")}))}))
option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", Calculation(func.calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")}))})) option_5 = StrOption(name="mode_conteneur_actif2", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal", Calculation(func.calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue("oui")}))}))

Some files were not shown because too many files have changed in this diff Show More