Hi, I've plugged a modified directory into DCS 1.2. It can't list records and can in principle only authenticate users. Now I'm trying to port my changes to DCS 2.2. But I find that in 2.2 twistedcaldav.directory.directory.DirectoryService.allRecords() is called. ... which is a no go, for my "directory". Looking at directory/aggregate.py I see that recordWithGUID() has been removed, so the default implementation in class DirectoryService is called. I cannot figure out from the log messages whether this was on purpose. Anyway, when there's code still calling recordWithGUID and AggregateDirectoryService doesn't implement it, it falls back to the default implementation using allRecords(), which will prevent you from plugging in a directory which cannot implement allRecords() /Peter
You probably want your Directory to subclass twistedcaldav.directory.cachingdirectory.CachingDirectoryService which now lazily faults in directory records rather than listing them all up front. On Aug 12, 2009, at 7:24 AM, Peter Mogensen wrote:
Hi,
I've plugged a modified directory into DCS 1.2. It can't list records and can in principle only authenticate users. Now I'm trying to port my changes to DCS 2.2.
But I find that in 2.2 twistedcaldav.directory.directory.DirectoryService.allRecords() is called. ... which is a no go, for my "directory".
Looking at directory/aggregate.py I see that recordWithGUID() has been removed, so the default implementation in class DirectoryService is called. I cannot figure out from the log messages whether this was on purpose.
Anyway, when there's code still calling recordWithGUID and AggregateDirectoryService doesn't implement it, it falls back to the default implementation using allRecords(), which will prevent you from plugging in a directory which cannot implement allRecords()
/Peter _______________________________________________ calendarserver-dev mailing list calendarserver-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/calendarserver-dev
Morgen Sagen wrote:
You probably want your Directory to subclass twistedcaldav.directory.cachingdirectory.CachingDirectoryService which now lazily faults in directory records rather than listing them all up front.
Well... one reason that my directory can't answer anything but authentication is that it is already a networked memcached of a database. Adding another cache seems redundant. /Peter
Morgen Sagen wrote:
You probably want your Directory to subclass twistedcaldav.directory.cachingdirectory.CachingDirectoryService which now lazily faults in directory records rather than listing them all up front.
Btw... the problem is actually not that my directory service doesn't inherit from CachingDirectoryService. The problem is that AggregateDirectoryService doesn't. No matter how you implement your directory service it'll all be wrapped in AggregateDirectoryService which - as far as I can se - in DCS2.2 will always fall back in the dummy implementation of recordWithGUID() in DirectoryService. (which requires a working allRecords()) /Peter
participants (2)
-
Morgen Sagen
-
Peter Mogensen