Compare commits
No commits in common. "fc686e9b7fed05846517f491b5c19250440e52cf" and "55c3021a5dbb3b4f19b43bc09ab10e24d19ba06c" have entirely different histories.
fc686e9b7f
...
55c3021a5d
|
@ -1,8 +1,6 @@
|
|||
# Paramètre de type information
|
||||
|
||||
## Les informations de la configuration
|
||||
|
||||
Le paramètre peut être la valeur est issue d'une information de la configuration :
|
||||
Le paramètre peut être la valeur est issue d'une information de la configuration.
|
||||
|
||||
```
|
||||
<param type="information">server_name</param>
|
||||
|
@ -10,15 +8,3 @@ Le paramètre peut être la valeur est issue d'une information de la configurati
|
|||
|
||||
Dans ce cas, l'information de la configuration "server_name" sera utilisé comme valeur du paramètre.
|
||||
Si l'information n'existe pas, la paramètre aura la valeur "None".
|
||||
|
||||
## Les informations de la cible
|
||||
|
||||
Le paramètre peut être la valeur est issue d'une information de la cible du calcul :
|
||||
|
||||
```
|
||||
<param type="target_information">test</param>
|
||||
<param type="target_information">help</param>
|
||||
```
|
||||
|
||||
Dans ce cas, l'information de la configuration "test" ou "help" sera utilisé comme valeur du paramètre.
|
||||
Si l'information n'existe pas, la paramètre aura la valeur "None".
|
||||
|
|
|
@ -29,8 +29,6 @@ En plus de la description, il est possible de préciser une aide complémentaire
|
|||
<variable name="my_variable" help="This is a greate variable"/>
|
||||
```
|
||||
|
||||
Cette aide peut être utilisé à tout moment comme valeur [d'un paramètre](../param/information.md).
|
||||
|
||||
## Le type de la variable
|
||||
|
||||
Une variable a un type. Ce type permet de définir les valeurs acceptées par cette variable :
|
||||
|
@ -236,8 +234,6 @@ Il est possible de préciser plusieurs valeurs avec le séparateur "|" :
|
|||
<variable name="my_variable" test="yes|no"/>
|
||||
```
|
||||
|
||||
Cette valeur peut être utilisé à tout moment comme valeur [d'un paramètre](../param/information.md).
|
||||
|
||||
## Mode de la variable
|
||||
|
||||
Le [mode](../mode.md) par défaut d'une variable correspond au [mode](../mode.md) de la [famille](../family/README.md).
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<!ATTLIST condition apply_on_fallback (True|False) #IMPLIED>
|
||||
|
||||
<!ELEMENT param (#PCDATA)>
|
||||
<!ATTLIST param type (string|number|nil|boolean|variable|information|target_information|suffix|index) "string">
|
||||
<!ATTLIST param type (string|number|nil|boolean|variable|information|suffix|index) "string">
|
||||
<!ATTLIST param name CDATA #IMPLIED>
|
||||
<!ATTLIST param propertyerror (True|False) "True">
|
||||
<!ATTLIST param optional (True|False) "False">
|
||||
|
|
|
@ -241,7 +241,7 @@ class RougailBaseTemplate:
|
|||
variable = filevar['variable']
|
||||
else:
|
||||
variable = None
|
||||
filenames = filevar.get('name')
|
||||
filenames = filevar['name']
|
||||
if not isinstance(filenames, list):
|
||||
filenames = [filenames]
|
||||
if variable and not isinstance(variable, list):
|
||||
|
|
|
@ -252,8 +252,6 @@ class Common:
|
|||
return self.build_option_param(param)
|
||||
if param.type == 'information':
|
||||
return f'ParamInformation("{param.text}", None)'
|
||||
if param.type == 'target_information':
|
||||
return f'ParamSelfInformation("{param.text}", None)'
|
||||
if param.type == 'suffix':
|
||||
return 'ParamSuffix()'
|
||||
if param.type == 'index':
|
||||
|
|
|
@ -167,9 +167,6 @@ class RougailUpgrade:
|
|||
raise UpgradeError(_(f'cannot convert param with type "{type}"'))
|
||||
if subsubelement.attrib['name'] == 'valid_entier' and not 'type' in subsubsubelement.attrib:
|
||||
subsubsubelement.attrib['type'] = 'number'
|
||||
if (not type or type == 'variable') and subsubsubelement.text in upgrade_help.get('variables', {}).get('remove', []):
|
||||
subsubelement.remove(subsubsubelement)
|
||||
continue
|
||||
if subsubelement.attrib['name'] == 'valid_enum' and not type:
|
||||
if subsubsubelement.attrib.get('name') == 'checkval':
|
||||
raise UpgradeError(_('checkval in valid_enum is no more supported'))
|
||||
|
@ -247,9 +244,6 @@ class RougailUpgrade:
|
|||
if subsubelement.tag == 'fill' and subsubelement.attrib['target'] in upgrade_help.get('fills', {}).get('remove', []):
|
||||
subelement.remove(subsubelement)
|
||||
continue
|
||||
if subsubelement.tag == 'check' and subsubelement.attrib['target'] in upgrade_help.get('check', {}).get('remove', []):
|
||||
subelement.remove(subsubelement)
|
||||
continue
|
||||
if subsubelement.attrib['target'] in upgrade_help.get('variables', {}).get('remove', []):
|
||||
subelement.remove(subsubelement)
|
||||
continue
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<rougail version="0.9">
|
||||
|
||||
<services>
|
||||
<service name='nut'>
|
||||
<ip>nut_monitor_host</ip>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<variables>
|
||||
<variable name="nut_monitor_host" type="ip" mandatory='True' disabled="True">
|
||||
<value>192.168.0.1</value>
|
||||
</variable>
|
||||
</variables>
|
||||
</rougail>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"services.nut.ip.nut_monitor_host.activate": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
},
|
||||
"services.nut.activate": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
},
|
||||
"services.nut.manage": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"services.nut.ip.nut_monitor_host.activate": true,
|
||||
"services.nut.activate": true,
|
||||
"services.nut.manage": true
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"services.nut.ip.nut_monitor_host.activate": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
},
|
||||
"services.nut.activate": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
},
|
||||
"services.nut.manage": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
[Service]
|
||||
IPAddressDeny=any
|
|
@ -1,24 +0,0 @@
|
|||
from importlib.machinery import SourceFileLoader
|
||||
from importlib.util import spec_from_loader, module_from_spec
|
||||
loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||
spec = spec_from_loader(loader.name, loader)
|
||||
func = module_from_spec(spec)
|
||||
loader.exec_module(func)
|
||||
for key, value in dict(locals()).items():
|
||||
if key != ['SourceFileLoader', 'func']:
|
||||
setattr(func, key, value)
|
||||
try:
|
||||
from tiramisu3 import *
|
||||
except:
|
||||
from tiramisu import *
|
||||
option_2 = IPOption(name="nut_monitor_host", doc="nut_monitor_host", default="192.168.0.1", allow_reserved=True, properties=frozenset({"disabled", "mandatory", "normal"}))
|
||||
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
|
||||
option_7 = SymLinkOption(name="name", opt=option_2)
|
||||
option_8 = BoolOption(name="activate", doc="activate", default=True)
|
||||
option_6 = OptionDescription(name="nut_monitor_host", doc="nut_monitor_host", children=[option_7, option_8])
|
||||
option_5 = OptionDescription(name="ip", doc="ip", children=[option_6])
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
option_10 = BoolOption(name="manage", doc="manage", default=True)
|
||||
option_4 = OptionDescription(name="nut", doc="nut", children=[option_5, option_9, option_10])
|
||||
option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"}))
|
||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3])
|
Loading…
Reference in New Issue