mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Remove legacy LDAPEntry properties data and orig_data.
https://fedorahosted.org/freeipa/ticket/3488
This commit is contained in:
parent
aa66cd5f35
commit
4284a8349b
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user