summaryrefslogtreecommitdiffstats
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
parentaa66cd5f35bc0d5e857d9bb4d6b294ee582bfd22 (diff)
downloadfreeipa-4284a8349b4db3de2d67be6c201cd2490ad48a20.tar.gz
freeipa-4284a8349b4db3de2d67be6c201cd2490ad48a20.tar.xz
freeipa-4284a8349b4db3de2d67be6c201cd2490ad48a20.zip
Remove legacy LDAPEntry properties data and orig_data.
https://fedorahosted.org/freeipa/ticket/3488
-rw-r--r--ipapython/ipaldap.py11
-rw-r--r--ipaserver/install/ldapupdate.py4
-rw-r--r--ipaserver/install/plugins/rename_managed.py8
3 files changed, 4 insertions, 19 deletions
diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py
index 2440d75f..de38db5d 100644
--- a/ipapython/ipaldap.py
+++ b/ipapython/ipaldap.py
@@ -714,7 +714,6 @@ class LDAPEntry(collections.MutableMapping):
def conn(self):
return self._conn
- # properties for Entry and Entity compatibility
@property
def dn(self):
return self._dn
@@ -736,16 +735,6 @@ class LDAPEntry(collections.MutableMapping):
self._single_value_view = SingleValueLDAPEntryView(self)
return self._single_value_view
- @property
- def data(self):
- # FIXME: for backwards compatibility only
- return self
-
- @property
- def orig_data(self):
- # FIXME: for backwards compatibility only
- return self._orig
-
def __repr__(self):
data = dict(self._raw)
data.update((k, v) for k, v in self._nice.iteritems() if v is not None)
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})