Return an LDAP connection object to the specified server.
If the ldap_connection is already an LDAP connection
object, it will be returned as is. If it's an LDAP URL, it will return an
LDAP connection to the LDAP server specified in the URL.
- Parameters:
ldap_connection (ldap.ldapobject.SimpleLDAPObject , str
or unicode ) - The LDAP connection object or the LDAP URL of the server to be
connected to.
- Returns:
ldap.ldapobject.SimpleLDAPObject
- The LDAP connection object.
- Raises:
ValueError - If ldap_connection is None .
|