diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-01-23 09:35:55 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-01 16:59:45 +0100 |
commit | e815c1893d4f8118c1308cb7e306826442988863 (patch) | |
tree | ff9d3c447d63481229dd809e1ffb021ac3d3a990 /ipaserver/install | |
parent | f8ad7cb96f065ca0dc557d8be95fd33a95d34d17 (diff) | |
download | freeipa-e815c1893d4f8118c1308cb7e306826442988863.tar.gz freeipa-e815c1893d4f8118c1308cb7e306826442988863.tar.xz freeipa-e815c1893d4f8118c1308cb7e306826442988863.zip |
Replace deleteEntry with delete_entry
Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
Diffstat (limited to 'ipaserver/install')
-rw-r--r-- | ipaserver/install/krbinstance.py | 4 | ||||
-rw-r--r-- | ipaserver/install/ldapupdate.py | 2 | ||||
-rw-r--r-- | ipaserver/install/replication.py | 14 | ||||
-rw-r--r-- | ipaserver/install/service.py | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py index 71490603d..26de08d46 100644 --- a/ipaserver/install/krbinstance.py +++ b/ipaserver/install/krbinstance.py @@ -104,7 +104,7 @@ class KrbInstance(service.Service): service_dn = DN(('krbprincipalname', principal), self.get_realm_suffix()) service_entry = self.admin_conn.getEntry(service_dn, ldap.SCOPE_BASE) - self.admin_conn.deleteEntry(service_dn) + self.admin_conn.delete_entry(service_entry) # Create a host entry for this master host_dn = DN( @@ -263,7 +263,7 @@ class KrbInstance(service.Service): "(objectclass=nsSaslMapping)") for r in res: try: - self.admin_conn.delete_entry(r.dn) + self.admin_conn.delete_entry(r) except Exception, e: root_logger.critical( "Error during SASL mapping removal: %s", e) diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index aaef1c71e..25ff49abd 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -835,7 +835,7 @@ class LDAPUpdate: try: self.info("Deleting entry %s", dn) if self.live_run: - self.conn.deleteEntry(dn) + self.conn.delete_entry(dn) self.modified = True except errors.NotFound, e: self.info("%s did not exist:%s", dn, e) diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index 570471d6a..332b8822b 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -734,7 +734,7 @@ class ReplicationManager(object): """ if dn is None: cn, dn = self.agreement_dn(hostname) - return self.conn.deleteEntry(dn) + return self.conn.delete_entry(dn) def delete_referral(self, hostname): dn = DN(('cn', self.suffix), ('cn', 'mapping tree'), ('cn', 'config')) @@ -1094,8 +1094,8 @@ class ReplicationManager(object): filter='(krbprincipalname=*/%s@%s)' % (replica, realm)) if entries: entries.sort(key=len, reverse=True) - for dn in entries: - self.conn.deleteEntry(dn) + for entry in entries: + self.conn.delete_entry(entry) except errors.NotFound: pass except Exception, e: @@ -1136,8 +1136,8 @@ class ReplicationManager(object): entries = self.conn.get_entries(dn, ldap.SCOPE_SUBTREE) if entries: entries.sort(key=len, reverse=True) - for dn in entries: - self.conn.deleteEntry(dn) + for entry in entries: + self.conn.delete_entry(entry) except errors.NotFound: pass except Exception, e: @@ -1152,8 +1152,8 @@ class ReplicationManager(object): entries = self.conn.get_entries( basedn, ldap.SCOPE_SUBTREE, filter=filter) if len(entries) != 0: - for e in entries: - self.conn.deleteEntry(e.dn) + for entry in entries: + self.conn.delete_entry(entry) except errors.NotFound: pass except Exception, e: diff --git a/ipaserver/install/service.py b/ipaserver/install/service.py index f15646af0..39771887e 100644 --- a/ipaserver/install/service.py +++ b/ipaserver/install/service.py @@ -195,7 +195,7 @@ class Service(object): return None newdn = DN(('krbprincipalname', principal), ('cn', 'services'), ('cn', 'accounts'), self.suffix) hostdn = DN(('fqdn', self.fqdn), ('cn', 'computers'), ('cn', 'accounts'), self.suffix) - self.admin_conn.deleteEntry(dn) + self.admin_conn.delete_entry(entry) entry.dn = newdn classes = entry.get("objectclass") classes = classes + ["ipaobject", "ipaservice", "pkiuser"] |