[CalendarServer-changes] [3273] CalendarServer/trunk/twistedcaldav/tap.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 29 18:13:13 PDT 2008
Revision: 3273
http://trac.macosforge.org/projects/calendarserver/changeset/3273
Author: wsanchez at apple.com
Date: 2008-10-29 18:13:13 -0700 (Wed, 29 Oct 2008)
Log Message:
-----------
cosmetic
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/tap.py
Modified: CalendarServer/trunk/twistedcaldav/tap.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/tap.py 2008-10-30 01:04:32 UTC (rev 3272)
+++ CalendarServer/trunk/twistedcaldav/tap.py 2008-10-30 01:13:13 UTC (rev 3273)
@@ -271,7 +271,7 @@
% (description, dirpath,)
)
-def _getSSLPassphrase(*args):
+def getSSLPassphrase(*args):
if not config.SSLPrivateKey:
return None
@@ -363,15 +363,12 @@
implements(IPlugin, service.IServiceMaker)
tapname = "caldav"
-
description = "The Darwin Calendar Server"
-
options = CalDAVOptions
#
- # default resource classes
+ # Default resource classes
#
-
rootResourceClass = RootResource
principalResourceClass = DirectoryPrincipalProvisioningResource
calendarResourceClass = CalendarHomeProvisioningFile
@@ -392,7 +389,6 @@
#
directories = []
-
directoryClass = namedClass(config.DirectoryService["type"])
log.info("Configuring directory service of type: %s"
@@ -425,14 +421,12 @@
wikiDirectory.realmName = baseDirectory.realmName
directories.append(wikiDirectory)
-
directory = AggregateDirectoryService(directories)
if sudoDirectory:
directory.userRecordTypes.insert(0,
SudoDirectoryService.recordType_sudoers)
-
#
# Configure Memcached Client Pool
#
@@ -441,8 +435,10 @@
IPv4Address(
"TCP",
config.Memcached["BindAddress"],
- config.Memcached["Port"]),
- config.Memcached["MaxClients"])
+ config.Memcached["Port"],
+ ),
+ config.Memcached["MaxClients"],
+ )
#
# Configure NotificationClient
@@ -456,24 +452,29 @@
#
# Setup Resource hierarchy
#
+ log.info("Setting up document root at: %s"
+ % (config.DocumentRoot,))
+ log.info("Setting up principal collection: %r"
+ % (self.principalResourceClass,))
- log.info("Setting up document root at: %s" % (config.DocumentRoot,))
- log.info("Setting up principal collection: %r" % (self.principalResourceClass,))
+ principalCollection = self.principalResourceClass(
+ "/principals/",
+ directory,
+ )
- principalCollection = self.principalResourceClass("/principals/", directory)
+ log.info("Setting up calendar collection: %r"
+ % (self.calendarResourceClass,))
- log.info("Setting up calendar collection: %r" % (self.calendarResourceClass,))
-
calendarCollection = self.calendarResourceClass(
os.path.join(config.DocumentRoot, "calendars"),
- directory, "/calendars/"
+ directory, "/calendars/",
)
log.info("Setting up root resource: %r" % (self.rootResourceClass,))
root = self.rootResourceClass(
config.DocumentRoot,
- principalCollections=(principalCollection,)
+ principalCollections=(principalCollection,),
)
root.putChild("principals", principalCollection)
@@ -481,9 +482,12 @@
# Timezone service is optional
if config.EnableTimezoneService:
+ log.info("Setting up time zone service resource: %r"
+ % (self.timezoneServiceResourceClass,))
+
timezoneService = self.timezoneServiceResourceClass(
os.path.join(config.DocumentRoot, "timezones"),
- root
+ root,
)
root.putChild("timezones", timezoneService)
@@ -501,13 +505,15 @@
#
# IMIP delivery resource
#
+ log.info("Setting up iMIP inbox resource: %r"
+ % (self.imipResourceClass,))
+
imipInbox = self.imipResourceClass(
os.path.join(config.DocumentRoot, "inbox"),
root,
)
root.putChild("inbox", imipInbox)
-
#
# Configure ancillary data
#
@@ -517,7 +523,6 @@
#
# Configure the Site and Wrappers
#
-
credentialFactories = []
portal = Portal(auth.DavRealm())
@@ -546,11 +551,11 @@
if not principal:
credFactory = NegotiateCredentialFactory(
type="http",
- hostname=config.ServerHostName
+ hostname=config.ServerHostName,
)
else:
credFactory = NegotiateCredentialFactory(
- principal=principal
+ principal=principal,
)
except ValueError:
log.info("Could not start Kerberos")
@@ -579,18 +584,17 @@
root,
portal,
credentialFactories,
- (auth.IPrincipal,)
+ (auth.IPrincipal,),
)
logWrapper = DirectoryLogWrapperResource(
authWrapper,
- directory
+ directory,
)
#
# Configure the service
#
-
log.info("Setting up service")
if config.ProcessType == "Slave":
@@ -601,20 +605,20 @@
realRoot = pdmonster.PDClientAddressWrapper(
logWrapper,
config.PythonDirector["ControlSocket"],
- directory
+ directory,
)
else:
realRoot = logWrapper
logObserver = AMPCommonAccessLoggingObserver(
- config.ControlSocket
+ config.ControlSocket,
)
elif config.ProcessType == "Single":
realRoot = logWrapper
logObserver = RotatingFileAccessLoggingObserver(
- config.AccessLogFile
+ config.AccessLogFile,
)
log.info("Configuring log observer: %s" % (logObserver,))
@@ -626,7 +630,8 @@
channel = http.HTTPFactory(
site,
maxRequests=config.MaxRequests,
- betweenRequestsTimeOut=config.IdleConnectionTimeOut)
+ betweenRequestsTimeOut=config.IdleConnectionTimeOut,
+ )
def updateChannel(config, items):
channel.maxRequests = config.MaxRequests
@@ -659,7 +664,7 @@
httpService = internet.TCPServer(
int(port), channel,
interface=bindAddress,
- backlog=config.ListenBacklog
+ backlog=config.ListenBacklog,
)
httpService.setServiceParent(service)
@@ -671,7 +676,7 @@
config.SSLPrivateKey,
config.SSLCertificate,
certificateChainFile=config.SSLAuthorityChain,
- passwdCallback=_getSSLPassphrase
+ passwdCallback=getSSLPassphrase,
)
except SSL.Error, e:
log.error("Unable to set up SSL context factory: %s" % (e,))
@@ -680,7 +685,7 @@
httpsService = internet.SSLServer(
int(port), channel,
contextFactory, interface=bindAddress,
- backlog=config.ListenBacklog
+ backlog=config.ListenBacklog,
)
httpsService.setServiceParent(service)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081029/1c31d78b/attachment.html>
More information about the calendarserver-changes
mailing list