From: Michael S. <mi...@st...> - 2009-05-14 13:18:52
|
Zhang Huangbin wrote: > Michael Ströder wrote: >> 1. Client-side sorting is done within the client libs if supported. So >> it wouldn't be listed in the attribute 'supportedControl' of the DSA's >> rootDSE anyway. Not sure whether client controls are used in OpenLDAP's >> libldap at all. > > Any exist python module/function to sort ldap search results? Well, why do you really need that? I don't have client-side sorting in web2ldap because it won't scale with large search results. Some of my customers have more than 100k person/user entries in their directories. >> 2. One should always try out whether a DSA supports a particular control >> within a certain naming context. E.g. former versions of OpenLDAP >> supported the Tree Deletion Control only for naming contexts served by >> back-sql. >> >> Feature detection is not that easy. > > I also need function to delete ldap tree too, and reading your > web2ldap/pylib/ldapsession.py now. The function DelTree() is in pylib/w2lapp/delete.py. If the tree deletion control cannot or shall not be used it also makes use of some operational attributes (e.g. hasSubordinates etc.) to determine whether a found entry is a leaf-entry. > Tring to learn ldap programing from web2ldap now. Thanks for your great > program. :) Bear in mind that I started learning Python when the first code was written almost 11 years ago. So I have to admit that many parts are really ugly code and not really good programming examples. Ciao, Michael. |