1
- .. % $Id: ldap.rst,v 1.35 2017/08/16 11:34:47 stroeder Exp $
1
+ .. % $Id: ldap.rst,v 1.36 2017/08/16 11:42:55 stroeder Exp $
2
2
3
3
********************************************
4
4
:py:mod: `ldap ` LDAP library interface module
@@ -21,8 +21,8 @@ and errors appear as exceptions.
21
21
`draft-ietf-ldapext-ldap-c-api <https://tools.ietf.org/html/draft-ietf-ldapext-ldap-c-api >`_
22
22
23
23
24
- This documentation is current for the Python LDAP module, version
25
- |release |. Source and binaries are available from
24
+ This documentation is current for the Python LDAP module, version
25
+ |release |. Source and binaries are available from
26
26
https://www.python-ldap.org/.
27
27
28
28
@@ -35,14 +35,19 @@ This module defines the following functions:
35
35
36
36
Initializes a new connection object for accessing the given LDAP server,
37
37
and return an LDAP object (see :ref: `ldap-objects `) used to perform operations
38
- on that server. Parameter *uri * has to be a valid LDAP URL.
38
+ on that server.
39
+
40
+ The *uri * parameter may be a comma- or whitespace-separated list of URIs
41
+ containing only the schema, the host, and the port fields. Note that
42
+ when using multiple URIs you cannot determine to which URI your client
43
+ gets connected.
39
44
40
45
Note that internally the OpenLDAP funtion
41
- `ldap_initialize(3) <https://www.openldap.org/software/man.cgi?query=ldap_init&sektion=3 >`_
42
- is called which just initializes the LDAP connection struct in the C API
43
- - nothing else. Therefore the first call to an operation method (bind,
44
- search etc.) then really opens the connection (lazy connect). Before
45
- that nothing is sent on the wire. The error handling in the calling
46
+ `ldap_initialize(3) <https://www.openldap.org/software/man.cgi?query=ldap_init&sektion=3 >`_
47
+ is called which just initializes the LDAP connection struct in the C API
48
+ - nothing else. Therefore the first call to an operation method (bind,
49
+ search etc.) then really opens the connection (lazy connect). Before
50
+ that nothing is sent on the wire. The error handling in the calling
46
51
application has to correctly handle this behaviour.
47
52
48
53
The optional arguments are for generating debug log information:
@@ -566,9 +571,10 @@ LDAPObject classes
566
571
and closed when the LDAP object is deleted. Internally :py:class: `LDAPObject `
567
572
is set to :py:class: `SimpleLDAPObject ` by default.
568
573
569
-
570
574
.. py :class :: SimpleLDAPObject(uri [, trace_level=0 [, trace_file=sys.stdout [, trace_stack_limit=5 ]]])
571
575
576
+ The arguments are same like for function :py:func: `initialize() `.
577
+
572
578
Instances of :py:class: `LDAPObject ` are returned by :py:func: `initialize() `
573
579
and :py:func: `open() ` (deprecated). The connection is automatically unbound
574
580
and closed when the LDAP object is deleted.
@@ -580,6 +586,8 @@ LDAPObject classes
580
586
reconnects when using the synchronous request methods (see below). This class
581
587
also implements the pickle protocol.
582
588
589
+ The first arguments are same like for function :py:func: `initialize() `.
590
+
583
591
For automatic reconnects it has additional arguments:
584
592
585
593
*retry_max * specifies the number of reconnect attempts before
@@ -745,7 +753,7 @@ and wait for and return with the server's result, or with
745
753
746
754
The *extreq * is an instance of class :py:class: `ldap.extop.ExtendedRequest `
747
755
containing the parameters for the extended operation request.
748
-
756
+
749
757
If argument *extop_resp_class * is set to a sub-class of
750
758
:py:class: `ldap.extop.ExtendedResponse ` this class is used to return an
751
759
object of this class instead of a raw BER value in respvalue.
@@ -925,7 +933,7 @@ and wait for and return with the server's result, or with
925
933
The additional arguments are:
926
934
927
935
*add_ctrls * (integer flag) specifies whether response controls are returned.
928
-
936
+
929
937
add_intermediates (integer flag) specifies whether response controls of
930
938
intermediate search results are returned.
931
939
0 commit comments