add undisable attribut to service
This commit is contained in:
12
tests/dictionaries/70service_disabled_undisable/00-base.xml
Normal file
12
tests/dictionaries/70service_disabled_undisable/00-base.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail version="0.10">
|
||||
<services>
|
||||
<service name="test" disabled="True" undisable="True">
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
<variable name="condition">
|
||||
<value>no</value>
|
||||
</variable>
|
||||
</variables>
|
||||
</rougail>
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"rougail.condition": {
|
||||
"owner": "default",
|
||||
"value": "no"
|
||||
},
|
||||
"services.test.activate": {
|
||||
"owner": "default",
|
||||
"value": false
|
||||
},
|
||||
"services.test.manage": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"rougail.condition": "no",
|
||||
"services.test.activate": false,
|
||||
"services.test.manage": true
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"rougail.condition": {
|
||||
"owner": "default",
|
||||
"value": "no"
|
||||
},
|
||||
"services.test.activate": {
|
||||
"owner": "default",
|
||||
"value": false
|
||||
},
|
||||
"services.test.manage": {
|
||||
"owner": "default",
|
||||
"value": true
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
from importlib.machinery import SourceFileLoader as _SourceFileLoader
|
||||
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
|
||||
class func:
|
||||
pass
|
||||
_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 function in dir(_func):
|
||||
if function.startswith('_'):
|
||||
continue
|
||||
setattr(func, function, getattr(_func, function))
|
||||
try:
|
||||
from tiramisu3 import *
|
||||
except:
|
||||
from tiramisu import *
|
||||
option_2 = StrOption(name="condition", doc="condition", default="no", properties=frozenset({"mandatory", "normal"}))
|
||||
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=False)
|
||||
option_6 = BoolOption(name="manage", doc="manage", default=True)
|
||||
option_4 = OptionDescription(name="test", doc="test", children=[option_5, option_6])
|
||||
option_4.impl_set_information('undisable', True)
|
||||
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])
|
Reference in New Issue
Block a user