summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/realmdomains.py
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2013-03-07 14:12:49 +0100
committerPetr Vobornik <pvoborni@redhat.com>2013-03-18 15:11:26 +0100
commit6c85b88874d099a909c5662a6a32c045439e0b2c (patch)
tree07bae15908c943f9ef4b352b8b29dd14b308f3b9 /ipalib/plugins/realmdomains.py
parent8d369519116cb1f257304d79d13e63188fc7d978 (diff)
downloadfreeipa-6c85b88874d099a909c5662a6a32c045439e0b2c.tar.gz
freeipa-6c85b88874d099a909c5662a6a32c045439e0b2c.tar.xz
freeipa-6c85b88874d099a909c5662a6a32c045439e0b2c.zip
Realm Domains page
Add support for Realm Domains to web UI. https://fedorahosted.org/freeipa/ticket/3407
Diffstat (limited to 'ipalib/plugins/realmdomains.py')
-rw-r--r--ipalib/plugins/realmdomains.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipalib/plugins/realmdomains.py b/ipalib/plugins/realmdomains.py
index 99ab8798b..f3dbf8dae 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