Compare commits

..

No commits in common. "a91e7ae68ca02025bb85d9113a105102432d9f61" and "4810a8d683ec87c71165eb4e552a7252ff5cb777" have entirely different histories.

51 changed files with 3 additions and 77 deletions

View File

@ -32,7 +32,7 @@ from rougail.annotator.target import TargetAnnotator
from rougail.annotator.param import ParamAnnotator from rougail.annotator.param import ParamAnnotator
CALC_MULTI = ('calc_value', 'calc_list', 'get_range', 'calc_val_first_value', 'unbound_filename', 'zone_information', 'get_certificates') CALC_MULTI = ('calc_value', 'calc_list', 'get_range', 'calc_val_first_value', 'unbound_filename', 'zone_information')
class Annotator(TargetAnnotator, ParamAnnotator): class Annotator(TargetAnnotator, ParamAnnotator):

View File

@ -53,7 +53,7 @@
<!ATTLIST service disabled (True|False) "False"> <!ATTLIST service disabled (True|False) "False">
<!ATTLIST service engine (none|creole|jinja2) #IMPLIED> <!ATTLIST service engine (none|creole|jinja2) #IMPLIED>
<!ATTLIST service target CDATA #IMPLIED> <!ATTLIST service target CDATA #IMPLIED>
<!ATTLIST service type (service|mount|swap) "service"> <!ATTLIST service type (service|mount) "service">
<!ELEMENT ip (#PCDATA)> <!ELEMENT ip (#PCDATA)>
<!ATTLIST ip iplist CDATA #IMPLIED> <!ATTLIST ip iplist CDATA #IMPLIED>

View File

@ -174,7 +174,6 @@ class Path:
) )
namespace = dico['variableobj'].namespace namespace = dico['variableobj'].namespace
if namespace not in [self.variable_namespace, 'services'] and \ if namespace not in [self.variable_namespace, 'services'] and \
current_namespace != 'services' and \
current_namespace != namespace: current_namespace != namespace:
msg = _(f'A variable located in the "{namespace}" namespace shall not be used ' msg = _(f'A variable located in the "{namespace}" namespace shall not be used '
f'in the "{current_namespace}" namespace') f'in the "{current_namespace}" namespace')

View File

@ -186,7 +186,7 @@ class RougailSystemdTemplate(RougailBaseTemplate):
self.ip_per_service = None self.ip_per_service = None
def post_instance(self): def post_instance(self):
destfile = '/tmpfiles.d/0rougail.conf' destfile = '/tmpfiles.d/rougail.conf'
destfilename = join(self.destinations_dir, destfile[1:]) destfilename = join(self.destinations_dir, destfile[1:])
makedirs(dirname(destfilename), exist_ok=True) makedirs(dirname(destfilename), exist_ok=True)
self.log.info(_(f"creole processing: '{destfilename}'")) self.log.info(_(f"creole processing: '{destfilename}'"))

View File

@ -1,6 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<services>
<service name="test" servicelist="test"/>
</services>
</rougail>

View File

@ -1,14 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<variables>
<variable name="condition">
<value>no</value>
</variable>
</variables>
<constraints>
<condition name="disabled_if_in" source="extra.condition">
<param>yes</param>
<target type="servicelist">test</target>
</condition>
</constraints>
</rougail>

View File

@ -1,14 +0,0 @@
{
"extra.condition": {
"owner": "default",
"value": "no"
},
"services.test.activate": {
"owner": "default",
"value": true
},
"services.test.manage": {
"owner": "default",
"value": true
}
}

View File

@ -1,5 +0,0 @@
{
"extra.condition": "no",
"services.test.activate": true,
"services.test.manage": true
}

View File

@ -1,14 +0,0 @@
{
"extra.condition": {
"owner": "default",
"value": "no"
},
"services.test.activate": {
"owner": "default",
"value": true
},
"services.test.manage": {
"owner": "default",
"value": true
}
}

View File

@ -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="extra", doc="extra", children=[option_2])
option_5 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_2, notraisepropertyerror=True), 'expected_0': ParamValue("yes")})))
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])