certificate
This commit is contained in:
parent
a2c3a1bb3a
commit
cf410f9577
15 changed files with 227 additions and 3 deletions
|
@ -408,7 +408,7 @@ class Annotator:
|
||||||
)
|
)
|
||||||
certificate.catype = certificate.type
|
certificate.catype = certificate.type
|
||||||
if not hasattr(certificate, 'domain'):
|
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,
|
variable = self.objectspace.paths.get_variable(certificate.domain,
|
||||||
certificate.namespace,
|
certificate.namespace,
|
||||||
xmlfiles=certificate.xmlfiles,
|
xmlfiles=certificate.xmlfiles,
|
||||||
|
|
|
@ -69,7 +69,7 @@ RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')],
|
||||||
'default_files_included': 'no',
|
'default_files_included': 'no',
|
||||||
'default_overrides_engine': 'cheetah',
|
'default_overrides_engine': 'cheetah',
|
||||||
'default_service_names_engine': 'none',
|
'default_service_names_engine': 'none',
|
||||||
'default_cerficate_domain': 'server_name',
|
'default_certificate_domain': 'server_name',
|
||||||
'base_option_name': 'baseoption',
|
'base_option_name': 'baseoption',
|
||||||
'export_with_import': True,
|
'export_with_import': True,
|
||||||
'force_convert_dyn_option_description': False,
|
'force_convert_dyn_option_description': False,
|
||||||
|
|
|
@ -89,7 +89,7 @@ class Reflector:
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
if filename in filenames:
|
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)
|
filenames[filename] = (ext, full_filename)
|
||||||
if not filenames and not just_doc:
|
if not filenames and not just_doc:
|
||||||
raise DictConsistencyError(_('there is no dictionary file'), 77, folders)
|
raise DictConsistencyError(_('there is no dictionary file'), 77, folders)
|
||||||
|
|
0
tests/dictionaries/10base_certificate_list/__init__.py
Normal file
0
tests/dictionaries/10base_certificate_list/__init__.py
Normal 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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
19
tests/dictionaries/10base_certificate_list/xml/00-base.xml
Normal file
19
tests/dictionaries/10base_certificate_list/xml/00-base.xml
Normal 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>
|
24
tests/dictionaries/10base_certificate_list/yml/00-base.yml
Normal file
24
tests/dictionaries/10base_certificate_list/yml/00-base.yml
Normal 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
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -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
|
Loading…
Reference in a new issue