summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-12-10 11:52:31 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-01-10 14:41:39 +0100
commit4284a8349b4db3de2d67be6c201cd2490ad48a20 (patch)
treeecba327c13cf8a3695596fd71d83d76a5759ec49 /ipaserver
parentaa66cd5f35bc0d5e857d9bb4d6b294ee582bfd22 (diff)
downloadfreeipa.git-4284a8349b4db3de2d67be6c201cd2490ad48a20.tar.gz
freeipa.git-4284a8349b4db3de2d67be6c201cd2490ad48a20.tar.xz
freeipa.git-4284a8349b4db3de2d67be6c201cd2490ad48a20.zip
Remove legacy LDAPEntry properties data and orig_data.
https://fedorahosted.org/freeipa/ticket/3488
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/ldapupdate.py4
-rw-r--r--ipaserver/install/plugins/rename_managed.py8
2 files changed, 4 insertions, 8 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py
index 42964c04..94a1fed0 100644
--- a/ipaserver/install/ldapupdate.py
+++ b/ipaserver/install/ldapupdate.py
@@ -693,10 +693,6 @@ class LDAPUpdate:
added = False
updated = False
if not found:
- # New entries get their orig_data set to the entry itself. We want to
- # empty that so that everything appears new when generating the
- # modlist
- # entry.orig_data = {}
try:
if self.live_run:
if len(entry):
diff --git a/ipaserver/install/plugins/rename_managed.py b/ipaserver/install/plugins/rename_managed.py
index e0fa36bb..dad9259d 100644
--- a/ipaserver/install/plugins/rename_managed.py
+++ b/ipaserver/install/plugins/rename_managed.py
@@ -74,7 +74,7 @@ class GenerateUpdateMixin(object):
for entry in definitions_managed_entries:
assert isinstance(entry.dn, DN)
if deletes:
- old_dn = entry.data['managedtemplate'][0]
+ old_dn = entry['managedtemplate'][0]
assert isinstance(old_dn, DN)
try:
(old_dn, entry) = ldap.get_entry(old_dn, ['*'])
@@ -102,14 +102,14 @@ class GenerateUpdateMixin(object):
else:
# Update the template dn by replacing the old containter with the new container
- old_dn = entry.data['managedtemplate'][0]
+ old_dn = entry['managedtemplate'][0]
new_dn = EditableDN(old_dn)
if new_dn.replace(old_template_container, new_template_container) != 1:
self.error("unable to replace '%s' with '%s' in '%s'",
old_template_container, new_template_container, old_dn)
continue
new_dn = DN(new_dn)
- entry.data['managedtemplate'] = new_dn
+ entry['managedtemplate'] = new_dn
# Edit the dn, then convert it back to an immutable DN
old_dn = entry.dn
@@ -122,7 +122,7 @@ class GenerateUpdateMixin(object):
# The old attributes become defaults for the new entry
new_update = {'dn': new_dn,
- 'default': entry_to_update(entry.data)}
+ 'default': entry_to_update(entry)}
# Add the replacement update to the collection of all updates
update_list.append({new_dn: new_update})