can add personal function
This commit is contained in:
21
tests/dictionaries/40empty_param/00_base.xml
Normal file
21
tests/dictionaries/40empty_param/00_base.xml
Normal file
@ -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/>
|
||||
</fill>
|
||||
</constraints>
|
||||
|
||||
</rougail>
|
0
tests/dictionaries/40empty_param/__init__.py
Normal file
0
tests/dictionaries/40empty_param/__init__.py
Normal file
2
tests/dictionaries/40empty_param/makedict/base.json
Normal file
2
tests/dictionaries/40empty_param/makedict/base.json
Normal file
@ -0,0 +1,2 @@
|
||||
{"rougail.proxy_authentifie.toto1": null, "rougail.proxy_authentifie.toto2": "3127"}
|
||||
|
12
tests/dictionaries/40empty_param/tiramisu/base.py
Normal file
12
tests/dictionaries/40empty_param/tiramisu/base.py
Normal file
@ -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])
|
21
tests/dictionaries/40empty_param2/00_base.xml
Normal file
21
tests/dictionaries/40empty_param2/00_base.xml
Normal file
@ -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
tests/dictionaries/40empty_param2/__init__.py
Normal file
0
tests/dictionaries/40empty_param2/__init__.py
Normal file
2
tests/dictionaries/40empty_param2/makedict/base.json
Normal file
2
tests/dictionaries/40empty_param2/makedict/base.json
Normal file
@ -0,0 +1,2 @@
|
||||
{"rougail.proxy_authentifie.toto1": null, "rougail.proxy_authentifie.toto2": "3127"}
|
||||
|
12
tests/dictionaries/40empty_param2/tiramisu/base.py
Normal file
12
tests/dictionaries/40empty_param2/tiramisu/base.py
Normal file
@ -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])
|
21
tests/dictionaries/80empty_param_number/00_base.xml
Normal file
21
tests/dictionaries/80empty_param_number/00_base.xml
Normal file
@ -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>
|
0
tests/dictionaries/80empty_param_number/__init__.py
Normal file
0
tests/dictionaries/80empty_param_number/__init__.py
Normal file
Reference in New Issue
Block a user