From: <mi...@st...> - 2002-12-16 20:51:29
|
HI! Anyone in favour of re-enabling method set_rebind_proc()? It has been disabled quite a while ago and I would like to remove the code from LDAPObject.c. Callbacks are pretty un-pythonic and the functionality can be better achieved in a Python wrapper class. If someone really needs it he/she should volunteer maintaining it according to changes which might have been made in recent versions of OpenLDAP 2.x. Ciao, Michael. |
From: Ganesan R <rga...@my...> - 2002-12-17 11:59:20
|
Hi, The documentation for the LDAP add operation reads (See http://python-ldap.sourceforge.net/doc/python-ldap/node11.html) ------ add(dn, modlist) add_s(dn, modlist) This function is similar to modify(), except that the operation integer is omitted from the tuples in modlist. You might want to like into sub-module ldap.modlist for generating modlist. ------ Apart from the typo there (like into sub-module instead of look into sub-module), the description seems to imply that add is a short cut for modify with LDAP_MOD_ADD. I'd change that to add(dn, modlist) add_s(dn, modlist) Performs an LDAP add operation on dn. The dn argument is the distinguished name (DN) of the entry to add, and addlist is a list of attributes to be added. The modlist is similar the one passed to modify(), except that the operation integer is omitted from the tuples in modlist. You might want to look into sub-module ldap.modlist for generating the modlist. Ganesan -- Ganesan R |
From: <mi...@st...> - 2002-12-18 16:01:24
|
Ganesan R wrote: > add(dn, modlist) > add_s(dn, modlist) > > Performs an LDAP add operation on dn. The dn argument is the distinguished > name (DN) of the entry to add, and addlist is a list of attributes to be > added. The modlist is similar the one passed to modify(), except that the > operation integer is omitted from the tuples in modlist. You might want to > look into sub-module ldap.modlist for generating the modlist. Ok. Ciao, Michael. |
From: Ganesan R <rga...@my...> - 2002-12-19 03:42:25
|
>>>>> "Michael" =3D=3D Michael Str=F6der <mi...@st...> writes: > Ganesan R wrote: >> add(dn, modlist) >> add_s(dn, modlist) >> Performs an LDAP add operation on dn. The dn argument is the >> distinguished >> name (DN) of the entry to add, and addlist is a list of attributes to = be ^^^^^^^ >> added. The modlist is similar the one passed to modify(), except that = the >> operation integer is omitted from the tuples in modlist. You might wa= nt to >> look into sub-module ldap.modlist for generating the modlist. Oops, that should be modlist.=20 Ganesan --=20 Ganesan R |
From: <mi...@st...> - 2002-12-19 20:32:15
|
Ganesan R wrote: > > Oops, that should be modlist. I noticed that. Ciao, Michael. |
From: Steffen R. <ste...@sy...> - 2002-12-17 13:59:42
|
Michael Str=F6der <mi...@st...> writes: > HI! >=20 > Anyone in favour of re-enabling method set_rebind_proc()? Well, I am. To be exact. I am interested in the functionality provided by set_rebind_proc, not necessarily in its implementation. > It has been disabled quite a while ago and I would like to remove > the code from LDAPObject.c. Callbacks are pretty un-pythonic and the > functionality can be better achieved in a Python wrapper class. The last time I looked into this issue, I did not see an easy way how to build a wrapper class which encapsulates the rebinding. Do you have more ideas in this direction? I'm not sure when I'll find the time to work on this, but I may be able to contribute an implementation. > If someone really needs it he/she should volunteer maintaining it > according to changes which might have been made in recent versions of > OpenLDAP 2.x. I currently use an implementation that is backward compatible with OpenLDAP 1.x. The main reason is my application works both on Unix and WinNT. Since I don't actively support WinNT (esp. I don't have the infrastructure to build C-Code on NT), I depend on pre-built packages. The last time I checked, I didn't find any python-ldap-2.x package for windows. /steffen --=20 ste...@sy... <> Gravity is a myth -- the Earth sucks! |
From: <mi...@st...> - 2002-12-17 15:19:53
|
Steffen Ries wrote: > Michael Str=F6der <mi...@st...> writes: >=20 > >Anyone in favour of re-enabling method set_rebind_proc()? >=20 > Well, I am. >=20 > To be exact. I am interested in the functionality provided by > set_rebind_proc, not necessarily in its implementation. This translates to: No problem to remove the related code from LDAPObject= =2Ec. >>It has been disabled quite a while ago and I would like to remove >>the code from LDAPObject.c. Callbacks are pretty un-pythonic and the >>functionality can be better achieved in a Python wrapper class. >=20 > The last time I looked into this issue, I did not see an easy way how > to build a wrapper class which encapsulates the rebinding. Do you > have more ideas in this direction? I'm not sure when I'll find the > time to work on this, but I may be able to contribute an > implementation. Derive from ldap.ldapobject.LDAPObject and override all the relevant meth= ods. I have a bunch of ideas like this. But I have to make up my mind how to=20 implement these without stacking to many classes above each other. Maybe = some kind of mix-in classes would help. One could think of a registration dictionary for exception handlers. > I currently use an implementation that is backward compatible with > OpenLDAP 1.x. You're own your own with that. > I didn't find any python-ldap-2.x > package for windows. Contributions welcome. Ciao, Michael. |