<!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>[3369] CalendarServer/trunk</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.macosforge.org/projects/calendarserver/changeset/3369">3369</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2008-11-11 13:38:42 -0800 (Tue, 11 Nov 2008)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use newly available config dotted notation.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarservertoolsexportpy">CalendarServer/trunk/calendarserver/tools/export.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavclusterpy">CalendarServer/trunk/twistedcaldav/cluster.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorycalendarpy">CalendarServer/trunk/twistedcaldav/directory/calendar.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorywikipy">CalendarServer/trunk/twistedcaldav/directory/wiki.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavfreebusyurlpy">CalendarServer/trunk/twistedcaldav/freebusyurl.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavlocalizationpy">CalendarServer/trunk/twistedcaldav/localization.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavmailpy">CalendarServer/trunk/twistedcaldav/mail.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavmethodput_commonpy">CalendarServer/trunk/twistedcaldav/method/put_common.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavnotifypy">CalendarServer/trunk/twistedcaldav/notify.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavresourcepy">CalendarServer/trunk/twistedcaldav/resource.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavrootpy">CalendarServer/trunk/twistedcaldav/root.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavschedulepy">CalendarServer/trunk/twistedcaldav/schedule.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavschedulingitippy">CalendarServer/trunk/twistedcaldav/scheduling/itip.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavschedulingschedulerpy">CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavstaticpy">CalendarServer/trunk/twistedcaldav/static.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavtappy">CalendarServer/trunk/twistedcaldav/tap.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavtesttest_configpy">CalendarServer/trunk/twistedcaldav/test/test_config.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavtesttest_optionspy">CalendarServer/trunk/twistedcaldav/test/test_options.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarservertoolsexportpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tools/export.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tools/export.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/calendarserver/tools/export.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> def getDirectory(config):
</span><span class="cx">     global _directory
</span><span class="cx">     if _directory is None:
</span><del>-        BaseDirectoryService = namedClass(config.DirectoryService[&quot;type&quot;])
</del><ins>+        BaseDirectoryService = namedClass(config.DirectoryService.type)
</ins><span class="cx"> 
</span><span class="cx">         class MyDirectoryService (BaseDirectoryService):
</span><span class="cx">             def principalCollection(self):
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx">                     return principal.calendarHome()
</span><span class="cx">                 return None
</span><span class="cx"> 
</span><del>-        _directory = MyDirectoryService(**config.DirectoryService[&quot;params&quot;])
</del><ins>+        _directory = MyDirectoryService(**config.DirectoryService.params)
</ins><span class="cx"> 
</span><span class="cx">     return _directory
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavclusterpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/cluster.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/cluster.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/cluster.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -85,15 +85,15 @@
</span><span class="cx">         if config.GroupName:
</span><span class="cx">             args.extend((&quot;-g&quot;, config.GroupName))
</span><span class="cx"> 
</span><del>-        if config.Profiling[&quot;Enabled&quot;]:
</del><ins>+        if config.Profiling.Enabled:
</ins><span class="cx">             args.append(
</span><span class="cx">                 &quot;--profile=%s/%s.pstats&quot;
</span><del>-                % (config.Profiling[&quot;BaseDirectory&quot;], self.getName())
</del><ins>+                % (config.Profiling.BaseDirectory, self.getName())
</ins><span class="cx">             )
</span><span class="cx">             args.extend((&quot;--savestats&quot;, &quot;--nothotshot&quot;))
</span><span class="cx"> 
</span><span class="cx">         args.extend([
</span><del>-            &quot;--reactor=%s&quot; % (config.Twisted[&quot;reactor&quot;],),
</del><ins>+            &quot;--reactor=%s&quot; % (config.Twisted.reactor,),
</ins><span class="cx">             &quot;-n&quot;, self.tapname,
</span><span class="cx">             &quot;-f&quot;, self.configFile,
</span><span class="cx">             &quot;-o&quot;, &quot;ProcessType=Slave&quot;,
</span><span class="lines">@@ -101,10 +101,10 @@
</span><span class="cx">             &quot;-o&quot;, &quot;PIDFile=None&quot;,
</span><span class="cx">             &quot;-o&quot;, &quot;ErrorLogFile=None&quot;,
</span><span class="cx">             &quot;-o&quot;, &quot;MultiProcess/ProcessCount=%d&quot;
</span><del>-                  % (config.MultiProcess[&quot;ProcessCount&quot;],)
</del><ins>+                  % (config.MultiProcess.ProcessCount,)
</ins><span class="cx">         ])
</span><span class="cx"> 
</span><del>-        if config.Memcached[&quot;ServerEnabled&quot;]:
</del><ins>+        if config.Memcached.ServerEnabled:
</ins><span class="cx">             args.extend([&quot;-o&quot;, &quot;Memcached/ClientEnabled=True&quot;])
</span><span class="cx"> 
</span><span class="cx">         if self.ports:
</span><span class="lines">@@ -147,8 +147,8 @@
</span><span class="cx"> 
</span><span class="cx">         delay = 0
</span><span class="cx"> 
</span><del>-        if config.MultiProcess[&quot;StaggeredStartup&quot;][&quot;Enabled&quot;]:
-            delay_interval = config.MultiProcess[&quot;StaggeredStartup&quot;][&quot;Interval&quot;]
</del><ins>+        if config.MultiProcess.StaggeredStartup.Enabled:
+            delay_interval = config.MultiProcess.StaggeredStartup.Interval
</ins><span class="cx">         else:
</span><span class="cx">             delay_interval = 0
</span><span class="cx"> 
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">     #
</span><span class="cx">     # Attempt to calculate the number of processes to use 1 per processor
</span><span class="cx">     #
</span><del>-    if config.MultiProcess[&quot;ProcessCount&quot;] == 0:
</del><ins>+    if config.MultiProcess.ProcessCount == 0:
</ins><span class="cx">         try:
</span><span class="cx">             cpuCount = getNCPU()
</span><span class="cx">         except NotImplementedError, e:
</span><span class="lines">@@ -240,16 +240,16 @@
</span><span class="cx">             log.err(&quot;Assuming one CPU, configuring one process.&quot;)
</span><span class="cx">             cpuCount = 1
</span><span class="cx"> 
</span><del>-        config.MultiProcess[&quot;ProcessCount&quot;] = cpuCount
</del><ins>+        config.MultiProcess.ProcessCount = cpuCount
</ins><span class="cx"> 
</span><del>-    if config.MultiProcess[&quot;ProcessCount&quot;] &gt; 1:
</del><ins>+    if config.MultiProcess.ProcessCount &gt; 1:
</ins><span class="cx">         if config.BindHTTPPorts:
</span><span class="cx">             port = [list(reversed(config.BindHTTPPorts))[0]]
</span><span class="cx"> 
</span><span class="cx">         if config.BindSSLPorts:
</span><span class="cx">             sslPort = [list(reversed(config.BindSSLPorts))[0]]
</span><span class="cx"> 
</span><del>-    elif config.MultiProcess[&quot;ProcessCount&quot;] == 1:
</del><ins>+    elif config.MultiProcess.ProcessCount == 1:
</ins><span class="cx">         if config.BindHTTPPorts:
</span><span class="cx">             port = config.BindHTTPPorts
</span><span class="cx"> 
</span><span class="lines">@@ -266,13 +266,13 @@
</span><span class="cx">     # We listen directly on the interfaces.
</span><span class="cx"> 
</span><span class="cx">     if (
</span><del>-        not config.MultiProcess[&quot;LoadBalancer&quot;][&quot;Enabled&quot;] or
-        config.MultiProcess[&quot;ProcessCount&quot;] == 1
</del><ins>+        not config.MultiProcess.LoadBalancer.Enabled or
+        config.MultiProcess.ProcessCount == 1
</ins><span class="cx">     ):
</span><span class="cx">         bindAddress = config.BindAddresses
</span><span class="cx"> 
</span><del>-    for p in xrange(0, config.MultiProcess[&quot;ProcessCount&quot;]):
-        if config.MultiProcess[&quot;ProcessCount&quot;] &gt; 1:
</del><ins>+    for p in xrange(0, config.MultiProcess.ProcessCount):
+        if config.MultiProcess.ProcessCount &gt; 1:
</ins><span class="cx">             if port is not None:
</span><span class="cx">                 port = [port[0] + 1]
</span><span class="cx"> 
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx">                 sslPort = [sslPort[0] + 1]
</span><span class="cx"> 
</span><span class="cx">         process = TwistdSlaveProcess(
</span><del>-            config.Twisted[&quot;twistd&quot;],
</del><ins>+            config.Twisted.twistd,
</ins><span class="cx">             self.tapname,
</span><span class="cx">             options[&quot;config&quot;],
</span><span class="cx">             bindAddress,
</span><span class="lines">@@ -303,8 +303,8 @@
</span><span class="cx">     #
</span><span class="cx">     # Set up pydirector config file.
</span><span class="cx">     #
</span><del>-    if (config.MultiProcess[&quot;LoadBalancer&quot;][&quot;Enabled&quot;] and
-        config.MultiProcess[&quot;ProcessCount&quot;] &gt; 1):
</del><ins>+    if (config.MultiProcess.LoadBalancer.Enabled and
+        config.MultiProcess.ProcessCount &gt; 1):
</ins><span class="cx">         services = []
</span><span class="cx"> 
</span><span class="cx">         if not config.BindAddresses:
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx">                         }
</span><span class="cx">                     )
</span><span class="cx"> 
</span><del>-            scheduler = config.MultiProcess[&quot;LoadBalancer&quot;][&quot;Scheduler&quot;]
</del><ins>+            scheduler = config.MultiProcess.LoadBalancer.Scheduler
</ins><span class="cx"> 
</span><span class="cx">             if httpPorts:
</span><span class="cx">                 services.append(
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx"> 
</span><span class="cx">         pdconfig = configTemplate % {
</span><span class="cx">             &quot;services&quot;: &quot;\n&quot;.join(services),
</span><del>-            &quot;controlSocket&quot;: config.PythonDirector[&quot;ControlSocket&quot;],
</del><ins>+            &quot;controlSocket&quot;: config.PythonDirector.ControlSocket,
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         fd, fname = tempfile.mkstemp(prefix=&quot;pydir&quot;)
</span><span class="lines">@@ -379,52 +379,52 @@
</span><span class="cx"> 
</span><span class="cx">         monitor.addProcess(
</span><span class="cx">             &quot;pydir&quot;,
</span><del>-            [sys.executable, config.PythonDirector[&quot;pydir&quot;], fname],
</del><ins>+            [sys.executable, config.PythonDirector.pydir, fname],
</ins><span class="cx">             env=parentEnv,
</span><span class="cx">         )
</span><span class="cx"> 
</span><del>-    if config.Memcached[&quot;ServerEnabled&quot;]:
</del><ins>+    if config.Memcached.ServerEnabled:
</ins><span class="cx">         log.msg(&quot;Adding memcached service&quot;)
</span><span class="cx"> 
</span><span class="cx">         memcachedArgv = [
</span><del>-            config.Memcached[&quot;memcached&quot;],
-            &quot;-p&quot;, str(config.Memcached[&quot;Port&quot;]),
-            &quot;-l&quot;, config.Memcached[&quot;BindAddress&quot;],
</del><ins>+            config.Memcached.memcached,
+            &quot;-p&quot;, str(config.Memcached.Port),
+            &quot;-l&quot;, config.Memcached.BindAddress,
</ins><span class="cx">         ]
</span><span class="cx"> 
</span><del>-        if config.Memcached[&quot;MaxMemory&quot;] is not 0:
-            memcachedArgv.extend([&quot;-m&quot;, str(config.Memcached[&quot;MaxMemory&quot;])])
</del><ins>+        if config.Memcached.MaxMemory is not 0:
+            memcachedArgv.extend([&quot;-m&quot;, str(config.Memcached.MaxMemory)])
</ins><span class="cx"> 
</span><span class="cx">         if config.UserName:
</span><span class="cx">             memcachedArgv.extend([&quot;-u&quot;, config.UserName])
</span><span class="cx"> 
</span><del>-        memcachedArgv.extend(config.Memcached[&quot;Options&quot;])
</del><ins>+        memcachedArgv.extend(config.Memcached.Options)
</ins><span class="cx"> 
</span><span class="cx">         monitor.addProcess(&quot;memcached&quot;, memcachedArgv, env=parentEnv)
</span><span class="cx"> 
</span><span class="cx">     if (
</span><del>-        config.Notifications[&quot;Enabled&quot;] and
-        config.Notifications[&quot;InternalNotificationHost&quot;] == &quot;localhost&quot;
</del><ins>+        config.Notifications.Enabled and
+        config.Notifications.InternalNotificationHost == &quot;localhost&quot;
</ins><span class="cx">     ):
</span><span class="cx">         log.msg(&quot;Adding notification service&quot;)
</span><span class="cx"> 
</span><span class="cx">         notificationsArgv = [
</span><span class="cx">             sys.executable,
</span><del>-            config.Twisted[&quot;twistd&quot;],
</del><ins>+            config.Twisted.twistd,
</ins><span class="cx">             &quot;-n&quot;, &quot;caldav_notifier&quot;,
</span><span class="cx">             &quot;-f&quot;, options[&quot;config&quot;],
</span><span class="cx">         ]
</span><span class="cx">         monitor.addProcess(&quot;notifications&quot;, notificationsArgv, env=parentEnv)
</span><span class="cx"> 
</span><span class="cx">     if (
</span><del>-        config.Scheduling[&quot;iMIP&quot;][&quot;Enabled&quot;] and
-        config.Scheduling[&quot;iMIP&quot;][&quot;MailGatewayServer&quot;] == &quot;localhost&quot;
</del><ins>+        config.Scheduling.iMIP.Enabled and
+        config.Scheduling.iMIP.MailGatewayServer == &quot;localhost&quot;
</ins><span class="cx">     ):
</span><span class="cx">         log.msg(&quot;Adding mail gateway service&quot;)
</span><span class="cx"> 
</span><span class="cx">         mailGatewayArgv = [
</span><span class="cx">             sys.executable,
</span><del>-            config.Twisted[&quot;twistd&quot;],
</del><ins>+            config.Twisted.twistd,
</ins><span class="cx">             &quot;-n&quot;, &quot;caldav_mailgateway&quot;,
</span><span class="cx">             &quot;-f&quot;, options[&quot;config&quot;],
</span><span class="cx">         ]
</span><span class="lines">@@ -447,14 +447,14 @@
</span><span class="cx">     parentEnv = {&quot;PYTHONPATH&quot;: os.environ.get(&quot;PYTHONPATH&quot;, &quot;&quot;)}
</span><span class="cx"> 
</span><span class="cx">     log.msg(&quot;Adding pydirector service with configuration: %s&quot;
</span><del>-            % (config.PythonDirector[&quot;ConfigFile&quot;],))
</del><ins>+            % (config.PythonDirector.ConfigFile,))
</ins><span class="cx"> 
</span><span class="cx">     service.addProcess(
</span><span class="cx">         &quot;pydir&quot;,
</span><span class="cx">         [
</span><span class="cx">             sys.executable,
</span><del>-            config.PythonDirector[&quot;pydir&quot;],
-            config.PythonDirector[&quot;ConfigFile&quot;]
</del><ins>+            config.PythonDirector.pydir,
+            config.PythonDirector.ConfigFile
</ins><span class="cx">         ],
</span><span class="cx">         env=parentEnv
</span><span class="cx">     )
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorycalendarpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/calendar.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/calendar.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/directory/calendar.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx">             childlist += (
</span><span class="cx">                 (&quot;dropbox&quot;, DropBoxHomeResource),
</span><span class="cx">             )
</span><del>-        if config.FreeBusyURL[&quot;Enabled&quot;]:
</del><ins>+        if config.FreeBusyURL.Enabled:
</ins><span class="cx">             childlist += (
</span><span class="cx">                 (&quot;freebusy&quot;, FreeBusyURLResource),
</span><span class="cx">             )
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">             inbox.processFreeBusyCalendar(childURL, True)
</span><span class="cx"> 
</span><span class="cx">             # Default calendar may need to be marked as the default for scheduling
</span><del>-            if config.Scheduling[&quot;CalDAV&quot;][&quot;DefaultCalendarProvisioned&quot;]:
</del><ins>+            if config.Scheduling.CalDAV.DefaultCalendarProvisioned:
</ins><span class="cx">                 inbox.writeDeadProperty(caldavxml.ScheduleDefaultCalendarURL(davxml.HRef(childURL)))
</span><span class="cx"> 
</span><span class="cx">             return self
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorywikipy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/wiki.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/wiki.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/directory/wiki.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">     if hasattr(request, 'wikiACL'):
</span><span class="cx">         returnValue(request.wikiACL)
</span><span class="cx"> 
</span><del>-    wikiConfig = config.Authentication[&quot;Wiki&quot;]
</del><ins>+    wikiConfig = config.Authentication.Wiki
</ins><span class="cx">     userID = &quot;unauthenticated&quot;
</span><span class="cx">     wikiID = resource.record.shortName
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavfreebusyurlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/freebusyurl.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/freebusyurl.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/freebusyurl.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">             davxml.Privilege(davxml.Read()),
</span><span class="cx">             davxml.Privilege(caldavxml.ScheduleDeliver()),
</span><span class="cx">         )
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+        if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">             privs += (davxml.Privilege(caldavxml.Schedule()),)
</span><span class="cx"> 
</span><span class="cx">         aces = (
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">                 davxml.Protected(),
</span><span class="cx">             ),
</span><span class="cx">         )
</span><del>-        if config.FreeBusyURL[&quot;AnonymousAccess&quot;]:
</del><ins>+        if config.FreeBusyURL.AnonymousAccess:
</ins><span class="cx">             aces += (
</span><span class="cx">                 # DAV:Read, for unauthenticated principals
</span><span class="cx">                 davxml.ACE(
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx">         if self.duration:
</span><span class="cx">             self.end = self.start + self.duration
</span><span class="cx">         if self.end is None:
</span><del>-            self.end = self.start + datetime.timedelta(days=config.FreeBusyURL[&quot;TimePeriod&quot;])
</del><ins>+            self.end = self.start + datetime.timedelta(days=config.FreeBusyURL.TimePeriod)
</ins><span class="cx">             
</span><span class="cx">         # End &gt; start
</span><span class="cx">         if self.end &lt;= self.start:
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavlocalizationpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/localization.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/localization.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/localization.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">     def __init__(self, lang, domain='calendarserver', localeDir=None):
</span><span class="cx"> 
</span><span class="cx">         if localeDir is None:
</span><del>-            localeDir = config.Localization[&quot;LocalesDirectory&quot;]
</del><ins>+            localeDir = config.Localization.LocalesDirectory
</ins><span class="cx"> 
</span><span class="cx">         # Cache gettext translation objects in class.translations
</span><span class="cx">         key = (lang, domain, localeDir)
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavmailpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/mail.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/mail.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/mail.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">             davxml.Privilege(davxml.Read()),
</span><span class="cx">             davxml.Privilege(caldavxml.ScheduleDeliver()),
</span><span class="cx">         )
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+        if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">             privs += (davxml.Privilege(caldavxml.Schedule()),)
</span><span class="cx">         return davxml.ACL(
</span><span class="cx">             # DAV:Read, CalDAV:schedule-deliver for all principals (includes anonymous)
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx">             # Compute token, add to db, generate email and send it
</span><span class="cx">             calendar = ical.Component.fromString(request.content.read())
</span><span class="cx">             headers = request.getAllHeaders()
</span><del>-            language = config.Localization[&quot;Language&quot;]
</del><ins>+            language = config.Localization.Language
</ins><span class="cx">             self.mailer.outbound(headers['originator'], headers['recipient'],
</span><span class="cx">                 calendar, language=language)
</span><span class="cx"> 
</span><span class="lines">@@ -777,7 +777,7 @@
</span><span class="cx"> 
</span><span class="cx">         details = self.getEventDetails(calendar, language=language)
</span><span class="cx"> 
</span><del>-        iconDir = config.Scheduling[&quot;iMIP&quot;][&quot;MailIconsDirectory&quot;].rstrip(&quot;/&quot;)
</del><ins>+        iconDir = config.Scheduling.iMIP.MailIconsDirectory.rstrip(&quot;/&quot;)
</ins><span class="cx">         iconName = &quot;cal-icon-%02d-%02d.png&quot; % (details['month'],
</span><span class="cx">             details['day'])
</span><span class="cx">         iconPath = os.path.join(iconDir, language, iconName)
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx"> 
</span><span class="cx">             details['iconName'] = iconName
</span><span class="cx"> 
</span><del>-            templateDir = config.Scheduling[&quot;iMIP&quot;][&quot;MailTemplatesDirectory&quot;].rstrip(&quot;/&quot;)
</del><ins>+            templateDir = config.Scheduling.iMIP.MailTemplatesDirectory.rstrip(&quot;/&quot;)
</ins><span class="cx">             templateName = &quot;cancel.html&quot; if canceled else &quot;invite.html&quot;
</span><span class="cx">             templatePath = os.path.join(templateDir, templateName)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavmethodput_commonpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/method/put_common.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx">                     raise HTTPError(responsecode.PRECONDITION_FAILED)
</span><span class="cx">                 self.schedule_tag_match = True
</span><span class="cx">             
</span><del>-            elif config.Scheduling[&quot;CalDAV&quot;][&quot;ScheduleTagCompatibility&quot;]:
</del><ins>+            elif config.Scheduling.CalDAV.ScheduleTagCompatibility:
</ins><span class="cx">                 # Compatibility with old clients. Policy:
</span><span class="cx">                 #
</span><span class="cx">                 # 1. If If-Match header is not present, never do smart merge.
</span><span class="lines">@@ -623,7 +623,7 @@
</span><span class="cx">         # NB Do this before implicit scheduling as we don't want old clients to trigger scheduling when
</span><span class="cx">         # the X- property is missing.
</span><span class="cx">         new_has_private_comments = False
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;].get(&quot;EnablePrivateComments&quot;, True) and self.calendar is not None:
</del><ins>+        if config.Scheduling.CalDAV.get(&quot;EnablePrivateComments&quot;, True) and self.calendar is not None:
</ins><span class="cx">             old_has_private_comments = self.destination.exists() and self.destinationcal and self.destination.hasDeadProperty(TwistedCalendarHasPrivateCommentsProperty)
</span><span class="cx">             new_has_private_comments = self.calendar.hasPropertyInAnyComponent((
</span><span class="cx">                 &quot;X-CALENDARSERVER-PRIVATE-COMMENT&quot;,
</span><span class="lines">@@ -946,7 +946,7 @@
</span><span class="cx">                 response.headers.setHeader(&quot;Schedule-Tag&quot;, self.scheduletag)                
</span><span class="cx"> 
</span><span class="cx">                 # Handle weak etag compatibility
</span><del>-                if config.Scheduling[&quot;CalDAV&quot;][&quot;ScheduleTagCompatibility&quot;]:
</del><ins>+                if config.Scheduling.CalDAV.ScheduleTagCompatibility:
</ins><span class="cx">                     if change_scheduletag:
</span><span class="cx">                         # Schedule-Tag change =&gt; weak ETag behavior must not happen
</span><span class="cx">                         etags = ()
</span><span class="lines">@@ -967,7 +967,7 @@
</span><span class="cx">                 self.destination.removeDeadProperty(TwistedScheduleMatchETags)                
</span><span class="cx"> 
</span><span class="cx">             # Check for existence of private comments and write property
</span><del>-            if config.Scheduling[&quot;CalDAV&quot;].get(&quot;EnablePrivateComments&quot;, True):
</del><ins>+            if config.Scheduling.CalDAV.get(&quot;EnablePrivateComments&quot;, True):
</ins><span class="cx">                 if new_has_private_comments:
</span><span class="cx">                     self.destination.writeDeadProperty(TwistedCalendarHasPrivateCommentsProperty())
</span><span class="cx">                 elif not self.destinationcal:
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavnotifypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/notify.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/notify.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/notify.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     def notify(self, op=&quot;update&quot;):
</span><span class="cx">         url = self._resource.url()
</span><span class="cx"> 
</span><del>-        if self.config.Notifications[&quot;Enabled&quot;]:
</del><ins>+        if self.config.Notifications.Enabled:
</ins><span class="cx">             if self._notify:
</span><span class="cx">                 self.log_debug(&quot;Notifications are enabled: %s %s&quot; % (op, url))
</span><span class="cx">                 return getNotificationClient().send(op, url)
</span><span class="lines">@@ -1151,7 +1151,7 @@
</span><span class="cx">     results = { 'enabled' : False }
</span><span class="cx"> 
</span><span class="cx">     # return the first enabled xmpp service settings in the config file
</span><del>-    for key, settings in config.Notifications[&quot;Services&quot;].iteritems():
</del><ins>+    for key, settings in config.Notifications.Services.iteritems():
</ins><span class="cx">         if (settings[&quot;Service&quot;] == &quot;twistedcaldav.notify.XMPPNotifierService&quot;
</span><span class="cx">             and settings[&quot;Enabled&quot;]):
</span><span class="cx">             results['enabled'] = True
</span><span class="lines">@@ -1280,27 +1280,27 @@
</span><span class="cx">         #
</span><span class="cx">         # Configure Memcached Client Pool
</span><span class="cx">         #
</span><del>-        if config.Memcached[&quot;ClientEnabled&quot;]:
</del><ins>+        if config.Memcached.ClientEnabled:
</ins><span class="cx">             memcachepool.installPool(
</span><span class="cx">                 IPv4Address(
</span><span class="cx">                     'TCP',
</span><del>-                    config.Memcached[&quot;BindAddress&quot;],
-                    config.Memcached[&quot;Port&quot;]),
-                config.Memcached[&quot;MaxClients&quot;])
</del><ins>+                    config.Memcached.BindAddress,
+                    config.Memcached.Port),
+                config.Memcached.MaxClients)
</ins><span class="cx"> 
</span><span class="cx">         multiService = service.MultiService()
</span><span class="cx"> 
</span><span class="cx">         notifiers = []
</span><del>-        for key, settings in config.Notifications[&quot;Services&quot;].iteritems():
</del><ins>+        for key, settings in config.Notifications.Services.iteritems():
</ins><span class="cx">             if settings[&quot;Enabled&quot;]:
</span><span class="cx">                 notifier = namedClass(settings[&quot;Service&quot;])(settings)
</span><span class="cx">                 notifier.setServiceParent(multiService)
</span><span class="cx">                 notifiers.append(notifier)
</span><span class="cx"> 
</span><span class="cx">         internet.TCPServer(
</span><del>-            config.Notifications[&quot;InternalNotificationPort&quot;],
</del><ins>+            config.Notifications.InternalNotificationPort,
</ins><span class="cx">             InternalNotificationFactory(notifiers,
</span><del>-                delaySeconds=config.Notifications[&quot;CoalesceSeconds&quot;])
</del><ins>+                delaySeconds=config.Notifications.CoalesceSeconds)
</ins><span class="cx">         ).setServiceParent(multiService)
</span><span class="cx"> 
</span><span class="cx">         return multiService
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/resource.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/resource.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/resource.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> class CalDAVComplianceMixIn(object):
</span><span class="cx"> 
</span><span class="cx">     def davComplianceClasses(self):
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+        if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">             extra_compliance = caldavxml.caldav_full_compliance
</span><span class="cx">         else:
</span><span class="cx">             extra_compliance = caldavxml.caldav_implicit_compliance
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">             extra_compliance += customxml.calendarserver_proxy_compliance
</span><span class="cx">         if config.EnablePrivateEvents:
</span><span class="cx">             extra_compliance += customxml.calendarserver_private_events_compliance
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;].get(&quot;EnablePrivateComments&quot;, True):
</del><ins>+        if config.Scheduling.CalDAV.get(&quot;EnablePrivateComments&quot;, True):
</ins><span class="cx">             extra_compliance += customxml.calendarserver_private_comments_compliance
</span><span class="cx">         extra_compliance += customxml.calendarserver_principal_property_search
</span><span class="cx">         return tuple(super(CalDAVComplianceMixIn, self).davComplianceClasses()) + extra_compliance
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavrootpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/root.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/root.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/root.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">                 &quot;Your sessionID was rejected by the authenticating wiki server.&quot;
</span><span class="cx">             ))
</span><span class="cx"> 
</span><del>-        wikiConfig = config.Authentication[&quot;Wiki&quot;]
</del><ins>+        wikiConfig = config.Authentication.Wiki
</ins><span class="cx">         cookies = request.headers.getHeader('cookie')
</span><span class="cx">         if wikiConfig[&quot;Enabled&quot;] and cookies is not None:
</span><span class="cx">             for cookie in cookies:
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavschedulepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/schedule.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/schedule.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/schedule.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">         privs = (
</span><span class="cx">             davxml.Privilege(caldavxml.ScheduleDeliver()),
</span><span class="cx">         )
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+        if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">             privs += (davxml.Privilege(caldavxml.Schedule()),)
</span><span class="cx"> 
</span><span class="cx">         return davxml.ACL(
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">             privs = (
</span><span class="cx">                 davxml.Privilege(caldavxml.ScheduleSend()),
</span><span class="cx">             )
</span><del>-            if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+            if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">                 privs += (davxml.Privilege(caldavxml.Schedule()),)
</span><span class="cx">     
</span><span class="cx">             return davxml.ACL(
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx">             davxml.Privilege(davxml.Read()),
</span><span class="cx">             davxml.Privilege(caldavxml.ScheduleDeliver()),
</span><span class="cx">         )
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+        if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">             privs += (davxml.Privilege(caldavxml.Schedule()),)
</span><span class="cx"> 
</span><span class="cx">         return davxml.ACL(
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavschedulingitippy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/scheduling/itip.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/scheduling/itip.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/scheduling/itip.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">         if method:
</span><span class="cx">             calendar.removeProperty(method)
</span><span class="cx">         
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;] and recipient and not autoprocessing:
</del><ins>+        if config.Scheduling.CalDAV.OldDraftCompatibility and recipient and not autoprocessing:
</ins><span class="cx">             iTipProcessing.fixForiCal3(calendar.subcomponents(), recipient)
</span><span class="cx"> 
</span><span class="cx">         return calendar
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">                     component = component.duplicate()
</span><span class="cx">                     iTipProcessing.transferItems(calendar, master_valarms, private_comments, component, remove_matched=True)
</span><span class="cx">                     calendar.addComponent(component)
</span><del>-                    if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;] and recipient and not autoprocessing:
</del><ins>+                    if config.Scheduling.CalDAV.OldDraftCompatibility and recipient and not autoprocessing:
</ins><span class="cx">                         iTipProcessing.fixForiCal3((component,), recipient)
</span><span class="cx"> 
</span><span class="cx">             # Write back the modified object
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">             partstat_changed = (oldpartstat != partstat)
</span><span class="cx">             
</span><span class="cx">             # Handle attendee comments
</span><del>-            if config.Scheduling[&quot;CalDAV&quot;].get(&quot;EnablePrivateComments&quot;, True):
</del><ins>+            if config.Scheduling.CalDAV.get(&quot;EnablePrivateComments&quot;, True):
</ins><span class="cx">                 # Look for X-CALENDARSERVER-PRIVATE-COMMENT property in iTIP component (State 1 in spec)
</span><span class="cx">                 attendee_comment = tuple(from_component.properties(&quot;X-CALENDARSERVER-PRIVATE-COMMENT&quot;))
</span><span class="cx">                 attendee_comment = attendee_comment[0] if len(attendee_comment) else None
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavschedulingschedulerpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -534,7 +534,7 @@
</span><span class="cx">             
</span><span class="cx">             # Anything else is not allowed. However, for compatIbility we will optionally 
</span><span class="cx">             # return a success response for all attendees.
</span><del>-            if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+            if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">                 self.fakeTheResult = True
</span><span class="cx">             else:
</span><span class="cx">                 raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, &quot;Invalid iTIP message for implicit scheduling&quot;))
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavstaticpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/static.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/static.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/static.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">         for compatibility with old clients using If-Match.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         
</span><del>-        if config.Scheduling[&quot;CalDAV&quot;][&quot;ScheduleTagCompatibility&quot;]:
</del><ins>+        if config.Scheduling.CalDAV.ScheduleTagCompatibility:
</ins><span class="cx">             
</span><span class="cx">             if self.exists() and self.hasDeadProperty(TwistedScheduleMatchETags):
</span><span class="cx">                 etags = self.readDeadProperty(TwistedScheduleMatchETags).children
</span><span class="lines">@@ -675,7 +675,7 @@
</span><span class="cx">         else:
</span><span class="cx">             DropBoxHomeFileClass = None
</span><span class="cx"> 
</span><del>-        if config.FreeBusyURL[&quot;Enabled&quot;]:
</del><ins>+        if config.FreeBusyURL.Enabled:
</ins><span class="cx">             FreeBusyURLFileClass = FreeBusyURLFile
</span><span class="cx">         else:
</span><span class="cx">             FreeBusyURLFileClass = None
</span><span class="lines">@@ -1079,7 +1079,7 @@
</span><span class="cx">                     davxml.Description(&quot;schedule privileges for current principal&quot;, **{&quot;xml:lang&quot;: &quot;en&quot;}),
</span><span class="cx">                 ),
</span><span class="cx">             )
</span><del>-            if config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;]:
</del><ins>+            if config.Scheduling.CalDAV.OldDraftCompatibility:
</ins><span class="cx">                 all_supported_privileges.append(
</span><span class="cx">                     davxml.SupportedPrivilege(
</span><span class="cx">                         davxml.Privilege(caldavxml.Schedule()),
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavtappy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/tap.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/tap.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/tap.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -389,12 +389,12 @@
</span><span class="cx">         #
</span><span class="cx">         directories = []
</span><span class="cx"> 
</span><del>-        directoryClass = namedClass(config.DirectoryService[&quot;type&quot;])
</del><ins>+        directoryClass = namedClass(config.DirectoryService.type)
</ins><span class="cx"> 
</span><span class="cx">         log.info(&quot;Configuring directory service of type: %s&quot;
</span><del>-                 % (config.DirectoryService[&quot;type&quot;],))
</del><ins>+                 % (config.DirectoryService.type,))
</ins><span class="cx"> 
</span><del>-        baseDirectory = directoryClass(**config.DirectoryService[&quot;params&quot;])
</del><ins>+        baseDirectory = directoryClass(**config.DirectoryService.params)
</ins><span class="cx"> 
</span><span class="cx">         directories.append(baseDirectory)
</span><span class="cx"> 
</span><span class="lines">@@ -416,7 +416,7 @@
</span><span class="cx">         #
</span><span class="cx">         # Add wiki directory service
</span><span class="cx">         #
</span><del>-        if config.Authentication[&quot;Wiki&quot;][&quot;Enabled&quot;]:
</del><ins>+        if config.Authentication.Wiki.Enabled:
</ins><span class="cx">             wikiDirectory = WikiDirectoryService()
</span><span class="cx">             wikiDirectory.realmName = baseDirectory.realmName
</span><span class="cx">             directories.append(wikiDirectory)
</span><span class="lines">@@ -430,23 +430,23 @@
</span><span class="cx">         #
</span><span class="cx">         # Configure Memcached Client Pool
</span><span class="cx">         #
</span><del>-        if config.Memcached[&quot;ClientEnabled&quot;]:
</del><ins>+        if config.Memcached.ClientEnabled:
</ins><span class="cx">             memcachepool.installPool(
</span><span class="cx">                 IPv4Address(
</span><span class="cx">                     &quot;TCP&quot;,
</span><del>-                    config.Memcached[&quot;BindAddress&quot;],
-                    config.Memcached[&quot;Port&quot;],
</del><ins>+                    config.Memcached.BindAddress,
+                    config.Memcached.Port,
</ins><span class="cx">                 ),
</span><del>-                config.Memcached[&quot;MaxClients&quot;],
</del><ins>+                config.Memcached.MaxClients,
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         #
</span><span class="cx">         # Configure NotificationClient
</span><span class="cx">         #
</span><del>-        if config.Notifications[&quot;Enabled&quot;]:
</del><ins>+        if config.Notifications.Enabled:
</ins><span class="cx">             installNotificationClient(
</span><del>-                config.Notifications[&quot;InternalNotificationHost&quot;],
-                config.Notifications[&quot;InternalNotificationPort&quot;],
</del><ins>+                config.Notifications.InternalNotificationHost,
+                config.Notifications.InternalNotificationPort,
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         #
</span><span class="lines">@@ -492,7 +492,7 @@
</span><span class="cx">             root.putChild(&quot;timezones&quot;, timezoneService)
</span><span class="cx"> 
</span><span class="cx">         # iSchedule service is optional
</span><del>-        if config.Scheduling[&quot;iSchedule&quot;][&quot;Enabled&quot;]:
</del><ins>+        if config.Scheduling.iSchedule.Enabled:
</ins><span class="cx">             log.info(&quot;Setting up iSchedule inbox resource: %r&quot;
</span><span class="cx">                      % (self.iScheduleResourceClass,))
</span><span class="cx">     
</span><span class="lines">@@ -599,12 +599,12 @@
</span><span class="cx"> 
</span><span class="cx">         if config.ProcessType == &quot;Slave&quot;:
</span><span class="cx">             if (
</span><del>-                config.MultiProcess[&quot;ProcessCount&quot;] &gt; 1 and
-                config.MultiProcess[&quot;LoadBalancer&quot;][&quot;Enabled&quot;]
</del><ins>+                config.MultiProcess.ProcessCount &gt; 1 and
+                config.MultiProcess.LoadBalancer.Enabled
</ins><span class="cx">             ):
</span><span class="cx">                 realRoot = pdmonster.PDClientAddressWrapper(
</span><span class="cx">                     logWrapper,
</span><del>-                    config.PythonDirector[&quot;ControlSocket&quot;],
</del><ins>+                    config.PythonDirector.ControlSocket,
</ins><span class="cx">                     directory,
</span><span class="cx">                 )
</span><span class="cx">             else:
</span><span class="lines">@@ -747,7 +747,7 @@
</span><span class="cx">                 #   the config object instead of doing things here.
</span><span class="cx">                 #log.info(&quot;Suggesting new max clients for memcache.&quot;)
</span><span class="cx">                 #memcachepool.getCachePool().suggestMaxClients(
</span><del>-                #    config.Memcached[&quot;MaxClients&quot;]
</del><ins>+                #    config.Memcached.MaxClients
</ins><span class="cx">                 #)
</span><span class="cx"> 
</span><span class="cx">             signal.signal(signal.SIGHUP, sighup_handler)
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavtesttest_configpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/test/test_config.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/test/test_config.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/test/test_config.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     def setUp(self):
</span><span class="cx">         config.update(defaultConfig)
</span><span class="cx">         self.testConfig = self.mktemp()
</span><del>-        open(self.testConfig, 'w').write(testConfig)
</del><ins>+        open(self.testConfig, &quot;w&quot;).write(testConfig)
</ins><span class="cx"> 
</span><span class="cx">     def tearDown(self):
</span><span class="cx">         config.setDefaults(defaultConfig)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> 
</span><span class="cx">         self.assertEquals(config.HTTPPort, 8008)
</span><span class="cx"> 
</span><del>-        config.update({'HTTPPort': 80})
</del><ins>+        config.update({&quot;HTTPPort&quot;: 80})
</ins><span class="cx"> 
</span><span class="cx">         self.assertEquals(config.HTTPPort, 80)
</span><span class="cx"> 
</span><span class="lines">@@ -113,60 +113,60 @@
</span><span class="cx">         self.assertEquals(config.HTTPPort, 8008)
</span><span class="cx"> 
</span><span class="cx">     def testSetAttr(self):
</span><del>-        self.assertNotIn('BindAddresses', config.__dict__)
</del><ins>+        self.assertNotIn(&quot;BindAddresses&quot;, config.__dict__)
</ins><span class="cx"> 
</span><del>-        config.BindAddresses = ['127.0.0.1']
</del><ins>+        config.BindAddresses = [&quot;127.0.0.1&quot;]
</ins><span class="cx"> 
</span><del>-        self.assertNotIn('BindAddresses', config.__dict__)
</del><ins>+        self.assertNotIn(&quot;BindAddresses&quot;, config.__dict__)
</ins><span class="cx"> 
</span><del>-        self.assertEquals(config.BindAddresses, ['127.0.0.1'])
</del><ins>+        self.assertEquals(config.BindAddresses, [&quot;127.0.0.1&quot;])
</ins><span class="cx"> 
</span><span class="cx">     def testUpdating(self):
</span><span class="cx">         self.assertEquals(config.SSLPort, 0)
</span><span class="cx"> 
</span><del>-        config.update({'SSLPort': 8443})
</del><ins>+        config.update({&quot;SSLPort&quot;: 8443})
</ins><span class="cx"> 
</span><span class="cx">         self.assertEquals(config.SSLPort, 8443)
</span><span class="cx"> 
</span><span class="cx">     def testMerge(self):
</span><del>-        self.assertEquals(config.MultiProcess[&quot;LoadBalancer&quot;][&quot;Enabled&quot;], True)
</del><ins>+        self.assertEquals(config.MultiProcess.LoadBalancer.Enabled, True)
</ins><span class="cx"> 
</span><del>-        config.update({'MultiProcess': {}})
</del><ins>+        config.update({&quot;MultiProcess&quot;: {}})
</ins><span class="cx"> 
</span><del>-        self.assertEquals(config.MultiProcess[&quot;LoadBalancer&quot;][&quot;Enabled&quot;], True)
</del><ins>+        self.assertEquals(config.MultiProcess.LoadBalancer.Enabled, True)
</ins><span class="cx"> 
</span><span class="cx">     def testDirectoryService_noChange(self):
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">         config.update({&quot;DirectoryService&quot;: {}})
</span><span class="cx"> 
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">     def testDirectoryService_sameType(self):
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">         config.update({&quot;DirectoryService&quot;: {&quot;type&quot;: &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;}})
</span><span class="cx"> 
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">     def testDirectoryService_newType(self):
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">         config.update({&quot;DirectoryService&quot;: {&quot;type&quot;: &quot;twistedcaldav.directory.appleopendirectory.OpenDirectoryService&quot;}})
</span><span class="cx"> 
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.appleopendirectory.OpenDirectoryService&quot;)
-        self.assertNotIn(&quot;xmlFile&quot;, config.DirectoryService[&quot;params&quot;])
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;node&quot;], &quot;/Search&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;restrictEnabledRecords&quot;], False)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.appleopendirectory.OpenDirectoryService&quot;)
+        self.assertNotIn(&quot;xmlFile&quot;, config.DirectoryService.params)
+        self.assertEquals(config.DirectoryService.params.node, &quot;/Search&quot;)
+        self.assertEquals(config.DirectoryService.params.restrictEnabledRecords, False)
</ins><span class="cx"> 
</span><span class="cx">     def testDirectoryService_newParam(self):
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">         config.update({&quot;DirectoryService&quot;: {&quot;type&quot;: &quot;twistedcaldav.directory.appleopendirectory.OpenDirectoryService&quot;}})
</span><span class="cx">         config.update({&quot;DirectoryService&quot;: {&quot;params&quot;: {
</span><span class="lines">@@ -174,25 +174,25 @@
</span><span class="cx">             &quot;restrictToGroup&quot;: &quot;12345&quot;,
</span><span class="cx">         }}})
</span><span class="cx"> 
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.appleopendirectory.OpenDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;node&quot;], &quot;/Search&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;restrictEnabledRecords&quot;], True)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;restrictToGroup&quot;], &quot;12345&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.appleopendirectory.OpenDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.node, &quot;/Search&quot;)
+        self.assertEquals(config.DirectoryService.params.restrictEnabledRecords, True)
+        self.assertEquals(config.DirectoryService.params.restrictToGroup, &quot;12345&quot;)
</ins><span class="cx"> 
</span><span class="cx">     def testDirectoryService_badParam(self):
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">         self.assertRaises(ConfigurationError, config.update, {&quot;DirectoryService&quot;: {&quot;params&quot;: {&quot;restrictEnabledRecords&quot;: False}}})
</span><span class="cx"> 
</span><span class="cx">     def testDirectoryService_unknownType(self):
</span><del>-        self.assertEquals(config.DirectoryService[&quot;type&quot;], &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
-        self.assertEquals(config.DirectoryService[&quot;params&quot;][&quot;xmlFile&quot;], &quot;/etc/caldavd/accounts.xml&quot;)
</del><ins>+        self.assertEquals(config.DirectoryService.type, &quot;twistedcaldav.directory.xmlfile.XMLDirectoryService&quot;)
+        self.assertEquals(config.DirectoryService.params.xmlFile, &quot;/etc/caldavd/accounts.xml&quot;)
</ins><span class="cx"> 
</span><span class="cx">         config.update({&quot;DirectoryService&quot;: {&quot;type&quot;: &quot;twistedcaldav.test.test_config.SuperDuperAwesomeService&quot;}})
</span><span class="cx"> 
</span><span class="cx">         #self.assertEquals(
</span><del>-        #    config.DirectoryService[&quot;params&quot;],
</del><ins>+        #    config.DirectoryService.params,
</ins><span class="cx">         #    SuperDuperAwesomeService.defaultParameters
</span><span class="cx">         #)
</span><span class="cx"> 
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx"> 
</span><span class="cx">         config.loadConfig(self.testConfig)
</span><span class="cx"> 
</span><del>-        config.updateDefaults({'SSLPort': 8009})
</del><ins>+        config.updateDefaults({&quot;SSLPort&quot;: 8009})
</ins><span class="cx"> 
</span><span class="cx">         self.assertEquals(config.SSLPort, 8009)
</span><span class="cx"> 
</span><span class="lines">@@ -211,15 +211,15 @@
</span><span class="cx"> 
</span><span class="cx">         self.assertEquals(config.SSLPort, 8009)
</span><span class="cx"> 
</span><del>-        config.updateDefaults({'SSLPort': 0})
</del><ins>+        config.updateDefaults({&quot;SSLPort&quot;: 0})
</ins><span class="cx"> 
</span><span class="cx">     def testMergeDefaults(self):
</span><del>-        config.updateDefaults({'MultiProcess': {}})
</del><ins>+        config.updateDefaults({&quot;MultiProcess&quot;: {}})
</ins><span class="cx"> 
</span><span class="cx">         self.assertEquals(config._defaults[&quot;MultiProcess&quot;][&quot;LoadBalancer&quot;][&quot;Enabled&quot;], True)
</span><span class="cx"> 
</span><span class="cx">     def testSetDefaults(self):
</span><del>-        config.updateDefaults({'SSLPort': 8443})
</del><ins>+        config.updateDefaults({&quot;SSLPort&quot;: 8443})
</ins><span class="cx"> 
</span><span class="cx">         config.setDefaults(defaultConfig)
</span><span class="cx"> 
</span><span class="lines">@@ -228,9 +228,9 @@
</span><span class="cx">         self.assertEquals(config.SSLPort, 0)
</span><span class="cx"> 
</span><span class="cx">     def testCopiesDefaults(self):
</span><del>-        config.updateDefaults({'Foo': 'bar'})
</del><ins>+        config.updateDefaults({&quot;Foo&quot;: &quot;bar&quot;})
</ins><span class="cx"> 
</span><del>-        self.assertNotIn('Foo', defaultConfig)
</del><ins>+        self.assertNotIn(&quot;Foo&quot;, defaultConfig)
</ins><span class="cx"> 
</span><span class="cx">     def testComplianceClasses(self):
</span><span class="cx">         resource = CalDAVFile(&quot;/&quot;)
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavtesttest_optionspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/test/test_options.py (3368 => 3369)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/test/test_options.py        2008-11-11 21:37:38 UTC (rev 3368)
+++ CalendarServer/trunk/twistedcaldav/test/test_options.py        2008-11-11 21:38:42 UTC (rev 3369)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">             self.assertIn(&quot;calendar-auto-schedule&quot;, dav, &quot;no DAV calendar-auto-schedule header&quot;)
</span><span class="cx">             self.assertIn(&quot;calendar-availability&quot;, dav, &quot;no DAV calendar-availability header&quot;)
</span><span class="cx"> 
</span><del>-        config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;] = True
</del><ins>+        config.Scheduling.CalDAV.OldDraftCompatibility = True
</ins><span class="cx">         request = SimpleRequest(self.site, &quot;OPTIONS&quot;, &quot;/&quot;)
</span><span class="cx"> 
</span><span class="cx">         return self.send(request, do_test)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">             self.assertIn(&quot;calendar-auto-schedule&quot;, dav, &quot;no DAV calendar-auto-schedule header&quot;)
</span><span class="cx">             self.assertIn(&quot;calendar-availability&quot;, dav, &quot;no DAV calendar-availability header&quot;)
</span><span class="cx"> 
</span><del>-        config.Scheduling[&quot;CalDAV&quot;][&quot;OldDraftCompatibility&quot;] = False
</del><ins>+        config.Scheduling.CalDAV.OldDraftCompatibility = False
</ins><span class="cx">         request = SimpleRequest(self.site, &quot;OPTIONS&quot;, &quot;/&quot;)
</span><span class="cx"> 
</span><span class="cx">         return self.send(request, do_test)
</span></span></pre>
</div>
</div>

</body>
</html>