mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Rename LDAPConnection to LDAPClient
It does more than just connecting, so it should have more suitable name. Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
This commit is contained in:
committed by
Martin Kosek
parent
a173957865
commit
aaa41b2145
@@ -740,7 +740,7 @@ class LDAPEntry(dict):
|
||||
return result
|
||||
|
||||
|
||||
class LDAPConnection(object):
|
||||
class LDAPClient(object):
|
||||
"""LDAP backend class
|
||||
|
||||
This class abstracts a LDAP connection, providing methods that work with
|
||||
@@ -887,7 +887,7 @@ class LDAPConnection(object):
|
||||
return obj and obj.single_value
|
||||
|
||||
def normalize_dn(self, dn):
|
||||
"""Override to normalize all DNs passed to LDAPConnection methods"""
|
||||
"""Override to normalize all DNs passed to LDAPClient methods"""
|
||||
assert isinstance(dn, DN)
|
||||
return dn
|
||||
|
||||
@@ -1528,7 +1528,7 @@ class LDAPConnection(object):
|
||||
self.conn.delete_s(dn)
|
||||
|
||||
|
||||
class IPAdmin(LDAPConnection):
|
||||
class IPAdmin(LDAPClient):
|
||||
|
||||
def __get_ldap_uri(self, protocol):
|
||||
if protocol == 'ldaps':
|
||||
@@ -1579,7 +1579,7 @@ class IPAdmin(LDAPConnection):
|
||||
|
||||
ldap_uri = self.__get_ldap_uri(protocol or self.__guess_protocol())
|
||||
|
||||
LDAPConnection.__init__(self, ldap_uri)
|
||||
LDAPClient.__init__(self, ldap_uri)
|
||||
|
||||
self.conn = IPASimpleLDAPObject(ldap_uri, force_schema_updates=True)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import krbV
|
||||
import ldap as _ldap
|
||||
|
||||
from ipapython.dn import DN
|
||||
from ipaserver.ipaldap import SASL_AUTH, IPASimpleLDAPObject, LDAPConnection
|
||||
from ipaserver.ipaldap import SASL_AUTH, IPASimpleLDAPObject, LDAPClient
|
||||
|
||||
|
||||
try:
|
||||
@@ -58,7 +58,7 @@ from ipalib.crud import CrudBackend
|
||||
from ipalib.request import context
|
||||
|
||||
|
||||
class ldap2(LDAPConnection, CrudBackend):
|
||||
class ldap2(LDAPClient, CrudBackend):
|
||||
"""
|
||||
LDAP Backend Take 2.
|
||||
"""
|
||||
@@ -71,7 +71,7 @@ class ldap2(LDAPConnection, CrudBackend):
|
||||
ldap_uri = 'ldap://example.com'
|
||||
|
||||
CrudBackend.__init__(self, shared_instance=shared_instance)
|
||||
LDAPConnection.__init__(self, ldap_uri)
|
||||
LDAPClient.__init__(self, ldap_uri)
|
||||
|
||||
try:
|
||||
if base_dn is not None:
|
||||
|
||||
Reference in New Issue
Block a user