certificate

This commit is contained in:
egarette@silique.fr 2023-06-22 12:39:47 +02:00
parent a2c3a1bb3a
commit cf410f9577
15 changed files with 227 additions and 3 deletions

View file

@ -408,7 +408,7 @@ class Annotator:
)
certificate.catype = certificate.type
if not hasattr(certificate, 'domain'):
certificate.domain = self.objectspace.rougailconfig['default_cerficate_domain']
certificate.domain = self.objectspace.rougailconfig['default_certificate_domain']
variable = self.objectspace.paths.get_variable(certificate.domain,
certificate.namespace,
xmlfiles=certificate.xmlfiles,

View file

@ -69,7 +69,7 @@ RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')],
'default_files_included': 'no',
'default_overrides_engine': 'cheetah',
'default_service_names_engine': 'none',
'default_cerficate_domain': 'server_name',
'default_certificate_domain': 'server_name',
'base_option_name': 'baseoption',
'export_with_import': True,
'force_convert_dyn_option_description': False,

View file

@ -89,7 +89,7 @@ class Reflector:
else:
continue
if filename in filenames:
raise DictConsistencyError(_(f'duplicate dictionary file name {filename}'), 78, [filenames[filename], full_filename])
raise DictConsistencyError(_(f'duplicate dictionary file name {filename}'), 78, [filenames[filename][1], full_filename])
filenames[filename] = (ext, full_filename)
if not filenames and not just_doc:
raise DictConsistencyError(_('there is no dictionary file'), 77, folders)

View file

@ -0,0 +1,30 @@
{
"rougail.server_name": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.domain": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.name": {
"owner": "default",
"value": "certificate"
},
"services.test_service.certificates.certificate.owner": {
"owner": "default",
"value": "example"
},
"services.test_service.certificates.certificate.activate": {
"owner": "default",
"value": true
},
"services.test_service.activate": {
"owner": "default",
"value": true
},
"services.test_service.manage": {
"owner": "default",
"value": true
}
}

View file

@ -0,0 +1,9 @@
{
"rougail.server_name": "example.net",
"services.test_service.certificates.certificate.domain": "example.net",
"services.test_service.certificates.certificate.name": "certificate",
"services.test_service.certificates.certificate.owner": "example",
"services.test_service.certificates.certificate.activate": true,
"services.test_service.activate": true,
"services.test_service.manage": true
}

View file

@ -0,0 +1,30 @@
{
"rougail.server_name": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.domain": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.name": {
"owner": "default",
"value": "certificate"
},
"services.test_service.certificates.certificate.owner": {
"owner": "default",
"value": "example"
},
"services.test_service.certificates.certificate.activate": {
"owner": "default",
"value": true
},
"services.test_service.activate": {
"owner": "default",
"value": true
},
"services.test_service.manage": {
"owner": "default",
"value": true
}
}

View file

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<services>
<service name="test">
<certificate authority="authority" owner="example" certificatelist="certlist">certificate</certificate>
</service>
</services>
<variables>
<variable name="server_name" type="domainname">
<value>example.net</value>
</variable>
</variables>
<constraints>
<condition name="disabled_if_in" source="server_name">
<param>example1.net</param>
<target type="certificatelist">certlist</target>
</condition>
</constraints>
</rougail>

View file

@ -0,0 +1,24 @@
version: '0.10'
services:
- service:
- name: test
certificate:
- authority: authority
owner: example
certificatelist: certlist
text: certificate
variables:
- variable:
- name: server_name
type: domainname
value:
- text: example.net
constraints:
- condition:
- name: disabled_if_in
source: server_name
param:
- text: example1.net
target:
- type: certificatelist
text: certlist

View file

@ -0,0 +1,30 @@
{
"rougail.server_name": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.domain": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.name": {
"owner": "default",
"value": "certificate"
},
"services.test_service.certificates.certificate.owner": {
"owner": "default",
"value": "example"
},
"services.test_service.certificates.certificate.activate": {
"owner": "default",
"value": false
},
"services.test_service.activate": {
"owner": "default",
"value": true
},
"services.test_service.manage": {
"owner": "default",
"value": true
}
}

View file

@ -0,0 +1,9 @@
{
"rougail.server_name": "example.net",
"services.test_service.certificates.certificate.domain": "example.net",
"services.test_service.certificates.certificate.name": "certificate",
"services.test_service.certificates.certificate.owner": "example",
"services.test_service.certificates.certificate.activate": false,
"services.test_service.activate": true,
"services.test_service.manage": true
}

View file

@ -0,0 +1,30 @@
{
"rougail.server_name": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.domain": {
"owner": "default",
"value": "example.net"
},
"services.test_service.certificates.certificate.name": {
"owner": "default",
"value": "certificate"
},
"services.test_service.certificates.certificate.owner": {
"owner": "default",
"value": "example"
},
"services.test_service.certificates.certificate.activate": {
"owner": "default",
"value": false
},
"services.test_service.activate": {
"owner": "default",
"value": true
},
"services.test_service.manage": {
"owner": "default",
"value": true
}
}

View file

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<services>
<service name="test">
<certificate authority="authority" owner="example" certificatelist="certlist">certificate</certificate>
</service>
</services>
<variables>
<variable name="server_name" type="domainname">
<value>example.net</value>
</variable>
</variables>
<constraints>
<condition name="disabled_if_in" source="server_name">
<param>example.net</param>
<target type="certificatelist">certlist</target>
</condition>
</constraints>
</rougail>

View file

@ -0,0 +1,24 @@
version: '0.10'
services:
- service:
- name: test
certificate:
- authority: authority
owner: example
certificatelist: certlist
text: certificate
variables:
- variable:
- name: server_name
type: domainname
value:
- text: example.net
constraints:
- condition:
- name: disabled_if_in
source: server_name
param:
- text: example.net
target:
- type: certificatelist
text: certlist