Compare commits
No commits in common. "d7a1a52ebb834ec2d8dcc83c55ad0b5d31510004" and "a87485abd27b286fccbf4880e7e72f794387ea2a" have entirely different histories.
d7a1a52ebb
...
a87485abd2
@ -29,16 +29,6 @@ Un service non géré ne peut conteneur que des fichiers.
|
|||||||
|
|
||||||
## Désactiver la génération d'un service
|
## Désactiver la génération d'un service
|
||||||
|
|
||||||
Il est possible de désactiver un service. Pour cela il faut rajouter l'attribut "disabled" à True :
|
|
||||||
|
|
||||||
```
|
|
||||||
<services>
|
|
||||||
<service name="test" disabled="True"/>
|
|
||||||
</services>
|
|
||||||
```
|
|
||||||
|
|
||||||
Dans ce cas, tous les services et les éléments qu'il compose ([fichier](file.md), ...) seront désactivés.
|
|
||||||
|
|
||||||
Il est possible de définir une [condition](../condition/README.md) de type "disabled_if_in" ou "disabled_if_not_in" sur une balise service :
|
Il est possible de définir une [condition](../condition/README.md) de type "disabled_if_in" ou "disabled_if_not_in" sur une balise service :
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -76,11 +76,10 @@ class Annotator:
|
|||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
'activate',
|
'activate',
|
||||||
not service.disabled,
|
True,
|
||||||
service,
|
service,
|
||||||
'.'.join(['services', normalize_family(service_name), 'activate']),
|
'.'.join(['services', normalize_family(service_name), 'activate']),
|
||||||
)
|
)
|
||||||
service.disabled = None
|
|
||||||
for elttype, values in dict(vars(service)).items():
|
for elttype, values in dict(vars(service)).items():
|
||||||
if elttype == 'servicelist':
|
if elttype == 'servicelist':
|
||||||
self.objectspace.list_conditions.setdefault('servicelist',
|
self.objectspace.list_conditions.setdefault('servicelist',
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
<!ATTLIST service name CDATA #REQUIRED>
|
<!ATTLIST service name CDATA #REQUIRED>
|
||||||
<!ATTLIST service manage (True|False) "True">
|
<!ATTLIST service manage (True|False) "True">
|
||||||
<!ATTLIST service servicelist CDATA #IMPLIED>
|
<!ATTLIST service servicelist CDATA #IMPLIED>
|
||||||
<!ATTLIST service disabled (True|False) "False">
|
|
||||||
|
|
||||||
<!ELEMENT ip (#PCDATA)>
|
<!ELEMENT ip (#PCDATA)>
|
||||||
<!ATTLIST ip iplist CDATA #IMPLIED>
|
<!ATTLIST ip iplist CDATA #IMPLIED>
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<rougail version="0.10">
|
|
||||||
<services>
|
|
||||||
<service name="test" disabled="True">
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
<variables>
|
|
||||||
<variable name="condition">
|
|
||||||
<value>no</value>
|
|
||||||
</variable>
|
|
||||||
</variables>
|
|
||||||
</rougail>
|
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"rougail.condition": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": "no"
|
|
||||||
},
|
|
||||||
"services.test.activate": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": false
|
|
||||||
},
|
|
||||||
"services.test.manage": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"rougail.condition": "no",
|
|
||||||
"services.test.activate": false,
|
|
||||||
"services.test.manage": true
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"rougail.condition": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": "no"
|
|
||||||
},
|
|
||||||
"services.test.activate": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": false
|
|
||||||
},
|
|
||||||
"services.test.manage": {
|
|
||||||
"owner": "default",
|
|
||||||
"value": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
/dev/null
|
|
@ -1,20 +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 = 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_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…
x
Reference in New Issue
Block a user