summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/dns.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-01-16 14:14:58 +0100
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:42 +0100
commitef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d (patch)
tree84ad0688b942996dd7b8fa58af3e2702b92f85d2 /ipalib/plugins/dns.py
parente2120c31c3ba62d1bc57825b90a30d26ca58aa79 (diff)
downloadfreeipa-ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d.tar.gz
freeipa-ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d.tar.xz
freeipa-ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d.zip
Add custom mapping object for LDAP entry data.
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r--ipalib/plugins/dns.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index de13395e..ff21c694 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -2124,7 +2124,7 @@ class dnsrecord(LDAPObject):
assert isinstance(dn, DN)
ldap = self.api.Backend.ldap2
- for rtype in entry_attrs:
+ for rtype in entry_attrs.keys():
rtype_cb = getattr(self, '_%s_pre_callback' % rtype, None)
if rtype_cb:
rtype_cb(ldap, dn, entry_attrs, *keys, **options)
@@ -2267,9 +2267,9 @@ class dnsrecord(LDAPObject):
def check_record_type_collisions(self, old_entry, entry_attrs):
# Test that only allowed combination of record types was created
- attrs = set(attr for attr in entry_attrs if attr in _record_attributes
+ attrs = set(attr for attr in entry_attrs.keys() if attr in _record_attributes
and entry_attrs[attr])
- attrs.update(attr for attr in old_entry if attr not in entry_attrs)
+ attrs.update(attr for attr in old_entry.keys() if attr not in entry_attrs)
try:
attrs.remove('cnamerecord')
except KeyError:
@@ -2404,7 +2404,7 @@ class dnsrecord_add(LDAPCreate):
self.obj.run_precallback_validators(dn, entry_attrs, *keys, **options)
# run precallback also for all new RR type attributes in entry_attrs
- for attr in entry_attrs:
+ for attr in entry_attrs.keys():
try:
param = self.params[attr]
except KeyError:
@@ -2437,7 +2437,7 @@ class dnsrecord_add(LDAPCreate):
except errors.NotFound:
pass
else:
- for attr in entry_attrs:
+ for attr in entry_attrs.keys():
if attr not in _record_attributes:
continue
if entry_attrs[attr] is None:
@@ -2568,7 +2568,7 @@ class dnsrecord_mod(LDAPUpdate):
normalize=self.obj.normalize_dn)
del_all = True
- for attr in old_entry:
+ for attr in old_entry.keys():
if old_entry[attr]:
del_all = False
break
@@ -2709,7 +2709,7 @@ class dnsrecord_del(LDAPUpdate):
del_all = False
if not self.obj.is_pkey_zone_record(*keys):
record_found = False
- for attr in old_entry:
+ for attr in old_entry.keys():
if old_entry[attr]:
record_found = True
break