[fix] Tell user that domain dns-conf shows a recommendation only

This commit is contained in:
Alexandre Aubin 2017-08-13 14:00:15 -04:00
parent 02ea0c0656
commit 1f7d56940e
2 changed files with 6 additions and 1 deletions

View file

@ -141,6 +141,7 @@
"domain_creation_failed": "Unable to create domain",
"domain_deleted": "The domain has been deleted",
"domain_deletion_failed": "Unable to delete domain",
"domain_dns_conf_is_just_a_recommendation": "This command shows you what is the *recommended* configuration. It does not actually set up the DNS configuration for you. It is your responsability to configure your DNS zone in your registrar according to this recommendation.",
"domain_dyndns_already_subscribed": "You've already subscribed to a DynDNS domain",
"domain_dyndns_invalid": "Invalid domain to use with DynDNS",
"domain_dyndns_root_unknown": "Unknown DynDNS root domain",

View file

@ -33,7 +33,7 @@ import requests
from urllib import urlopen
from moulinette import m18n
from moulinette import m18n, msettings
from moulinette.core import MoulinetteError
from moulinette.utils.log import getActionLogger
@ -220,6 +220,10 @@ def domain_dns_conf(domain, ttl=None):
for record in dns_conf["mail"]:
result += "\n{name} {ttl} IN {type} {value}".format(**record)
is_cli = True if msettings.get('interface') == 'cli' else False
if is_cli:
logger.warning(m18n.n("domain_dns_conf_is_just_a_recommendation"))
return result