sample _get_domain_and_subdomains_settings()

This commit is contained in:
Paco 2021-03-09 21:34:30 +01:00
parent 0f7c0b039a
commit 9a8cbbd883

View file

@ -45,6 +45,7 @@ from yunohost.hook import hook_callback
logger = getActionLogger("yunohost.domain") logger = getActionLogger("yunohost.domain")
DOMAIN_SETTINGS_PATH = "/etc/yunohost/domains/"
def domain_list(exclude_subdomains=False): def domain_list(exclude_subdomains=False):
""" """
@ -657,3 +658,25 @@ def _get_DKIM(domain):
p=dkim.group("p"), p=dkim.group("p"),
), ),
) )
def _get_domain_and_subdomains_settings(domain):
"""
Give data about a domain and its subdomains
"""
return {
"cmercier.fr" : {
"main": true,
"xmpp": true,
"mail": true,
"owned_dns_zone": true,
"ttl": 3600,
},
"node.cmercier.fr" : {
"main": false,
"xmpp": false,
"mail": false,
"ttl": 3600,
},
}