[CalendarServer-changes] [13570] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 29 19:01:35 PDT 2014
Revision: 13570
http://trac.calendarserver.org//changeset/13570
Author: sagen at apple.com
Date: 2014-05-29 19:01:35 -0700 (Thu, 29 May 2014)
Log Message:
-----------
Add OD RecordType
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/resources.py
CalendarServer/trunk/txdav/who/opendirectory.py
Modified: CalendarServer/trunk/calendarserver/tools/resources.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/resources.py 2014-05-30 01:36:28 UTC (rev 13569)
+++ CalendarServer/trunk/calendarserver/tools/resources.py 2014-05-30 02:01:35 UTC (rev 13570)
@@ -31,7 +31,7 @@
from twisted.internet.defer import inlineCallbacks, returnValue
from txdav.who.directory import CalendarDirectoryRecordMixin
from twext.who.directory import DirectoryRecord as BaseDirectoryRecord
-from twext.who.opendirectory import RecordType
+from txdav.who.opendirectory import RecordType
log = Logger()
Modified: CalendarServer/trunk/txdav/who/opendirectory.py
===================================================================
--- CalendarServer/trunk/txdav/who/opendirectory.py 2014-05-30 01:36:28 UTC (rev 13569)
+++ CalendarServer/trunk/txdav/who/opendirectory.py 2014-05-30 02:01:35 UTC (rev 13570)
@@ -24,9 +24,11 @@
__all__ = [
"DirectoryService",
+ "RecordType"
]
from twext.who.opendirectory import DirectoryService
+from twisted.python.constants import Names, NamedConstant
@@ -36,3 +38,18 @@
_ODRecordType.location.recordType = _CSRecordType.location
_ODRecordType.resource.recordType = _CSRecordType.resource
+
+
+class RecordType(Names):
+
+ user = NamedConstant()
+ user.description = u"user"
+
+ group = NamedConstant()
+ group.description = u"group"
+
+ location = NamedConstant()
+ location.description = u"location"
+
+ resource = NamedConstant()
+ resource.description = u"resource"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140529/1a872ae2/attachment.html>
More information about the calendarserver-changes
mailing list