missing files
This commit is contained in:
parent
be33a36023
commit
2b465cfc67
4 changed files with 65 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
},
|
},
|
||||||
"modules": {"host": {"applicationservices": ["host-systemd-machined"]},
|
"modules": {"host": {"applicationservices": ["host-systemd-machined"]},
|
||||||
"unbound": {"applicationservices": ["unbound", "provider-systemd-machined"]},
|
"unbound": {"applicationservices": ["unbound", "provider-systemd-machined"]},
|
||||||
|
"letsencrypt": {"applicationservices": ["letsencrypt", "provider-systemd-machined"]},
|
||||||
"nsd": {"applicationservices": ["nsd", "provider-systemd-machined"]},
|
"nsd": {"applicationservices": ["nsd", "provider-systemd-machined"]},
|
||||||
"revprox": {"applicationservices": ["nginx-reverse-proxy-server", "provider-systemd-machined"]},
|
"revprox": {"applicationservices": ["nginx-reverse-proxy-server", "provider-systemd-machined"]},
|
||||||
"postgresql": {"applicationservices": ["postgresql-server", "provider-systemd-machined"]},
|
"postgresql": {"applicationservices": ["postgresql-server", "provider-systemd-machined"]},
|
||||||
|
@ -176,6 +177,13 @@
|
||||||
"rougail.smtp.smtp_relay_address": "mail.in.silique.fr"
|
"rougail.smtp.smtp_relay_address": "mail.in.silique.fr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"letsencrypt.in.silique.fr": {"module": "letsencrypt",
|
||||||
|
"informations": {"zones_name": ["external"]
|
||||||
|
},
|
||||||
|
"values": {"rougail.host": "cloud.silique.fr",
|
||||||
|
"rougail.dns.dns_client_address": "unbound.in.silique.fr"
|
||||||
|
}
|
||||||
|
},
|
||||||
"gitea.in.silique.fr": {"module": "gitea",
|
"gitea.in.silique.fr": {"module": "gitea",
|
||||||
"informations": {"zones_name": ["external"]
|
"informations": {"zones_name": ["external"]
|
||||||
},
|
},
|
||||||
|
|
0
src/risotto/__init__.py
Normal file
0
src/risotto/__init__.py
Normal file
0
src/risotto/rougail/__init__.py
Normal file
0
src/risotto/rougail/__init__.py
Normal file
57
src/risotto/rougail/annotator.py
Normal file
57
src/risotto/rougail/annotator.py
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
from rougail.annotator.variable import Walk
|
||||||
|
from risotto.utils import _
|
||||||
|
|
||||||
|
|
||||||
|
class Annotator(Walk):
|
||||||
|
level = 9
|
||||||
|
def __init__(self,
|
||||||
|
objectspace: 'RougailObjSpace',
|
||||||
|
*args):
|
||||||
|
self.objectspace = objectspace
|
||||||
|
# self.convert_get_linked_information()
|
||||||
|
# self.convert_provider()
|
||||||
|
|
||||||
|
def convert_get_linked_information(self):
|
||||||
|
if not hasattr(self.objectspace.space, 'constraints') or \
|
||||||
|
not hasattr(self.objectspace.space.constraints, 'fill'):
|
||||||
|
return
|
||||||
|
for fill in self.objectspace.space.constraints.fill:
|
||||||
|
if fill.name == 'get_linked_configuration':
|
||||||
|
# add server_name
|
||||||
|
param = self.objectspace.param(fill.xmlfiles)
|
||||||
|
param.name = 'server_name'
|
||||||
|
param.type = 'information'
|
||||||
|
param.text = 'server_name'
|
||||||
|
fill.param.append(param)
|
||||||
|
# add current_user
|
||||||
|
param = self.objectspace.param(fill.xmlfiles)
|
||||||
|
param.name = 'current_user'
|
||||||
|
param.type = 'information'
|
||||||
|
param.text = 'current_user'
|
||||||
|
fill.param.append(param)
|
||||||
|
# add test
|
||||||
|
param = self.objectspace.param(fill.xmlfiles)
|
||||||
|
param.name = 'test'
|
||||||
|
param.type = 'target_information'
|
||||||
|
param.text = 'test'
|
||||||
|
fill.param.append(param)
|
||||||
|
|
||||||
|
def convert_provider(self):
|
||||||
|
if not hasattr(self.objectspace.space, 'variables'):
|
||||||
|
return
|
||||||
|
for family in self.get_families():
|
||||||
|
if not hasattr(family, 'provider'):
|
||||||
|
continue
|
||||||
|
if 'dynamic' not in vars(family):
|
||||||
|
raise Exception(_(f'{family.name} is not a dynamic family so cannot have provider attribute'))
|
||||||
|
if not hasattr(family, 'information'):
|
||||||
|
family.information = self.objectspace.information(family.xmlfiles)
|
||||||
|
family.information.provider = family.provider
|
||||||
|
del family.provider
|
||||||
|
for variable in self.get_variables():
|
||||||
|
if not hasattr(variable, 'provider'):
|
||||||
|
continue
|
||||||
|
if not hasattr(variable, 'information'):
|
||||||
|
variable.information = self.objectspace.information(variable.xmlfiles)
|
||||||
|
variable.information.provider = variable.provider
|
||||||
|
del variable.provider
|
Loading…
Reference in a new issue