summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration
diff options
context:
space:
mode:
authorTomas Krizek <tkrizek@redhat.com>2016-11-01 14:52:33 +0100
committerMartin Basti <mbasti@redhat.com>2016-11-07 11:34:03 +0100
commit5b81dbfda1e4f0799d4ce87e9987a896af3ff299 (patch)
treebf0b256dec17a5e9ca7bacb414488cb0436aba49 /ipatests/test_integration
parent4f1a6a177666c475156f496d3f7719b37e66a7b0 (diff)
downloadfreeipa-5b81dbfda1e4f0799d4ce87e9987a896af3ff299.tar.gz
freeipa-5b81dbfda1e4f0799d4ce87e9987a896af3ff299.tar.xz
freeipa-5b81dbfda1e4f0799d4ce87e9987a896af3ff299.zip
ipaldap: merge IPAdmin to LDAPClient
* move IPAdmin methods to LDAPClient * add extra arguments (cacert, sasl_nocanon) to LDAPClient.__init__() * add host, port, _protocol to LDAPClient (parsed from ldap_uri) * create get_ldap_uri() method to create ldap_uri from former IPAdmin.__init__() arguments * replace IPAdmin with LDAPClient + get_ldap_uri() * remove ununsed function argument hostname from enable_replication_version_checking() https://fedorahosted.org/freeipa/ticket/6461 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r--ipatests/test_integration/host.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py
index 8b9ebd5e8..121f91640 100644
--- a/ipatests/test_integration/host.py
+++ b/ipatests/test_integration/host.py
@@ -21,7 +21,7 @@
import pytest_multihost.host
-from ipapython.ipaldap import IPAdmin
+from ipapython import ipaldap
class Host(pytest_multihost.host.Host):
@@ -44,7 +44,8 @@ class Host(pytest_multihost.host.Host):
"""Return an LDAPClient authenticated to this host as directory manager
"""
self.log.info('Connecting to LDAP at %s', self.external_hostname)
- ldap = IPAdmin(self.external_hostname)
+ ldap_uri = ipaldap.get_ldap_uri(self.external_hostname)
+ ldap = ipaldap.LDAPClient(ldap_uri)
binddn = self.config.dirman_dn
self.log.info('LDAP bind as %s' % binddn)
ldap.simple_bind(binddn, self.config.dirman_password)