mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-12 16:32:01 -05:00
Remove legacy toDict and origDataDict methods of LDAPEntry.
https://fedorahosted.org/freeipa/ticket/3521
This commit is contained in:
1 parent
463407ac6f
commit
a7180ed021
3 files changed
+9
-33
No files matched your search
@@ -123,10 +123,10 @@ class KrbInstance(service.Service):
|
||||
ipauniqueid=['autogenerate'],
|
||||
managedby=[host_dn],
|
||||
)
|
||||
if 'krbpasswordexpiration' in service_entry.toDict():
|
||||
if 'krbpasswordexpiration' in service_entry:
|
||||
host_entry['krbpasswordexpiration'] = service_entry[
|
||||
'krbpasswordexpiration']
|
||||
if 'krbticketflags' in service_entry.toDict():
|
||||
if 'krbticketflags' in service_entry:
|
||||
host_entry['krbticketflags'] = service_entry['krbticketflags']
|
||||
self.admin_conn.add_entry(host_entry)
|
||||
|
||||
|
||||
@@ -809,11 +809,10 @@ class LDAPUpdate:
|
||||
else:
|
||||
# Update LDAP
|
||||
try:
|
||||
changes = self.conn.generateModList(entry.origDataDict(), entry.toDict())
|
||||
changes = self.conn.generateModList(entry.orig_data, entry)
|
||||
if (entry.dn == DN(('cn', 'schema'))):
|
||||
d = dict()
|
||||
e = entry.toDict()
|
||||
for k,v in e.items():
|
||||
for k,v in entry.items():
|
||||
d[k] = [str(x) for x in v]
|
||||
updated = self.is_schema_updated(d)
|
||||
else:
|
||||
@@ -825,7 +824,7 @@ class LDAPUpdate:
|
||||
self.debug("%s" % safe_changes)
|
||||
self.debug("Live %d, updated %d" % (self.live_run, updated))
|
||||
if self.live_run and updated:
|
||||
self.conn.updateEntry(entry.dn, entry.origDataDict(), entry.toDict())
|
||||
self.conn.updateEntry(entry.dn, entry.orig_data, entry)
|
||||
self.info("Done")
|
||||
except errors.EmptyModlist:
|
||||
self.info("Entry already up-to-date")
|
||||
|
||||
Reference in new issue
Block a user