[python-ldap] Struggling to implement persistent search
Jeroen van Meeuwen (Kolab Systems)
vanmeeuwen at kolabsys.com
Wed Apr 13 11:38:55 CEST 2011
Michael Ströder wrote:
> Jeroen van Meeuwen (Kolab Systems) wrote:
> > I'm trying to implement the PersistentSearchControl with
> > EntryChangeNotificationControl, but the latter does not seem to have a
> > encodeControlValue method.
> First of all: The API for LDAP controls changed.
> EntryChangeNotificationControl is only an instance of ResponseControl.
Yes, I should have noted I'm continuously working against CVS HEAD.
> > The results I'm getting from a stand-alone PersistentSearchControl
> > (using returnECs=True) however do not seem to represent the changeType
> > in any way.
> Please show your code.
> Note that ResponseControl.decodeControlValue() is
> supposed to set class attributes as side effect, not to return the decoded
> value anymore. Have a look at Demo/page_control.py to get the idea.
I have page control implemented, with a routine that did not seem to work
well for the persistent searching... not sure why but any suggestions are
> In case of EntryChangeNotificationControl the relevant class attributes are
> changeType, changeNumber and previousDN.
These are what I'm after. I'm just failing to implement it correctly.
> > Has somebody successfully implemented PersistentSearchControl with
> > EntryChangeNotificationControl / changeType,
Cool, that's what I needed to hear after running in trial and error circles
for much too long ;-)
> The code in ldap.controls.psearch is result of a customer project. I
> want to add also some demo code in Demo/pyasn1/. Not sure when I have time
> to do that.
> Which LDAP server are you working with?
389 Directory Server -so Netscape based as well.
Jeroen van Meeuwen
Senior Engineer, Kolab Systems AG
e: vanmeeuwen at kolabsys.com
t: +44 77 340 9500
pgp: 9342 BF08
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the python-ldap