Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop
This commit is contained in:
commit
a9c74d68ff
|
@ -0,0 +1,23 @@
|
||||||
|
Valeur automatiquement modifiée
|
||||||
|
===============================
|
||||||
|
|
||||||
|
Une variable avec valeur automatiquement modifiée est une variable dont la valeur sera considéré comme modifié quand le serveur sera déployé.
|
||||||
|
|
||||||
|
Voici un variable a valeur automatiquement modifiée :
|
||||||
|
|
||||||
|
<variable name="my_variable" type="oui/non" description="My variable" auto_save="True">
|
||||||
|
|
||||||
|
Dans ce cas la valeur est fixée à la valeur actuelle.
|
||||||
|
Par exemple, si la valeur de cette variable est issue d'un calcul, la valeur ne sera plus recalculée.
|
||||||
|
|
||||||
|
Valeur en lecture seule automatique
|
||||||
|
===================================
|
||||||
|
|
||||||
|
Une variable avec valeur en lecture seule automatique est une variable dont la valeur ne sera plus modifiable par l'utilisateur quand le serveur sera déployé.
|
||||||
|
|
||||||
|
Voici un variable à valeur en lecture seule automatique :
|
||||||
|
|
||||||
|
<variable name="my_variable" type="oui/non" description="My variable" auto_freeze="True">
|
||||||
|
|
||||||
|
Dans ce cas la valeur est fixée à la valeur actuelle et elle ne sera plus modifiable par l'utilisateur.
|
||||||
|
Par exemple, si la valeur de cette variable est issue d'un calcul, la valeur ne sera plus recalculée.
|
|
@ -0,0 +1,285 @@
|
||||||
|
Les variables calculées
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Une variable calculée est une variable donc sa valeur est le résultat d'une fonction python.
|
||||||
|
|
||||||
|
Variable avec une valeur par défaut calculée
|
||||||
|
--------------------------------------------
|
||||||
|
|
||||||
|
Créons une variable de type "oui/non" donc la valeur est retournée par la fonction "return_no" :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_calculated_variable" type="oui/non" description="My calculated variable"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_no" target="my_calculated_variable"/>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Puis créons la fonction "return_no" :
|
||||||
|
|
||||||
|
def return_no():
|
||||||
|
return 'non'
|
||||||
|
|
||||||
|
Dans ce cas, la valeur par défaut est la valeur retournée par la fonction (ici "non"), elle sera calculée tant que l'utilisateur n'a pas de spécifié une valeur à cette variable.
|
||||||
|
|
||||||
|
Si l'utilisateur à définit une valeur par défaut à "my_calculated_variable" :
|
||||||
|
|
||||||
|
<variable name="my_calculated_variable" type="oui/non" description="My calculated variable">
|
||||||
|
<value>oui</value>
|
||||||
|
</variable>
|
||||||
|
|
||||||
|
Cette valeur par défaut sera complètement ignorée.
|
||||||
|
|
||||||
|
Variable avec une valeur calculée
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
En ajoutant le paramètre "hidden" à "True" dans la variable précédente, l'utilisateur n'aura plus la possibilité de modifié la valeur. La valeur de la variable sera donc systématiquement calculée :
|
||||||
|
|
||||||
|
<variable name="my_calculated_variable" type="oui/non" description="My calculated variable" hidden="True"/>
|
||||||
|
|
||||||
|
Si une condition "hidden_if_in" est spécifié à la variable, la valeur sera modifiable par l'utilisateur si elle n'est pas cachée mais elle sera systèmatiquement calculée (même si elle a déjà était modifiée) si la variable est cachée.
|
||||||
|
|
||||||
|
Variable avec valeur calculée obligatoire
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
Par défaut les variables calculées ne sont pas des varibles obligatoires.
|
||||||
|
Dans ce cas un calcul peut retourner None, mais surtout un utilisateur peut spécifier une valeur nulle à cette variable. Dans ce cas le calcul ne sera pas réalisé.
|
||||||
|
|
||||||
|
Fonction avec une valeur fixe comme paramètre positionnel
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
Déclarons un calcul avec paramètre :
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value" target="my_calculated_variable">
|
||||||
|
<param>non</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Créons la fonction correspondante :
|
||||||
|
|
||||||
|
def return_value(value):
|
||||||
|
return value
|
||||||
|
|
||||||
|
La variable aura donc "non" comme valeur puisque le paramètre aura la valeur fixe "non".
|
||||||
|
|
||||||
|
Paramètre nommée
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Déclarons une contrainte avec un paramètre nommée :
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value" target="my_calculated_variable">
|
||||||
|
<param name="valeur">non</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans ce cas la fonction return_value sera exécuté avec le paramètre nommé "valeur" dont sa valeur sera "non".
|
||||||
|
|
||||||
|
Paramètre avec un nombre
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Déclarons un calcul avec paramètre avec un nombre :
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value_with_number" target="my_calculated_variable">
|
||||||
|
<param type="number">1</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Créons la fonction correspondante :
|
||||||
|
|
||||||
|
def return_value_with_number(value):
|
||||||
|
if value == 1:
|
||||||
|
return 'non'
|
||||||
|
return 'oui'
|
||||||
|
|
||||||
|
La variable aura donc "non" comme valeur puisque le paramètre aura la valeur fixe "1".
|
||||||
|
|
||||||
|
Paramètre dont la valeur est issue d'une autre variable
|
||||||
|
-------------------------------------------------------
|
||||||
|
|
||||||
|
Créons deux variables avec une contrainte de type variable qui contient le nom de la variable dont sa valeur sera utilisé comme paramètre :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_calculated_variable" type="oui/non" description="My calculated variable"/>
|
||||||
|
<variable name="my_variable" type="number" description="My variable">
|
||||||
|
<value>1</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value_with_number" target="my_calculated_variable">
|
||||||
|
<param type="variable">my_variable</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Si l'utilisateur laisse la valeur 1 à "my_variable", la valeur par défault de la variable "my_calculated_variable" sera "non".
|
||||||
|
Si la valeur de "my_variable" est différent de 1, la valeur par défaut de la variable "my_calculated_variable" sera "oui".
|
||||||
|
|
||||||
|
Paramètre dont la valeur est issue d'une information de la configuration
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Créons une variable et la contrainte :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_calculated_variable" type="string" description="My calculated variable"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value" target="my_calculated_variable">
|
||||||
|
<param type="information">server_name</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans ce cas, l'information de la configuration "server_name" sera utilisé comme valeur de la variable "my_calculated_variable".
|
||||||
|
Si l'information n'existe pas, la paramètre aura la valeur "None".
|
||||||
|
|
||||||
|
Paramètre avec variable potentiellement non existante
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
Suivant le contexte une variable peut exister ou ne pas exister.
|
||||||
|
|
||||||
|
Un paramètre de type "variable" peut être "optional" :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_calculated_variable" type="oui/non" description="My calculated variable"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value" target="my_calculated_variable">
|
||||||
|
<param type="variable" optional="True">unknow_variable</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans ce cas la fonction "return_value" est exécuté sans paramètre.
|
||||||
|
|
||||||
|
Paramètre avec variable potentiellement désactivée
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
FIXME :
|
||||||
|
|
||||||
|
<!ATTLIST param notraisepropertyerror (True|False) "False">
|
||||||
|
|
||||||
|
Il n'y a pas spécialement de test !
|
||||||
|
|
||||||
|
Les variables suiveuses
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
FIXME :
|
||||||
|
|
||||||
|
- tests/flattener_dicos/10leadership_append/00-base.xml
|
||||||
|
- tests/flattener_dicos/10leadership_auto/00-base.xml
|
||||||
|
- tests/flattener_dicos/10leadership_autoleader/00-base.xml
|
||||||
|
- tests/flattener_dicos/10leadership_autoleader_expert/00-base.xml
|
||||||
|
|
||||||
|
Les variables dynamiques
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Paramètre avec variable dynamique
|
||||||
|
'''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
Il est possible de faire un calcul avec comme paramètre une variable dynamique mais pour une suffix particulier :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name='family'>
|
||||||
|
<variable name='suffixes' type='string' description="Suffixes of dynamic family" multi="True">
|
||||||
|
<value>val1</value>
|
||||||
|
<value>val2</value>
|
||||||
|
</variable>
|
||||||
|
<variable name="my_calculated_variable" type="string" description="My calculated variable"/>
|
||||||
|
</family>
|
||||||
|
<family name='dyn' dynamic="suffixes">
|
||||||
|
<variable name='vardyn' type='string' description="Dynamic variable">
|
||||||
|
<value>val</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value" target="my_calculated_variable">
|
||||||
|
<param type="variable">vardynval1</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans ce cas, valeur du paramètre de la fonction "return_value" sera la valeur de la variable "vardyn" avec le suffix "val1".
|
||||||
|
|
||||||
|
Calcule d'une variable dynamique
|
||||||
|
''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
Il est également possible de calculer une variable dynamique à partir d'une variable standard :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name='family'>
|
||||||
|
<variable name='suffixes' type='string' description="Suffixes of dynamic family" multi="True">
|
||||||
|
<value>val1</value>
|
||||||
|
<value>val2</value>
|
||||||
|
</variable>
|
||||||
|
<variable name="my_variable" type="string" description="My variable">
|
||||||
|
<value>val</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
<family name='dyn' dynamic="suffixes">
|
||||||
|
<variable name="my_calculated_variable_dyn_" type="string" description="My calculated variable"/>
|
||||||
|
<value>val</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value" target="my_calculated_variable_dyn_">
|
||||||
|
<param type="variable">my_variable</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans ce cas, les variables dynamiques "my_calculated_variable_dyn_" seront calculés à partir de la valeur de la variable "my_variable".
|
||||||
|
Que cela soit pour la variable "my_calculated_variable_dyn_val1" et "my_calculated_variable_dyn_val2".
|
||||||
|
|
||||||
|
Par contre, il n'est pas possible de faire un calcul pour une seule des deux variables issues de la variable dynamique.
|
||||||
|
Si c'est ce que vous cherchez à faire, il faudra prévoir un traitement particulier dans votre fonction.
|
||||||
|
|
||||||
|
Dans ce cas, il faut explicitement demander la valeur du suffix dans la fonction :
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_value_suffix" target="my_calculated_variable_dyn_">
|
||||||
|
<param type="variable">my_variable</param>
|
||||||
|
<param type="suffix"/>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Et ainsi faire un traitement spécifique pour ce suffix :
|
||||||
|
|
||||||
|
def return_value_suffix(value, suffix):
|
||||||
|
if suffix == 'val1':
|
||||||
|
return value
|
||||||
|
|
||||||
|
Redéfinition des calcules
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Dans un premier dictionnaire déclarons notre variable et notre calcule :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_calculated_variable" type="oui/non" description="My calculated variable"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_no" target="my_calculated_variable"/>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans un second dictionnaire il est possible de redéfinir le calcul :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_calculated_variable" redefine="True"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="return_yes" target="my_calculated_variable"/>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
Dans ce cas, à aucun moment la fonction "return_no" ne sera exécuté. Seul la fonction "return_yes" le sera.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
Variable
|
||||||
|
========
|
||||||
|
|
||||||
|
Variable obligatoire
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Variable dont une valeur est requise :
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="family">
|
||||||
|
<variable name="my_variable" type="oui/non" description="My variable" mandatory="True"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
|
@ -56,9 +56,6 @@ KEY_TYPE = {'variable': 'symlink',
|
||||||
'URLOption': 'web_address',
|
'URLOption': 'web_address',
|
||||||
'FilenameOption': 'filename'}
|
'FilenameOption': 'filename'}
|
||||||
|
|
||||||
TYPE_PARAM_CHECK = ('string', 'python', 'variable')
|
|
||||||
TYPE_PARAM_CONDITION = ('string', 'python', 'number', 'variable')
|
|
||||||
TYPE_PARAM_FILL = ('string', 'number', 'variable')
|
|
||||||
CONVERSION = {'number': int}
|
CONVERSION = {'number': int}
|
||||||
|
|
||||||
FREEZE_AUTOFREEZE_VARIABLE = 'module_instancie'
|
FREEZE_AUTOFREEZE_VARIABLE = 'module_instancie'
|
||||||
|
@ -476,9 +473,11 @@ class VariableAnnotator:
|
||||||
check.name = 'valid_enum'
|
check.name = 'valid_enum'
|
||||||
check.target = path
|
check.target = path
|
||||||
check.namespace = namespace
|
check.namespace = namespace
|
||||||
param = self.objectspace.param()
|
check.param = []
|
||||||
param.text = str(FORCE_CHOICE[variable.type])
|
for value in FORCE_CHOICE[variable.type]:
|
||||||
check.param = [param]
|
param = self.objectspace.param()
|
||||||
|
param.text = value
|
||||||
|
check.param.append(param)
|
||||||
if not hasattr(self.objectspace.space, 'constraints'):
|
if not hasattr(self.objectspace.space, 'constraints'):
|
||||||
self.objectspace.space.constraints = self.objectspace.constraints()
|
self.objectspace.space.constraints = self.objectspace.constraints()
|
||||||
self.objectspace.space.constraints.namespace = namespace
|
self.objectspace.space.constraints.namespace = namespace
|
||||||
|
@ -597,7 +596,9 @@ class ConstraintAnnotator:
|
||||||
if not hasattr(objectspace.space, 'constraints'):
|
if not hasattr(objectspace.space, 'constraints'):
|
||||||
return
|
return
|
||||||
self.objectspace = objectspace
|
self.objectspace = objectspace
|
||||||
self.eosfunc = imp.load_source('eosfunc', eosfunc_file)
|
eosfunc = imp.load_source('eosfunc', eosfunc_file)
|
||||||
|
self.functions = dir(eosfunc)
|
||||||
|
self.functions.extend(INTERNAL_FUNCTIONS)
|
||||||
self.valid_enums = {}
|
self.valid_enums = {}
|
||||||
if hasattr(self.objectspace.space.constraints, 'check'):
|
if hasattr(self.objectspace.space.constraints, 'check'):
|
||||||
self.check_check()
|
self.check_check()
|
||||||
|
@ -619,16 +620,12 @@ class ConstraintAnnotator:
|
||||||
|
|
||||||
def check_check(self):
|
def check_check(self):
|
||||||
remove_indexes = []
|
remove_indexes = []
|
||||||
functions = dir(self.eosfunc)
|
|
||||||
functions.extend(INTERNAL_FUNCTIONS)
|
|
||||||
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
|
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
|
||||||
if not check.name in functions:
|
if not check.name in self.functions:
|
||||||
raise DictConsistencyError(_('cannot find check function {}').format(check.name))
|
raise DictConsistencyError(_('cannot find check function {}').format(check.name))
|
||||||
if hasattr(check, 'param'):
|
if hasattr(check, 'param'):
|
||||||
param_option_indexes = []
|
param_option_indexes = []
|
||||||
for idx, param in enumerate(check.param):
|
for idx, param in enumerate(check.param):
|
||||||
if param.type not in TYPE_PARAM_CHECK:
|
|
||||||
raise DictConsistencyError(_('cannot use {} type as a param in check for {}').format(param.type, check.target))
|
|
||||||
if param.type == 'variable' and not self.objectspace.paths.path_is_defined(param.text):
|
if param.type == 'variable' and not self.objectspace.paths.path_is_defined(param.text):
|
||||||
if param.optional is True:
|
if param.optional is True:
|
||||||
param_option_indexes.append(idx)
|
param_option_indexes.append(idx)
|
||||||
|
@ -661,55 +658,50 @@ class ConstraintAnnotator:
|
||||||
remove_indexes = []
|
remove_indexes = []
|
||||||
for idx, check in enumerate(self.objectspace.space.constraints.check):
|
for idx, check in enumerate(self.objectspace.space.constraints.check):
|
||||||
if check.name == 'valid_enum':
|
if check.name == 'valid_enum':
|
||||||
if len(check.param) != 1:
|
|
||||||
raise DictConsistencyError(_(f'cannot set more than one param for valid_enum for variable {check.target}'))
|
|
||||||
param = check.param[0]
|
|
||||||
if check.target in self.valid_enums:
|
if check.target in self.valid_enums:
|
||||||
raise DictConsistencyError(_(f'valid_enum already set for {check.target}'))
|
raise DictConsistencyError(_(f'valid_enum already set for {check.target}'))
|
||||||
if param.type not in ['string', 'python', 'number']:
|
if not hasattr(check, 'param'):
|
||||||
raise DictConsistencyError(_(f'unknown type {param.type} for param in valid_enum for {check.target}'))
|
raise DictConsistencyError(_(f'param is mandatory for a valid_enum of variable {check.target}'))
|
||||||
variable = self.objectspace.paths.get_variable_obj(check.target)
|
variable = self.objectspace.paths.get_variable_obj(check.target)
|
||||||
values = self.load_params_in_validenum(param,
|
values = self.load_params_in_valid_enum(check.param,
|
||||||
variable.name,
|
variable.name,
|
||||||
variable.type,
|
variable.type,
|
||||||
)
|
)
|
||||||
self.valid_enums[check.target] = {'type': param.type,
|
|
||||||
'values': values}
|
|
||||||
self._set_valid_enum(variable,
|
self._set_valid_enum(variable,
|
||||||
values,
|
values,
|
||||||
variable.type,
|
variable.type,
|
||||||
|
check.target
|
||||||
)
|
)
|
||||||
remove_indexes.append(idx)
|
remove_indexes.append(idx)
|
||||||
remove_indexes.sort(reverse=True)
|
remove_indexes.sort(reverse=True)
|
||||||
for idx in remove_indexes:
|
for idx in remove_indexes:
|
||||||
del self.objectspace.space.constraints.check[idx]
|
del self.objectspace.space.constraints.check[idx]
|
||||||
|
|
||||||
def load_params_in_validenum(self,
|
def load_params_in_valid_enum(self,
|
||||||
param,
|
params,
|
||||||
variable_name,
|
variable_name,
|
||||||
variable_type,
|
variable_type,
|
||||||
):
|
):
|
||||||
if not hasattr(param, 'text') and (param.type == 'python' or param.type == 'number'):
|
has_variable = None
|
||||||
raise DictConsistencyError(_(f"All '{param.type}' variables shall be set in order to calculate valid_enum for variable {variable_name}"))
|
values = []
|
||||||
if variable_type == 'string' and param.type == 'number':
|
for param in params:
|
||||||
raise DictConsistencyError(_(f'Unconsistency valid_enum type ({param.type}), for variable {variable_name}'))
|
if param.type == 'variable':
|
||||||
if param.type == 'python':
|
if has_variable is not None:
|
||||||
try:
|
raise DictConsistencyError(_(f'only one "variable" parameter is allowed for valid_enum of variable {variable_name}'))
|
||||||
values = eval(param.text, {'eosfunc': self.eosfunc, '__builtins__': {'range': range, 'str': str}})
|
has_variable = True
|
||||||
except NameError:
|
variable = self.objectspace.paths.get_variable_obj(param.text)
|
||||||
raise DictConsistencyError(_('The function {} is unknown').format(param.text))
|
if not variable.multi:
|
||||||
else:
|
raise DictConsistencyError(_(f'only multi "variable" parameter is allowed for valid_enum of variable {variable_name}'))
|
||||||
try:
|
values = param.text
|
||||||
values = literal_eval(param.text)
|
else:
|
||||||
except ValueError:
|
if has_variable:
|
||||||
raise DictConsistencyError(_(f'Cannot load {param.text} in valid_enum'))
|
raise DictConsistencyError(_(f'only one "variable" parameter is allowed for valid_enum of variable {variable_name}'))
|
||||||
if not isinstance(values, list):
|
if not hasattr(param, 'text'):
|
||||||
raise DictConsistencyError(_('Function {} shall return a list').format(param.text))
|
if param.type == 'number':
|
||||||
for value in values:
|
raise DictConsistencyError(_(f'value is mandatory for valid_enum of variable {variable_name}'))
|
||||||
if variable_type == 'string' and not isinstance(value, str):
|
values.append(None)
|
||||||
raise DictConsistencyError(_(f'Cannot load "{param.text}", "{value}" is not a string'))
|
else:
|
||||||
if variable_type == 'number' and not isinstance(value, int):
|
values.append(param.text)
|
||||||
raise DictConsistencyError(_(f'Cannot load "{param.text}", "{value}" is not a number'))
|
|
||||||
return values
|
return values
|
||||||
|
|
||||||
def check_change_warning(self):
|
def check_change_warning(self):
|
||||||
|
@ -736,9 +728,6 @@ class ConstraintAnnotator:
|
||||||
|
|
||||||
def check_params_target(self):
|
def check_params_target(self):
|
||||||
for condition in self.objectspace.space.constraints.condition:
|
for condition in self.objectspace.space.constraints.condition:
|
||||||
for param in condition.param:
|
|
||||||
if param.type not in TYPE_PARAM_CONDITION:
|
|
||||||
raise DictConsistencyError(_(f'cannot use {param.type} type as a param in a condition'))
|
|
||||||
if not hasattr(condition, 'target'):
|
if not hasattr(condition, 'target'):
|
||||||
raise DictConsistencyError(_('target is mandatory in condition'))
|
raise DictConsistencyError(_('target is mandatory in condition'))
|
||||||
for target in condition.target:
|
for target in condition.target:
|
||||||
|
@ -919,40 +908,52 @@ class ConstraintAnnotator:
|
||||||
variable.property.append(prop)
|
variable.property.append(prop)
|
||||||
del self.objectspace.space.constraints.condition
|
del self.objectspace.space.constraints.condition
|
||||||
|
|
||||||
def _set_valid_enum(self, variable, values, type_):
|
def _set_valid_enum(self, variable, values, type_, target):
|
||||||
# value for choice's variable is mandatory
|
# value for choice's variable is mandatory
|
||||||
variable.mandatory = True
|
variable.mandatory = True
|
||||||
# build choice
|
# build choice
|
||||||
variable.choice = []
|
variable.choice = []
|
||||||
choices = []
|
if isinstance(values, str):
|
||||||
for value in values:
|
|
||||||
choice = self.objectspace.choice()
|
choice = self.objectspace.choice()
|
||||||
try:
|
choice.type = 'calculation'
|
||||||
choice.name = CONVERSION.get(type_, str)(value)
|
choice.name = values
|
||||||
except:
|
|
||||||
raise DictConsistencyError(_(f'unable to change type of a valid_enum entry "{value}" is not a valid "{type_}" for "{variable.name}"'))
|
|
||||||
if choice.name == '':
|
|
||||||
choice.name = None
|
|
||||||
choices.append(choice.name)
|
|
||||||
choice.type = type_
|
|
||||||
variable.choice.append(choice)
|
variable.choice.append(choice)
|
||||||
|
else:
|
||||||
|
self.valid_enums[target] = {'type': type_,
|
||||||
|
'values': values,
|
||||||
|
}
|
||||||
|
choices = []
|
||||||
|
for value in values:
|
||||||
|
choice = self.objectspace.choice()
|
||||||
|
try:
|
||||||
|
if value is not None:
|
||||||
|
choice.name = CONVERSION.get(type_, str)(value)
|
||||||
|
else:
|
||||||
|
choice.name = value
|
||||||
|
except:
|
||||||
|
raise DictConsistencyError(_(f'unable to change type of a valid_enum entry "{value}" is not a valid "{type_}" for "{variable.name}"'))
|
||||||
|
if choice.name == '':
|
||||||
|
choice.name = None
|
||||||
|
choices.append(choice.name)
|
||||||
|
choice.type = type_
|
||||||
|
variable.choice.append(choice)
|
||||||
|
# check value or set first choice value has default value
|
||||||
|
if hasattr(variable, 'value'):
|
||||||
|
for value in variable.value:
|
||||||
|
value.type = type_
|
||||||
|
try:
|
||||||
|
cvalue = CONVERSION.get(type_, str)(value.name)
|
||||||
|
except:
|
||||||
|
raise DictConsistencyError(_(f'unable to change type of value "{value}" is not a valid "{type_}" for "{variable.name}"'))
|
||||||
|
if cvalue not in choices:
|
||||||
|
raise DictConsistencyError(_('value "{}" of variable "{}" is not in list of all expected values ({})').format(value.name, variable.name, choices))
|
||||||
|
else:
|
||||||
|
new_value = self.objectspace.value()
|
||||||
|
new_value.name = choices[0]
|
||||||
|
new_value.type = type_
|
||||||
|
variable.value = [new_value]
|
||||||
if not variable.choice:
|
if not variable.choice:
|
||||||
raise DictConsistencyError(_('empty valid enum is not allowed for variable {}').format(variable.name))
|
raise DictConsistencyError(_('empty valid enum is not allowed for variable {}').format(variable.name))
|
||||||
# check value or set first choice value has default value
|
|
||||||
if hasattr(variable, 'value'):
|
|
||||||
for value in variable.value:
|
|
||||||
value.type = type_
|
|
||||||
try:
|
|
||||||
cvalue = CONVERSION.get(type_, str)(value.name)
|
|
||||||
except:
|
|
||||||
raise DictConsistencyError(_(f'unable to change type of value "{value}" is not a valid "{type_}" for "{variable.name}"'))
|
|
||||||
if cvalue not in choices:
|
|
||||||
raise DictConsistencyError(_('value "{}" of variable "{}" is not in list of all expected values ({})').format(value.name, variable.name, choices))
|
|
||||||
else:
|
|
||||||
new_value = self.objectspace.value()
|
|
||||||
new_value.name = values[0]
|
|
||||||
new_value.type = type_
|
|
||||||
variable.value = [new_value]
|
|
||||||
variable.type = 'choice'
|
variable.type = 'choice'
|
||||||
|
|
||||||
def convert_check(self):
|
def convert_check(self):
|
||||||
|
@ -1007,7 +1008,6 @@ class ConstraintAnnotator:
|
||||||
indexes = list(fills.keys())
|
indexes = list(fills.keys())
|
||||||
indexes.sort()
|
indexes.sort()
|
||||||
targets = []
|
targets = []
|
||||||
eosfunc = dir(self.eosfunc)
|
|
||||||
for idx in indexes:
|
for idx in indexes:
|
||||||
fill = fills[idx]
|
fill = fills[idx]
|
||||||
# test if it's redefined calculation
|
# test if it's redefined calculation
|
||||||
|
@ -1015,25 +1015,30 @@ class ConstraintAnnotator:
|
||||||
raise DictConsistencyError(_(f"A fill already exists for the target: {fill.target}"))
|
raise DictConsistencyError(_(f"A fill already exists for the target: {fill.target}"))
|
||||||
targets.append(fill.target)
|
targets.append(fill.target)
|
||||||
#
|
#
|
||||||
if fill.name not in eosfunc:
|
if fill.name not in self.functions:
|
||||||
raise DictConsistencyError(_('cannot find fill function {}').format(fill.name))
|
raise DictConsistencyError(_('cannot find fill function {}').format(fill.name))
|
||||||
|
|
||||||
namespace = fill.namespace
|
namespace = fill.namespace
|
||||||
# let's replace the target by the path
|
# let's replace the target by the path
|
||||||
fill.target = self.objectspace.paths.get_variable_path(fill.target,
|
fill.target, suffix = self.objectspace.paths.get_variable_path(fill.target,
|
||||||
namespace,
|
namespace,
|
||||||
)
|
with_suffix=True,
|
||||||
|
)
|
||||||
|
if suffix is not None:
|
||||||
|
raise DictConsistencyError(_(f'Cannot add fill function to "{fill.target}" only with the suffix "{suffix}"'))
|
||||||
value = self.objectspace.value()
|
value = self.objectspace.value()
|
||||||
value.type = 'calculation'
|
value.type = 'calculation'
|
||||||
value.name = fill.name
|
value.name = fill.name
|
||||||
if hasattr(fill, 'param'):
|
if hasattr(fill, 'param'):
|
||||||
param_to_delete = []
|
param_to_delete = []
|
||||||
for fill_idx, param in enumerate(fill.param):
|
for fill_idx, param in enumerate(fill.param):
|
||||||
if param.type not in TYPE_PARAM_FILL:
|
if param.type not in ['suffix', 'string'] and not hasattr(param, 'text'):
|
||||||
raise DictConsistencyError(_(f'cannot use {param.type} type as a param in a fill/auto'))
|
raise DictConsistencyError(_(f"All '{param.type}' variables must have a value in order to calculate {fill.target}"))
|
||||||
if param.type != 'string' and not hasattr(param, 'text'):
|
if param.type == 'suffix' and hasattr(param, 'text'):
|
||||||
raise DictConsistencyError(_(f"All '{param.type}' variables shall have a value in order to calculate {fill.target}"))
|
raise DictConsistencyError(_(f"All '{param.type}' variables must not have a value in order to calculate {fill.target}"))
|
||||||
|
if param.type == 'string':
|
||||||
|
if not hasattr(param, 'text'):
|
||||||
|
param.text = None
|
||||||
if param.type == 'variable':
|
if param.type == 'variable':
|
||||||
try:
|
try:
|
||||||
param.text, suffix = self.objectspace.paths.get_variable_path(param.text,
|
param.text, suffix = self.objectspace.paths.get_variable_path(param.text,
|
||||||
|
@ -1136,9 +1141,9 @@ class FamilyAnnotator:
|
||||||
if param.type == 'variable':
|
if param.type == 'variable':
|
||||||
has_variable = True
|
has_variable = True
|
||||||
break
|
break
|
||||||
if not has_variable:
|
#if not has_variable:
|
||||||
# if one parameter is a variable, let variable choice if it's mandatory
|
# # if one parameter is a variable, let variable choice if it's mandatory
|
||||||
variable.mandatory = True
|
# variable.mandatory = True
|
||||||
if has_value:
|
if has_value:
|
||||||
# if has value but without any calculation
|
# if has value but without any calculation
|
||||||
variable.mandatory = True
|
variable.mandatory = True
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
<!ATTLIST group description CDATA #IMPLIED>
|
<!ATTLIST group description CDATA #IMPLIED>
|
||||||
|
|
||||||
<!ELEMENT param (#PCDATA)>
|
<!ELEMENT param (#PCDATA)>
|
||||||
<!ATTLIST param type (string|variable|number|python) "string">
|
<!ATTLIST param type (string|number|variable|information|suffix) "string">
|
||||||
<!ATTLIST param name CDATA #IMPLIED>
|
<!ATTLIST param name CDATA #IMPLIED>
|
||||||
<!ATTLIST param notraisepropertyerror (True|False) "False">
|
<!ATTLIST param notraisepropertyerror (True|False) "False">
|
||||||
<!ATTLIST param optional (True|False) "False">
|
<!ATTLIST param optional (True|False) "False">
|
||||||
|
|
|
@ -191,12 +191,16 @@ class Path:
|
||||||
if name not in self.variables:
|
if name not in self.variables:
|
||||||
for var_name, variable in self.variables.items():
|
for var_name, variable in self.variables.items():
|
||||||
if variable['is_dynamic'] and name.startswith(var_name):
|
if variable['is_dynamic'] and name.startswith(var_name):
|
||||||
|
if not with_suffix:
|
||||||
|
raise Exception('This option is dynamic, should use "with_suffix" attribute')
|
||||||
return variable, name[len(var_name):]
|
return variable, name[len(var_name):]
|
||||||
if '.' not in name:
|
if '.' not in name:
|
||||||
for var_name, path in self.full_paths.items():
|
for var_name, path in self.full_paths.items():
|
||||||
if name.startswith(var_name):
|
if name.startswith(var_name):
|
||||||
variable = self.variables[self.full_paths[var_name]]
|
variable = self.variables[self.full_paths[var_name]]
|
||||||
if variable['is_dynamic']:
|
if variable['is_dynamic']:
|
||||||
|
if not with_suffix:
|
||||||
|
raise Exception('This option is dynamic, should use "with_suffix" attribute')
|
||||||
return variable, name[len(var_name):]
|
return variable, name[len(var_name):]
|
||||||
raise DictConsistencyError(_('unknown option {}').format(name))
|
raise DictConsistencyError(_('unknown option {}').format(name))
|
||||||
if with_suffix:
|
if with_suffix:
|
||||||
|
|
|
@ -44,13 +44,16 @@ class TiramisuReflector:
|
||||||
funcs_path,
|
funcs_path,
|
||||||
):
|
):
|
||||||
self.storage = ElementStorage()
|
self.storage = ElementStorage()
|
||||||
self.storage.text = ["try:",
|
self.storage.text = ["import imp",
|
||||||
|
f"func = imp.load_source('func', '{funcs_path}')",
|
||||||
|
"for key, value in dict(locals()).items():",
|
||||||
|
" if key != ['imp', 'func']:",
|
||||||
|
" setattr(func, key, value)",
|
||||||
|
"try:",
|
||||||
" from tiramisu3 import *",
|
" from tiramisu3 import *",
|
||||||
"except:",
|
"except:",
|
||||||
" from tiramisu import *",
|
" from tiramisu import *",
|
||||||
"from rougail.tiramisu import ConvertDynOptionDescription",
|
"from rougail.tiramisu import ConvertDynOptionDescription",
|
||||||
"import imp",
|
|
||||||
f"func = imp.load_source('func', '{funcs_path}')",
|
|
||||||
]
|
]
|
||||||
self.make_tiramisu_objects(xmlroot)
|
self.make_tiramisu_objects(xmlroot)
|
||||||
# parse object
|
# parse object
|
||||||
|
@ -252,7 +255,7 @@ class Common:
|
||||||
if not self.attrib[key]:
|
if not self.attrib[key]:
|
||||||
continue
|
continue
|
||||||
value = "frozenset({" + self.attrib[key] + "})"
|
value = "frozenset({" + self.attrib[key] + "})"
|
||||||
elif key in ['default', 'multi', 'suffixes', 'validators']:
|
elif key in ['default', 'multi', 'suffixes', 'validators', 'values']:
|
||||||
value = self.attrib[key]
|
value = self.attrib[key]
|
||||||
elif isinstance(value, str) and key != 'opt' and not value.startswith('['):
|
elif isinstance(value, str) and key != 'opt' and not value.startswith('['):
|
||||||
value = "'" + value.replace("'", "\\\'") + "'"
|
value = "'" + value.replace("'", "\\\'") + "'"
|
||||||
|
@ -368,9 +371,16 @@ class Variable(Common):
|
||||||
elif tag == 'check':
|
elif tag == 'check':
|
||||||
self.attrib['validators'].append(self.calculation_value(child, ['ParamSelfOption()']))
|
self.attrib['validators'].append(self.calculation_value(child, ['ParamSelfOption()']))
|
||||||
elif tag == 'choice':
|
elif tag == 'choice':
|
||||||
choices.append(child.name)
|
if child.type == 'calculation':
|
||||||
|
value = self.storage.get(child.name).get()
|
||||||
|
choices = f"Calculation(func.calc_value, Params((ParamOption({value}))))"
|
||||||
|
else:
|
||||||
|
choices.append(child.name)
|
||||||
if choices:
|
if choices:
|
||||||
self.attrib['values'] = tuple(choices)
|
if isinstance(choices, list):
|
||||||
|
self.attrib['values'] = str(tuple(choices))
|
||||||
|
else:
|
||||||
|
self.attrib['values'] = choices
|
||||||
if self.attrib['default'] == []:
|
if self.attrib['default'] == []:
|
||||||
del self.attrib['default']
|
del self.attrib['default']
|
||||||
elif not self.attrib['multi'] and isinstance(self.attrib['default'], list):
|
elif not self.attrib['multi'] and isinstance(self.attrib['default'], list):
|
||||||
|
@ -415,6 +425,10 @@ class Variable(Common):
|
||||||
if hasattr(param, 'suffix'):
|
if hasattr(param, 'suffix'):
|
||||||
value['suffix'] = param.suffix
|
value['suffix'] = param.suffix
|
||||||
return self.build_param(value)
|
return self.build_param(value)
|
||||||
|
elif param.type == 'information':
|
||||||
|
return f'ParamInformation("{param.text}", None)'
|
||||||
|
elif param.type == 'suffix':
|
||||||
|
return f'ParamSuffix()'
|
||||||
raise LoaderError(_('unknown param type {}').format(param.type))
|
raise LoaderError(_('unknown param type {}').format(param.type))
|
||||||
|
|
||||||
def populate_value(self,
|
def populate_value(self,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non", "rougail.general.module_instancie": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non", "rougail.general.module_instancie": "non"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
|
|
||||||
<variables>
|
<variables>
|
||||||
<family name="general">
|
<family name="general">
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True">
|
<variable name="mode_conteneur_actif" type="oui/non" description="No change"/>
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="mode_conteneur_actif1" type="oui/non" description="No change">
|
<variable name="mode_conteneur_actif1" type="oui/non" description="No change">
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -6,7 +6,7 @@ from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<variables>
|
<variables>
|
||||||
<family name="general" mode="basic">
|
<family name="general" mode="basic">
|
||||||
<variable name="mode_conteneur_actif" type="domain" description="No change" mandatory="True" mode="expert"/>
|
<variable name="mode_conteneur_actif" type="oui/non" description="No change" mandatory="True" mode="expert"/>
|
||||||
<variable name="mode_conteneur_actif1" type="oui/non" description="No change">
|
<variable name="mode_conteneur_actif1" type="oui/non" description="No change">
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -6,7 +6,7 @@ from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_3 = DomainnameOption(type='domainname', allow_ip=False, properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": 3, "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -5,7 +5,7 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = IntOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={})))
|
option_3 = IntOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={})))
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif1": "non"}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif1": "non"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.autosavevar": null}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.autosavevar": "oui"}
|
||||||
|
|
|
@ -6,7 +6,7 @@ from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'frozen', 'hidden', 'mandatory'}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
|
option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'frozen', 'hidden'}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
|
||||||
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.autosavevar": null}
|
{"rougail.general.mode_conteneur_actif": "non", "rougail.general.autosavevar": "oui"}
|
||||||
|
|
|
@ -6,7 +6,7 @@ from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
|
option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
|
||||||
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
||||||
|
|
|
@ -8,7 +8,7 @@ func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_9 = StrOption(properties=frozenset({'normal'}), name='follower3', doc='follower3', multi=True)
|
option_9 = StrOption(properties=frozenset({'normal'}), name='follower3', doc='follower3', multi=True)
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8, option_9])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8, option_9])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower3', doc='follower3', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower3', doc='follower3', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7, option_8])
|
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7, option_8])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory'}), 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")})))
|
||||||
option_7 = StrOption(properties=frozenset({'expert'}), name='follower1', doc='follower1', multi=True)
|
option_7 = StrOption(properties=frozenset({'expert'}), name='follower1', doc='follower1', multi=True)
|
||||||
option_8 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True)
|
option_8 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True)
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'expert'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'expert'}), children=[option_6, option_7, option_8])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_7 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_7 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
option_5 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
|
||||||
option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
|
||||||
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'mandatory'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower1', doc='follower1', multi=True)
|
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower1', doc='follower1', multi=True)
|
||||||
option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower2', doc='follower2', multi=True)
|
option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower2', doc='follower2', multi=True)
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'hidden', 'normal'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'hidden', 'normal'}), children=[option_6, option_7, option_8])
|
||||||
|
|
|
@ -7,7 +7,7 @@ import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True)
|
option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True)
|
||||||
option_6 = StrOption(properties=frozenset({'basic', 'mandatory'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'basic'}), children=[option_5, option_6, option_7])
|
option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'basic'}), children=[option_5, option_6, option_7])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
|
||||||
|
|
|
@ -8,7 +8,7 @@ func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
||||||
option_10 = StrOption(name='leader1', doc='leader', multi=True)
|
option_10 = StrOption(name='leader1', doc='leader', multi=True)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": null, "rougail.general.mode_conteneur_actif2": "non"}
|
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non"}
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="condition">
|
<check name="valid_enum" target="condition">
|
||||||
<param>['tous', 'authentifié', 'aucun']</param>
|
<param>tous</param>
|
||||||
|
<param>authentifié</param>
|
||||||
|
<param>aucun</param>
|
||||||
</check>
|
</check>
|
||||||
<condition name="hidden_if_in" source="condition">
|
<condition name="hidden_if_in" source="condition">
|
||||||
<param>tous</param>
|
<param>tous</param>
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="condition">
|
<check name="valid_enum" target="condition">
|
||||||
<param>['tous', 'authentifié', 'aucun']</param>
|
<param>tous</param>
|
||||||
|
<param>authentifié</param>
|
||||||
|
<param>aucun</param>
|
||||||
</check>
|
</check>
|
||||||
<condition name='hidden_if_in' source='condition'>
|
<condition name='hidden_if_in' source='condition'>
|
||||||
<param>oui</param>
|
<param>oui</param>
|
||||||
|
|
|
@ -8,7 +8,7 @@ func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
||||||
|
|
|
@ -8,7 +8,7 @@ func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
||||||
option_5 = Leadership(name='leader', doc='other description', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='other description', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
||||||
|
|
|
@ -8,7 +8,7 @@ func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=submulti, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})), default_multi=[])
|
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=submulti, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})), default_multi=[])
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
||||||
|
|
|
@ -19,7 +19,10 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>['a', 'b', 'c', 'é']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
|
<param>é</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,14 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
<check name="valid_enum" target="enumvar2">
|
<check name="valid_enum" target="enumvar2">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>['a','c']</param>
|
<param>a</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="string" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
|
||||||
<param type="python">eosfunc.list_files('/notexists', default=['oui', 'non'])</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non"}
|
|
|
@ -5,7 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="follower1">
|
<check name="valid_enum" target="follower1">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
<group leader="leader">
|
<group leader="leader">
|
||||||
<follower>follower1</follower>
|
<follower>follower1</follower>
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
</rougail>
|
</rougail>
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="multi">
|
<check name="valid_enum" target="multi">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>['a','b','']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param/>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>[1, 2, 3]</param>
|
<param>1</param>
|
||||||
|
<param>2</param>
|
||||||
|
<param>3</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="enumvar">
|
<check name="valid_enum" target="enumvar">
|
||||||
<param>[1, 2, 3]</param>
|
<param>1</param>
|
||||||
|
<param>2</param>
|
||||||
|
<param>3</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general" mode="expert">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name="enumfam" mode="expert">
|
|
||||||
<variable name="enumvar" type="string" description="multi">
|
|
||||||
<value>test</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="enumvar">
|
|
||||||
<param type="python">eosfunc.calc_multi_val(['test'])</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help>
|
|
||||||
<variable name="enumvar">bla bla bla</variable>
|
|
||||||
</help>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non", "rougail.enumfam.enumvar": "test"}
|
|
|
@ -5,10 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='multi', multi=False, default='test', values=('test',))
|
|
||||||
option_5.impl_set_information("help", "bla bla bla")
|
|
||||||
option_4 = OptionDescription(name='enumfam', doc='enumfam', properties=frozenset({'expert'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
<check name="valid_enum" target="mode_conteneur_actif">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services>
|
|
||||||
<service name="test">
|
|
||||||
<file name="/tmp/file" filelist="afilllist"/>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="condition" type="string" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="mode_conteneur_actif2" type="oui/non" description="No change" hidden="True">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="condition">
|
|
||||||
<param>['non','statique']</param>
|
|
||||||
</check>
|
|
||||||
<condition name="disabled_if_not_in" source="condition">
|
|
||||||
<param>statique</param>
|
|
||||||
<target type="filelist">afilllist</target>
|
|
||||||
</condition>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.condition": "non", "rougail.general.mode_conteneur_actif": "non", "rougail.general.mode_conteneur_actif2": "non", "services.test.files.file.group": "root", "services.test.files.file.mode": "0644", "services.test.files.file.name": "/tmp/file", "services.test.files.file.owner": "root", "services.test.files.file.source": "file", "services.test.files.file.templating": true}
|
|
|
@ -5,21 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('non', 'statique'))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_10 = StrOption(name='group', doc='group', multi=False, default='root')
|
|
||||||
option_11 = StrOption(name='mode', doc='mode', multi=False, default='0644')
|
|
||||||
option_12 = StrOption(name='name', doc='name', multi=False, default='/tmp/file')
|
|
||||||
option_13 = StrOption(name='owner', doc='owner', multi=False, default='root')
|
|
||||||
option_14 = StrOption(name='source', doc='source', multi=False, default='file')
|
|
||||||
option_15 = BoolOption(name='templating', doc='templating', multi=False, default=True)
|
|
||||||
option_16 = BoolOption(properties=frozenset({Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('statique'), 'reverse_condition': ParamValue(True)}))}), name='activate', doc='activate', multi=False, default=True)
|
|
||||||
option_9 = OptionDescription(name='file', doc='file', children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
|
|
||||||
option_8 = OptionDescription(name='files', doc='files', children=[option_9])
|
|
||||||
option_7 = OptionDescription(name='test', doc='test', children=[option_8])
|
|
||||||
option_7.impl_set_information("manage", True)
|
|
||||||
option_6 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_7])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_6])
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<rougail>
|
|
||||||
<variables>
|
|
||||||
<family name='general'>
|
|
||||||
<variable name='varname' type='string' description="No change" multi="True">
|
|
||||||
<value>val1</value>
|
|
||||||
<value>val2</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name='dyn' dynamic="varname">
|
|
||||||
<variable name='vardyn' type='string' description="No change">
|
|
||||||
<value>val</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name='new'>
|
|
||||||
<variable name='newvar' type='string' description="No change"/>
|
|
||||||
</family>
|
|
||||||
</variables>
|
|
||||||
<constraints>
|
|
||||||
<fill name="calc_val" target="newvar">
|
|
||||||
<param type="variable">vardynval1</param>
|
|
||||||
</fill>
|
|
||||||
</constraints>
|
|
||||||
</rougail>
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.varname": ["val1", "val2"], "rougail.dynval1.vardynval1": "val", "rougail.dynval2.vardynval2": "val", "rougail.new.newvar": null}
|
|
|
@ -5,11 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='varname', doc='No change', multi=True, default=['val1', 'val2'], default_multi='val2')
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_5 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='vardyn', doc='No change', multi=False, default='val')
|
|
||||||
option_4 = ConvertDynOptionDescription(name='dyn', doc='dyn', suffixes=Calculation(func.calc_value, Params((ParamOption(option_3)))), properties=frozenset({'normal'}), children=[option_5])
|
|
||||||
option_7 = StrOption(properties=frozenset({'normal'}), name='newvar', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamDynOption(option_5, 'val1', option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
|
|
||||||
option_6 = OptionDescription(name='new', doc='new', properties=frozenset({'normal'}), children=[option_7])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4, option_6])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.varname": [1, 2], "rougail.dyn1.vardyn1": "val", "rougail.dyn2.vardyn2": "val", "rougail.new.newvar": null}
|
{"rougail.general.varname": [1, 2], "rougail.dyn1.vardyn1": "val", "rougail.dyn2.vardyn2": "val", "rougail.new.newvar": "val"}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="string" description="No change" hidden="True"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<fill name="calc_val" target="mode_conteneur_actif">
|
|
||||||
<param>value</param>
|
|
||||||
</fill>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null}
|
|
|
@ -5,7 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("value")), kwargs={})))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="string" description="No change"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<fill name="calc_val" target="mode_conteneur_actif">
|
|
||||||
<param>value</param>
|
|
||||||
</fill>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": null}
|
{}
|
||||||
|
|
|
@ -5,7 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("value")), kwargs={})))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
</variables>
|
</variables>
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="toto1">
|
<fill name="calc_multi_condition" target="toto1">
|
||||||
<param type="python"/>
|
<param/>
|
||||||
</check>
|
</fill>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
</rougail>
|
</rougail>
|
|
@ -0,0 +1,2 @@
|
||||||
|
{"rougail.proxy_authentifie.toto1": null, "rougail.proxy_authentifie.toto2": "3127"}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
try:
|
||||||
|
from tiramisu3 import *
|
||||||
|
except:
|
||||||
|
from tiramisu import *
|
||||||
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
|
import imp
|
||||||
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
|
option_3 = PortOption(allow_private=True, properties=frozenset({'expert'}), name='toto1', doc='Port d\'écoute du proxy', multi=False, default=Calculation(func.calc_multi_condition, Params((ParamValue("None")), kwargs={})))
|
||||||
|
option_4 = PortOption(allow_private=True, properties=frozenset({'expert', 'mandatory'}), name='toto2', doc='Port d\'écoute du proxy NTLM', multi=False, default='3127')
|
||||||
|
option_2 = OptionDescription(name='proxy_authentifie', doc='proxy authentifié', properties=frozenset({'expert'}), children=[option_3, option_4])
|
||||||
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<rougail>
|
||||||
|
<services/>
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="proxy authentifié">
|
||||||
|
<variable name="toto1" type="port" description="Port d'écoute du proxy" mode="expert">
|
||||||
|
</variable>
|
||||||
|
<variable name="toto2" type="port" description="Port d'écoute du proxy NTLM" mode="expert">
|
||||||
|
<value>3127</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="calc_multi_condition" target="toto1">
|
||||||
|
<param name="value"/>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
</rougail>
|
|
@ -0,0 +1,2 @@
|
||||||
|
{"rougail.proxy_authentifie.toto1": null, "rougail.proxy_authentifie.toto2": "3127"}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
try:
|
||||||
|
from tiramisu3 import *
|
||||||
|
except:
|
||||||
|
from tiramisu import *
|
||||||
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
|
import imp
|
||||||
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
|
option_3 = PortOption(allow_private=True, properties=frozenset({'expert'}), name='toto1', doc='Port d\'écoute du proxy', multi=False, default=Calculation(func.calc_multi_condition, Params((), kwargs={'value': ParamValue("None")})))
|
||||||
|
option_4 = PortOption(allow_private=True, properties=frozenset({'expert', 'mandatory'}), name='toto2', doc='Port d\'écoute du proxy NTLM', multi=False, default='3127')
|
||||||
|
option_2 = OptionDescription(name='proxy_authentifie', doc='proxy authentifié', properties=frozenset({'expert'}), children=[option_3, option_4])
|
||||||
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
@ -8,7 +8,7 @@ func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
||||||
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='condition', multi=False, default='oui', values=('oui', 'non'))
|
option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='condition', multi=False, default='oui', values=('oui', 'non'))
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
||||||
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui')}))}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui')}))}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True)
|
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True)
|
||||||
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name="general2" hidden="True">
|
|
||||||
<variable name="mode_conteneur_actif2" type="oui/non" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
<variable name="mode_conteneur_actif3" type="string" description="No change"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="mode_conteneur_actif3">
|
|
||||||
<param>['a','b','c']</param>
|
|
||||||
</check>
|
|
||||||
<condition name="disabled_if_in" source="mode_conteneur_actif3">
|
|
||||||
<param>d</param>
|
|
||||||
<target type="variable">mode_conteneur_actif</target>
|
|
||||||
</condition>
|
|
||||||
<condition name="disabled_if_not_in" source="mode_conteneur_actif3">
|
|
||||||
<param>d</param>
|
|
||||||
<target type="variable">mode_conteneur_actif2</target>
|
|
||||||
</condition>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non", "rougail.general2.mode_conteneur_actif3": "a"}
|
|
|
@ -5,10 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_5 = ChoiceOption(properties=frozenset({'disabled', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_6 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif3', doc='No change', multi=False, default='a', values=('a', 'b', 'c'))
|
|
||||||
option_4 = OptionDescription(name='general2', doc='general2', properties=frozenset({'hidden', 'normal'}), children=[option_5, option_6])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
<check name="valid_enum" target="mode_conteneur_actif">
|
||||||
<param>['a','b','c']</param>
|
<param>a</param>
|
||||||
|
<param>b</param>
|
||||||
|
<param>c</param>
|
||||||
</check>
|
</check>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="string" description="Redefine description" hidden="True"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
|
||||||
<param>['a','b','c']</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" redefine="True"/>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
|
||||||
<param>['a','b']</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "a"}
|
|
|
@ -5,7 +5,4 @@ except:
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
from rougail.tiramisu import ConvertDynOptionDescription
|
||||||
import imp
|
import imp
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||||
option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine description', multi=False, default='a', values=('a', 'b'))
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[])
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non", "extra.test.delay": 0, "extra.test.calc_url": null}
|
{"rougail.general.mode_conteneur_actif": "non", "extra.test.delay": 0, "extra.test.calc_url": "http://localhost/"}
|
||||||
|
|
|
@ -9,7 +9,7 @@ option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen
|
||||||
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3])
|
option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3])
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||||
option_6 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='delay', doc='délai en minutes avant lancement', multi=False, default=0)
|
option_6 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='delay', doc='délai en minutes avant lancement', multi=False, default=0)
|
||||||
option_7 = URLOption(allow_ip=True, allow_without_dot=True, properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='calc_url', doc='domain', multi=False, default=Calculation(func.calc_val, Params((ParamValue("http://localhost/")), kwargs={})))
|
option_7 = URLOption(allow_ip=True, allow_without_dot=True, properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='calc_url', doc='domain', multi=False, default=Calculation(func.calc_val, Params((ParamValue("http://localhost/")), kwargs={})))
|
||||||
option_5 = OptionDescription(name='test', doc='test', properties=frozenset({'normal'}), children=[option_6, option_7])
|
option_5 = OptionDescription(name='test', doc='test', properties=frozenset({'normal'}), children=[option_6, option_7])
|
||||||
option_4 = OptionDescription(name='extra', doc='extra', children=[option_5])
|
option_4 = OptionDescription(name='extra', doc='extra', children=[option_5])
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_4])
|
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1, option_4])
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<rougail>
|
||||||
|
<services/>
|
||||||
|
|
||||||
|
<variables>
|
||||||
|
<family name="proxy authentifié">
|
||||||
|
<variable name="toto1" type="port" description="Port d'écoute du proxy" mode="expert">
|
||||||
|
</variable>
|
||||||
|
<variable name="toto2" type="port" description="Port d'écoute du proxy NTLM" mode="expert">
|
||||||
|
<value>3127</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="calc_multi_condition" target="toto1">
|
||||||
|
<param name="value" type="number"/>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
|
||||||
|
</rougail>
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="string" description="No change"/>
|
|
||||||
</family>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
|
||||||
<param>[]</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="string" description="No change"/>
|
|
||||||
</family>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="unknown_variable">
|
|
||||||
<param>['oui', 'non']</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change"/>
|
|
||||||
</family>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="mode_conteneur_actif">
|
|
||||||
<param>['maybe']</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help/>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general" mode="expert">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name="enumfam" mode="expert">
|
|
||||||
<variable name="enumvar" type="string" description="multi">
|
|
||||||
<value>c</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="enumvar">
|
|
||||||
<param type="python">eosfunc.valid_lower('toto')</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help>
|
|
||||||
<variable name="enumvar">bla bla bla</variable>
|
|
||||||
</help>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general" mode="expert">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name="enumfam" mode="expert">
|
|
||||||
<variable name="enumvar" type="string" description="multi">
|
|
||||||
<value>c</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="enumvar">
|
|
||||||
<param type="python">toto</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help>
|
|
||||||
<variable name="enumvar">bla bla bla</variable>
|
|
||||||
</help>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail>
|
|
||||||
|
|
||||||
<services/>
|
|
||||||
|
|
||||||
<variables>
|
|
||||||
<family name="general" mode="expert">
|
|
||||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name="enumfam" mode="expert">
|
|
||||||
<variable name="enumvar" type="string" description="multi">
|
|
||||||
<value>c</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<separators/>
|
|
||||||
</variables>
|
|
||||||
|
|
||||||
<constraints>
|
|
||||||
<check name="valid_enum" target="enumvar">
|
|
||||||
<param type="python">eosfunc.calc_multi_val(['pouet'])</param>
|
|
||||||
</check>
|
|
||||||
</constraints>
|
|
||||||
|
|
||||||
<help>
|
|
||||||
<variable name="enumvar">bla bla bla</variable>
|
|
||||||
</help>
|
|
||||||
|
|
||||||
</rougail>
|
|
||||||
<!-- vim: ts=4 sw=4 expandtab
|
|
||||||
-->
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue