From 6c85b88874d099a909c5662a6a32c045439e0b2c Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Thu, 7 Mar 2013 14:12:49 +0100 Subject: Realm Domains page Add support for Realm Domains to web UI. https://fedorahosted.org/freeipa/ticket/3407 --- ipalib/plugins/internal.py | 6 ++++++ ipalib/plugins/realmdomains.py | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'ipalib/plugins') diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index ad15b5c4..85bf7d21 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -536,6 +536,12 @@ class i18n_messages(Command): "type_ad": _("Active Directory domain"), "type_local": _("Local domain"), }, + "realmdomains": { + "identity": _("Realm Domains"), + "check_dns": _("Check DNS"), + "check_dns_confirmation": _("Do you also want to perform DNS check?"), + "force_update": _("Force Update"), + }, "role": { "identity": _("Role Settings"), }, diff --git a/ipalib/plugins/realmdomains.py b/ipalib/plugins/realmdomains.py index 99ab8798..f3dbf8da 100644 --- a/ipalib/plugins/realmdomains.py +++ b/ipalib/plugins/realmdomains.py @@ -105,9 +105,10 @@ class realmdomains_mod(LDAPUpdate): if get_domain_name() not in associateddomain: raise errors.ValidationError(name='domain', error=_("cannot delete domain of IPA server")) if not force: - for d in associateddomain: - if not has_soa_or_ns_record(d): - raise errors.ValidationError(name='domain', error=_("no SOA or NS records found for domain %s" % d)) + bad_domains = [d for d in associateddomain if not has_soa_or_ns_record(d)] + if bad_domains: + bad_domains = ', '.join(bad_domains) + raise errors.ValidationError(name='domain', error=_("no SOA or NS records found for domains: %s" % bad_domains)) return dn # If --add-domain or --del-domain options were provided, read -- cgit