ipaldap: remove do_bind from LDAPClient

Remove do_bind() method that was a relict used in IPAdmin. Replace
its uses with simple / external binds.

https://fedorahosted.org/freeipa/ticket/6461

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Tomas Krizek
2016-11-08 12:16:09 +01:00
committed by Martin Basti
parent 808b1436b4
commit a68c95d116
4 changed files with 3 additions and 24 deletions

View File

@@ -44,8 +44,7 @@ def dnssec_container_exists(fqdn, suffix, dm_password=None, ldapi=False,
ldap_uri = ipaldap.get_ldap_uri(fqdn, 636, ldapi=ldapi, realm=realm,
cacert=CACERT)
conn = ipaldap.LDAPClient(ldap_uri, cacert=CACERT)
conn.do_bind(dm_password)
conn.simple_bind(ipaldap.DIRMAN_DN, dm_password)
except ldap.SERVER_DOWN:
raise RuntimeError('LDAP server on %s is not responding. Is IPA installed?' % fqdn)