OPSI.ldaptor.protocols.ldap.ldapclient module¶
LDAP protocol client
-
class
OPSI.ldaptor.protocols.ldap.ldapclient.
LDAPClient
¶ Bases:
twisted.internet.protocol.Protocol
An LDAP client
-
berdecoder
= <LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallback=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>>¶
-
bind
(dn='', auth='')¶ @depreciated: Use e.bind(auth).
@todo: Remove this method when there are no callers.
-
connectionLost
(reason=<twisted.python.failure.Failure <class 'twisted.internet.error.ConnectionDone'>>)¶ Called when TCP connection has been lost
-
connectionMade
()¶ TCP connection has opened
-
dataReceived
(recd)¶
-
debug
= False¶
-
handle
(msg)¶
-
send
(op)¶ Send an LDAP operation to the server.
@param op: the operation to send
@type op: LDAPProtocolRequest
@return: the response from server
@rtype: Deferred LDAPProtocolResponse
-
send_multiResponse
(op, handler, *args, **kwargs)¶ Send an LDAP operation to the server, expecting one or more responses.
@param op: the operation to send
@type op: LDAPProtocolRequest
@param handler: a callable that will be called for each response. It should return a boolean, whether this was the final response.
@param args: positional arguments to pass to handler
@param kwargs: keyword arguments to pass to handler
@return: the result from the last handler as a deferred that completes when the last response has been received
@rtype: Deferred LDAPProtocolResponse
-
send_noResponse
(op)¶ Send an LDAP operation to the server, with no response expected.
@param op: the operation to send @type op: LDAPProtocolRequest
-
startTLS
(ctx=None)¶ Start Transport Layer Security.
It is the callers responsibility to make sure other things are not happening at the same time.
@todo: server hostname check, see rfc2830 section 3.6.
-
unbind
()¶
-
unsolicitedNotification
(msg)¶
-
-
exception
OPSI.ldaptor.protocols.ldap.ldapclient.
LDAPClientConnectionLostException
(message=None)¶
-
exception
OPSI.ldaptor.protocols.ldap.ldapclient.
LDAPStartTLSBusyError
(onwire, message=None)¶ Bases:
OPSI.ldaptor.protocols.ldap.ldaperrors.LDAPOperationsError