<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[12422] CalendarServer/branches/newdirectory</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/12422">12422</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2014-01-22 12:29:15 -0800 (Wed, 22 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>FIrst pass</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServerbranchesnewdirectorycalendarservertaputilpy">CalendarServer/branches/newdirectory/calendarserver/tap/util.py</a></li>
<li><a href="#CalendarServerbranchesnewdirectorytwistedcaldavdirectorydirectorypy">CalendarServer/branches/newdirectory/twistedcaldav/directory/directory.py</a></li>
<li><a href="#CalendarServerbranchesnewdirectorytwistedcaldavstdconfigpy">CalendarServer/branches/newdirectory/twistedcaldav/stdconfig.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServerbranchesnewdirectorycalendarservertaputilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/newdirectory/calendarserver/tap/util.py (12421 => 12422)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/newdirectory/calendarserver/tap/util.py        2014-01-22 19:11:53 UTC (rev 12421)
+++ CalendarServer/branches/newdirectory/calendarserver/tap/util.py        2014-01-22 20:29:15 UTC (rev 12422)
</span><span class="lines">@@ -28,79 +28,87 @@
</span><span class="cx">
</span><span class="cx"> import errno
</span><span class="cx"> import os
</span><del>-from time import sleep
</del><ins>+# from time import sleep
</ins><span class="cx"> from socket import fromfd, AF_UNIX, SOCK_STREAM, socketpair
</span><span class="cx"> import psutil
</span><ins>+from urllib import quote
</ins><span class="cx">
</span><span class="cx"> from twext.python.filepath import CachingFilePath as FilePath
</span><span class="cx"> from twext.python.log import Logger
</span><del>-from txweb2.auth.basic import BasicCredentialFactory
-from txweb2.dav import auth
-from txweb2.http_headers import Headers
-from txweb2.resource import Resource
-from txweb2.static import File as FileResource
</del><ins>+from twisted.python.usage import UsageError
+from twext.enterprise.ienterprise import POSTGRES_DIALECT
+from twext.enterprise.ienterprise import ORACLE_DIALECT
+from twext.enterprise.adbapi2 import (
+ ConnectionPool, ConnectionPoolConnection, ConnectionPoolClient
+)
+from twext.who.aggregate import AggregateDirectoryService
</ins><span class="cx">
</span><span class="cx"> from twisted.application.service import Service
</span><span class="cx"> from twisted.cred.portal import Portal
</span><del>-from twisted.internet.defer import inlineCallbacks, returnValue, Deferred, succeed
</del><ins>+from twisted.internet.defer import (
+ inlineCallbacks, returnValue, Deferred, succeed
+)
</ins><span class="cx"> from twisted.internet import reactor as _reactor
</span><span class="cx"> from twisted.internet.reactor import addSystemEventTrigger
</span><span class="cx"> from twisted.internet.tcp import Connection
</span><span class="cx"> from twisted.python.reflect import namedClass
</span><span class="cx"> # from twisted.python.failure import Failure
</span><span class="cx">
</span><ins>+from txweb2.auth.basic import BasicCredentialFactory
+from txweb2.dav import auth
+from txweb2.http_headers import Headers
+from txweb2.resource import Resource
+from txweb2.static import File as FileResource
+
+from txdav.base.datastore.dbapiclient import DBAPIConnector, OracleConnector
+from txdav.base.datastore.dbapiclient import postgresPreflight
+from txdav.base.datastore.subpostgres import PostgresService
+from txdav.common.datastore.podding.resource import ConduitResource
+from txdav.common.datastore.sql import CommonDataStore as CommonSQLDataStore
+from txdav.common.datastore.file import CommonDataStore as CommonFileDataStore
+from txdav.common.datastore.sql import current_sql_schema
+from txdav.common.datastore.upgrade.sql.upgrade import NotAllowedToUpgrade
+from txdav.caldav.datastore.scheduling.ischedule.dkim import (
+ DKIMUtils, DomainKeyResource
+)
+from txdav.caldav.datastore.scheduling.ischedule.resource import (
+ IScheduleInboxResource
+)
+
+from twistedcaldav.config import ConfigurationError
</ins><span class="cx"> from twistedcaldav.bind import doBind
</span><span class="cx"> from twistedcaldav.cache import CacheStoreNotifierFactory
</span><span class="cx"> from twistedcaldav.directory import calendaruserproxy
</span><span class="cx"> from twistedcaldav.directory.addressbook import DirectoryAddressBookHomeProvisioningResource
</span><del>-from twistedcaldav.directory.aggregate import AggregateDirectoryService
</del><ins>+# from twistedcaldav.directory.aggregate import AggregateDirectoryService
</ins><span class="cx"> from twistedcaldav.directory.calendar import DirectoryCalendarHomeProvisioningResource
</span><span class="cx"> from twistedcaldav.directory.digest import QopDigestCredentialFactory
</span><del>-from twistedcaldav.directory.directory import GroupMembershipCache
</del><ins>+# from twistedcaldav.directory.directory import GroupMembershipCache
</ins><span class="cx"> from twistedcaldav.directory.principal import DirectoryPrincipalProvisioningResource
</span><del>-from twistedcaldav.directory.wiki import WikiDirectoryService
-from calendarserver.push.notifier import NotifierFactory
-from calendarserver.push.applepush import APNSubscriptionResource
-from twistedcaldav.directorybackedaddressbook import DirectoryBackedAddressBookResource
</del><ins>+# from twistedcaldav.directory.wiki import WikiDirectoryService
+from twistedcaldav.directorybackedaddressbook import (
+ DirectoryBackedAddressBookResource
+)
</ins><span class="cx"> from twistedcaldav.resource import AuthenticationWrapper
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.dkim import DKIMUtils, DomainKeyResource
-from txdav.caldav.datastore.scheduling.ischedule.resource import IScheduleInboxResource
</del><span class="cx"> from twistedcaldav.simpleresource import SimpleResource, SimpleRedirectResource
</span><span class="cx"> from twistedcaldav.timezones import TimezoneCache
</span><span class="cx"> from twistedcaldav.timezoneservice import TimezoneServiceResource
</span><span class="cx"> from twistedcaldav.timezonestdservice import TimezoneStdServiceResource
</span><del>-from twext.enterprise.ienterprise import POSTGRES_DIALECT
-from twext.enterprise.ienterprise import ORACLE_DIALECT
-from twext.enterprise.adbapi2 import ConnectionPool, ConnectionPoolConnection
</del><span class="cx">
</span><del>-
</del><span class="cx"> try:
</span><span class="cx"> from twistedcaldav.authkerb import NegotiateCredentialFactory
</span><del>- NegotiateCredentialFactory # pacify pyflakes
</del><span class="cx"> except ImportError:
</span><span class="cx"> NegotiateCredentialFactory = None
</span><span class="cx">
</span><del>-from twext.enterprise.adbapi2 import ConnectionPoolClient
-from txdav.base.datastore.dbapiclient import DBAPIConnector, OracleConnector
-from txdav.base.datastore.dbapiclient import postgresPreflight
-from txdav.base.datastore.subpostgres import PostgresService
-
</del><ins>+from calendarserver.push.notifier import NotifierFactory
+from calendarserver.push.applepush import APNSubscriptionResource
</ins><span class="cx"> from calendarserver.accesslog import DirectoryLogWrapperResource
</span><span class="cx"> from calendarserver.provision.root import RootResource
</span><span class="cx"> from calendarserver.tools.util import checkDirectory
</span><span class="cx"> from calendarserver.webadmin.resource import WebAdminResource
</span><span class="cx"> from calendarserver.webcal.resource import WebCalendarResource
</span><span class="cx">
</span><del>-from txdav.common.datastore.podding.resource import ConduitResource
-from txdav.common.datastore.sql import CommonDataStore as CommonSQLDataStore
-from txdav.common.datastore.file import CommonDataStore as CommonFileDataStore
-from txdav.common.datastore.sql import current_sql_schema
-from txdav.common.datastore.upgrade.sql.upgrade import NotAllowedToUpgrade
-from twext.python.filepath import CachingFilePath
-from urllib import quote
-from twisted.python.usage import UsageError
</del><span class="cx">
</span><del>-
</del><span class="cx"> log = Logger()
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -122,7 +130,7 @@
</span><span class="cx">
</span><span class="cx"> @rtype: L{PostgresService}
</span><span class="cx"> """
</span><del>- dbRoot = CachingFilePath(config.DatabaseRoot)
</del><ins>+ dbRoot = FilePath(config.DatabaseRoot)
</ins><span class="cx"> # Construct a PostgresService exactly as the parent would, so that we
</span><span class="cx"> # can establish connection information.
</span><span class="cx"> return PostgresService(
</span><span class="lines">@@ -237,7 +245,7 @@
</span><span class="cx"> notifierFactories["cache"] = CacheStoreNotifierFactory()
</span><span class="cx">
</span><span class="cx"> if directoryService is None:
</span><del>- directoryService = directoryFromConfig(config)
</del><ins>+ directoryService = directoryServiceFromConfig(config)
</ins><span class="cx">
</span><span class="cx"> quota = config.UserQuota
</span><span class="cx"> if quota == 0:
</span><span class="lines">@@ -281,93 +289,109 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-def directoryFromConfig(config):
</del><ins>+def directoryServiceFromSubConfig(subConfig):
+ name = subConfig["name"]
+
+ log.info("Setting up {0} directory service.".format(name))
+
+ if name == "XML":
+ directoryClass = namedClass("twext.who.xml.DirectoryService")
+ filePath = FilePath(subConfig["path"])
+ reloadInterval = int(
+ subConfig.get("reloadInterval", directoryClass.reloadInterval)
+ )
+ directory = directoryClass(filePath)
+ directory.reloadInterval = reloadInterval
+
+ else:
+ raise ConfigurationError(
+ "Unknown directory service name: {0}".format(name)
+ )
+
+
+
+def directoryServiceFromConfig(config):
</ins><span class="cx"> """
</span><span class="cx"> Create an L{AggregateDirectoryService} from the given configuration.
</span><span class="cx"> """
</span><del>- #
- # Setup the Augment Service
- #
- if config.AugmentService.type:
- augmentClass = namedClass(config.AugmentService.type)
- log.info("Configuring augment service of type: {augmentClass}",
- augmentClass=augmentClass)
- try:
- augmentService = augmentClass(**config.AugmentService.params)
- except IOError:
- log.error("Could not start augment service")
- raise
- else:
- augmentService = None
</del><ins>+ # #
+ # # Setup the Augment Service
+ # #
+ # if config.AugmentService.type:
+ # augmentClass = namedClass(config.AugmentService.type)
+ # log.info("Configuring augment service of type: {augmentClass}",
+ # augmentClass=augmentClass)
+ # try:
+ # augmentService = augmentClass(**config.AugmentService.params)
+ # except IOError:
+ # log.error("Could not start augment service")
+ # raise
+ # else:
+ # augmentService = None
</ins><span class="cx">
</span><del>- #
- # Setup the group membership cacher
- #
- if config.GroupCaching.Enabled:
- groupMembershipCache = GroupMembershipCache(
- config.GroupCaching.MemcachedPool,
- expireSeconds=config.GroupCaching.ExpireSeconds)
- else:
- groupMembershipCache = None
</del><ins>+ # #
+ # # Setup the group membership cacher
+ # #
+ # if config.GroupCaching.Enabled:
+ # groupMembershipCache = GroupMembershipCache(
+ # config.GroupCaching.MemcachedPool,
+ # expireSeconds=config.GroupCaching.ExpireSeconds)
+ # else:
+ # groupMembershipCache = None
</ins><span class="cx">
</span><ins>+ # config.DirectoryService.params.augmentService = augmentService
+ # config.DirectoryService.params.groupMembershipCache = groupMembershipCache
+
</ins><span class="cx"> #
</span><span class="cx"> # Setup the Directory
</span><span class="cx"> #
</span><del>- directories = []
</del><ins>+ services = []
</ins><span class="cx">
</span><del>- directoryClass = namedClass(config.DirectoryService.type)
- principalResourceClass = DirectoryPrincipalProvisioningResource
</del><ins>+ baseService = directoryServiceFromSubConfig(config.DirectoryService)
+ services.append(baseService)
</ins><span class="cx">
</span><del>- log.info("Configuring directory service of type: {directoryType}",
- directoryType=config.DirectoryService.type)
</del><ins>+ # # Wait for the directory to become available
+ # while not baseService.isAvailable():
+ # sleep(5)
</ins><span class="cx">
</span><del>- config.DirectoryService.params.augmentService = augmentService
- config.DirectoryService.params.groupMembershipCache = groupMembershipCache
- baseDirectory = directoryClass(config.DirectoryService.params)
</del><ins>+ # #
+ # # Setup the Locations and Resources Service
+ # #
+ # if config.ResourceService.Enabled:
+ # resourceClass = namedClass(config.ResourceService.type)
</ins><span class="cx">
</span><del>- # Wait for the directory to become available
- while not baseDirectory.isAvailable():
- sleep(5)
</del><ins>+ # log.info("Configuring resource service of type: {resourceClass}",
+ # resourceClass=resourceClass)
</ins><span class="cx">
</span><del>- directories.append(baseDirectory)
</del><ins>+ # # config.ResourceService.params.augmentService = augmentService
+ # # config.ResourceService.params.groupMembershipCache = groupMembershipCache
+ # resourceDirectory = resourceClass(config.ResourceService.params)
+ # resourceDirectory.realmName = baseDirectory.realmName
+ # directories.append(resourceDirectory)
</ins><span class="cx">
</span><del>- #
- # Setup the Locations and Resources Service
- #
- if config.ResourceService.Enabled:
- resourceClass = namedClass(config.ResourceService.type)
</del><ins>+ # #
+ # # Add wiki directory service
+ # #
+ # if config.Authentication.Wiki.Enabled:
+ # wikiDirectory = WikiDirectoryService()
+ # wikiDirectory.realmName = baseDirectory.realmName
+ # directories.append(wikiDirectory)
</ins><span class="cx">
</span><del>- log.info("Configuring resource service of type: {resourceClass}",
- resourceClass=resourceClass)
-
- config.ResourceService.params.augmentService = augmentService
- config.ResourceService.params.groupMembershipCache = groupMembershipCache
- resourceDirectory = resourceClass(config.ResourceService.params)
- resourceDirectory.realmName = baseDirectory.realmName
- directories.append(resourceDirectory)
-
</del><span class="cx"> #
</span><del>- # Add wiki directory service
</del><ins>+ # Use system-wide realm on OSX
</ins><span class="cx"> #
</span><del>- if config.Authentication.Wiki.Enabled:
- wikiDirectory = WikiDirectoryService()
- wikiDirectory.realmName = baseDirectory.realmName
- directories.append(wikiDirectory)
</del><ins>+ # try:
+ # import ServerFoundation
+ # realmName = ServerFoundation.XSAuthenticator.defaultRealm().encode("utf-8")
+ # except ImportError:
+ # pass
</ins><span class="cx">
</span><del>- directory = AggregateDirectoryService(directories, groupMembershipCache)
</del><ins>+ aggregateService = AggregateDirectoryService(
+ baseService.realmName, services
+ )
+ DirectoryPrincipalProvisioningResource("/principals/", aggregateService)
</ins><span class="cx">
</span><del>- #
- # Use system-wide realm on OSX
- #
- try:
- import ServerFoundation
- realmName = ServerFoundation.XSAuthenticator.defaultRealm().encode("utf-8")
- directory.setRealm(realmName)
- except ImportError:
- pass
- log.info("Setting up principal collection: {cls}", cls=principalResourceClass)
- principalResourceClass("/principals/", directory)
- return directory
</del><ins>+ return aggregateService
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServerbranchesnewdirectorytwistedcaldavdirectorydirectorypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/newdirectory/twistedcaldav/directory/directory.py (12421 => 12422)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/newdirectory/twistedcaldav/directory/directory.py        2014-01-22 19:11:53 UTC (rev 12421)
+++ CalendarServer/branches/newdirectory/twistedcaldav/directory/directory.py        2014-01-22 20:29:15 UTC (rev 12422)
</span><span class="lines">@@ -15,6 +15,7 @@
</span><span class="cx"> # limitations under the License.
</span><span class="cx"> ##
</span><span class="cx">
</span><ins>+raise NotImplementedError("!!!!! die !!!!!")
</ins><span class="cx">
</span><span class="cx"> """
</span><span class="cx"> Generic directory service classes.
</span></span></pre></div>
<a id="CalendarServerbranchesnewdirectorytwistedcaldavstdconfigpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/newdirectory/twistedcaldav/stdconfig.py (12421 => 12422)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/newdirectory/twistedcaldav/stdconfig.py        2014-01-22 19:11:53 UTC (rev 12421)
+++ CalendarServer/branches/newdirectory/twistedcaldav/stdconfig.py        2014-01-22 20:29:15 UTC (rev 12422)
</span><span class="lines">@@ -48,120 +48,120 @@
</span><span class="cx"> else:
</span><span class="cx"> DEFAULT_CONFIG_FILE = "/etc/caldavd/caldavd.plist"
</span><span class="cx">
</span><del>-DEFAULT_SERVICE_PARAMS = {
- "twistedcaldav.directory.xmlfile.XMLDirectoryService": {
</del><ins>+DEFAULT_SERVICE_CONFIG = {
+ "XML": {
</ins><span class="cx"> "xmlFile": "accounts.xml",
</span><span class="cx"> "recordTypes": ("users", "groups"),
</span><del>- "statSeconds" : 15,
</del><ins>+ "statSeconds": 15,
</ins><span class="cx"> },
</span><del>- "twistedcaldav.directory.appleopendirectory.OpenDirectoryService": {
- "node": "/Search",
- "cacheTimeout": 1, # Minutes
- "batchSize": 100, # for splitting up large queries
- "negativeCaching": False,
- "restrictEnabledRecords": False,
- "restrictToGroup": "",
- "recordTypes": ("users", "groups"),
- },
- "twistedcaldav.directory.ldapdirectory.LdapDirectoryService": {
- "cacheTimeout": 1, # Minutes
- "negativeCaching": False,
- "warningThresholdSeconds": 3,
- "batchSize": 500, # for splitting up large queries
- "requestTimeoutSeconds" : 10,
- "requestResultsLimit" : 200,
- "optimizeMultiName" : False,
- "queryLocationsImplicitly": True,
- "restrictEnabledRecords": False,
- "restrictToGroup": "",
- "recordTypes": ("users", "groups"),
- "uri": "ldap://localhost/",
- "tls": False,
- "tlsCACertFile": None,
- "tlsCACertDir": None,
- "tlsRequireCert": None, # never, allow, try, demand, hard
- "credentials": {
- "dn": None,
- "password": None,
- },
- "authMethod": "LDAP",
- "rdnSchema": {
- "base": "dc=example,dc=com",
- "guidAttr": "entryUUID",
- "users": {
- "rdn": "ou=People",
- "attr": "uid", # used only to synthesize email address
- "emailSuffix": None, # used only to synthesize email address
- "filter": None, # additional filter for this type
- "loginEnabledAttr" : "", # attribute controlling login
- "loginEnabledValue" : "yes", # "True" value of above attribute
- "calendarEnabledAttr" : "", # attribute controlling enabledForCalendaring
- "calendarEnabledValue" : "yes", # "True" value of above attribute
- "mapping" : { # maps internal record names to LDAP
- "recordName": "uid",
- "fullName" : "cn",
- "emailAddresses" : ["mail"],
- "firstName" : "givenName",
- "lastName" : "sn",
- },
- },
- "groups": {
- "rdn": "ou=Group",
- "attr": "cn", # used only to synthesize email address
- "emailSuffix": None, # used only to synthesize email address
- "filter": None, # additional filter for this type
- "mapping" : { # maps internal record names to LDAP
- "recordName": "cn",
- "fullName" : "cn",
- "emailAddresses" : ["mail"],
- "firstName" : "givenName",
- "lastName" : "sn",
- },
- },
- "locations": {
- "rdn": "ou=Places",
- "attr": "cn", # used only to synthesize email address
- "emailSuffix": None, # used only to synthesize email address
- "filter": None, # additional filter for this type
- "calendarEnabledAttr" : "", # attribute controlling enabledForCalendaring
- "calendarEnabledValue" : "yes", # "True" value of above attribute
- "mapping" : { # maps internal record names to LDAP
- "recordName": "cn",
- "fullName" : "cn",
- "emailAddresses" : ["mail"],
- "firstName" : "givenName",
- "lastName" : "sn",
- },
- },
- "resources": {
- "rdn": "ou=Resources",
- "attr": "cn", # used only to synthesize email address
- "emailSuffix": None, # used only to synthesize email address
- "filter": None, # additional filter for this type
- "calendarEnabledAttr" : "", # attribute controlling enabledForCalendaring
- "calendarEnabledValue" : "yes", # "True" value of above attribute
- "mapping" : { # maps internal record names to LDAP
- "recordName": "cn",
- "fullName" : "cn",
- "emailAddresses" : ["mail"],
- "firstName" : "givenName",
- "lastName" : "sn",
- },
- },
- },
- "groupSchema": {
- "membersAttr": "member", # how members are specified
- "nestedGroupsAttr": None, # how nested groups are specified
- "memberIdAttr": None, # which attribute the above refer to
- },
- "resourceSchema": {
- "resourceInfoAttr": None, # contains location/resource info
- "autoAcceptGroupAttr": None, # auto accept group
- },
- "poddingSchema": {
- "serverIdAttr": None, # maps to augments server-id
- },
- },
</del><ins>+ # "twistedcaldav.directory.appleopendirectory.OpenDirectoryService": {
+ # "node": "/Search",
+ # "cacheTimeout": 1, # Minutes
+ # "batchSize": 100, # for splitting up large queries
+ # "negativeCaching": False,
+ # "restrictEnabledRecords": False,
+ # "restrictToGroup": "",
+ # "recordTypes": ("users", "groups"),
+ # },
+ # "twistedcaldav.directory.ldapdirectory.LdapDirectoryService": {
+ # "cacheTimeout": 1, # Minutes
+ # "negativeCaching": False,
+ # "warningThresholdSeconds": 3,
+ # "batchSize": 500, # for splitting up large queries
+ # "requestTimeoutSeconds" : 10,
+ # "requestResultsLimit" : 200,
+ # "optimizeMultiName" : False,
+ # "queryLocationsImplicitly": True,
+ # "restrictEnabledRecords": False,
+ # "restrictToGroup": "",
+ # "recordTypes": ("users", "groups"),
+ # "uri": "ldap://localhost/",
+ # "tls": False,
+ # "tlsCACertFile": None,
+ # "tlsCACertDir": None,
+ # "tlsRequireCert": None, # never, allow, try, demand, hard
+ # "credentials": {
+ # "dn": None,
+ # "password": None,
+ # },
+ # "authMethod": "LDAP",
+ # "rdnSchema": {
+ # "base": "dc=example,dc=com",
+ # "guidAttr": "entryUUID",
+ # "users": {
+ # "rdn": "ou=People",
+ # "attr": "uid", # used only to synthesize email address
+ # "emailSuffix": None, # used only to synthesize email address
+ # "filter": None, # additional filter for this type
+ # "loginEnabledAttr" : "", # attribute controlling login
+ # "loginEnabledValue" : "yes", # "True" value of above attribute
+ # "calendarEnabledAttr" : "", # attribute controlling enabledForCalendaring
+ # "calendarEnabledValue" : "yes", # "True" value of above attribute
+ # "mapping" : { # maps internal record names to LDAP
+ # "recordName": "uid",
+ # "fullName" : "cn",
+ # "emailAddresses" : ["mail"],
+ # "firstName" : "givenName",
+ # "lastName" : "sn",
+ # },
+ # },
+ # "groups": {
+ # "rdn": "ou=Group",
+ # "attr": "cn", # used only to synthesize email address
+ # "emailSuffix": None, # used only to synthesize email address
+ # "filter": None, # additional filter for this type
+ # "mapping" : { # maps internal record names to LDAP
+ # "recordName": "cn",
+ # "fullName" : "cn",
+ # "emailAddresses" : ["mail"],
+ # "firstName" : "givenName",
+ # "lastName" : "sn",
+ # },
+ # },
+ # "locations": {
+ # "rdn": "ou=Places",
+ # "attr": "cn", # used only to synthesize email address
+ # "emailSuffix": None, # used only to synthesize email address
+ # "filter": None, # additional filter for this type
+ # "calendarEnabledAttr" : "", # attribute controlling enabledForCalendaring
+ # "calendarEnabledValue" : "yes", # "True" value of above attribute
+ # "mapping" : { # maps internal record names to LDAP
+ # "recordName": "cn",
+ # "fullName" : "cn",
+ # "emailAddresses" : ["mail"],
+ # "firstName" : "givenName",
+ # "lastName" : "sn",
+ # },
+ # },
+ # "resources": {
+ # "rdn": "ou=Resources",
+ # "attr": "cn", # used only to synthesize email address
+ # "emailSuffix": None, # used only to synthesize email address
+ # "filter": None, # additional filter for this type
+ # "calendarEnabledAttr" : "", # attribute controlling enabledForCalendaring
+ # "calendarEnabledValue" : "yes", # "True" value of above attribute
+ # "mapping" : { # maps internal record names to LDAP
+ # "recordName": "cn",
+ # "fullName" : "cn",
+ # "emailAddresses" : ["mail"],
+ # "firstName" : "givenName",
+ # "lastName" : "sn",
+ # },
+ # },
+ # },
+ # "groupSchema": {
+ # "membersAttr": "member", # how members are specified
+ # "nestedGroupsAttr": None, # how nested groups are specified
+ # "memberIdAttr": None, # which attribute the above refer to
+ # },
+ # "resourceSchema": {
+ # "resourceInfoAttr": None, # contains location/resource info
+ # "autoAcceptGroupAttr": None, # auto accept group
+ # },
+ # "poddingSchema": {
+ # "serverIdAttr": None, # maps to augments server-id
+ # },
+ # },
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DEFAULT_RESOURCE_PARAMS = {
</span><span class="lines">@@ -372,8 +372,8 @@
</span><span class="cx"> # users, groups, locations and resources) to the server.
</span><span class="cx"> #
</span><span class="cx"> "DirectoryService": {
</span><del>- "type": "twistedcaldav.directory.xmlfile.XMLDirectoryService",
- "params": DEFAULT_SERVICE_PARAMS["twistedcaldav.directory.xmlfile.XMLDirectoryService"],
</del><ins>+ "name": "XML",
+ "config": DEFAULT_SERVICE_CONFIG["XML"],
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> #
</span></span></pre>
</div>
</div>
</body>
</html>