[CalendarServer-changes] [7490] CalendarServer/trunk/contrib/migration
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 17 10:37:08 PDT 2011
Revision: 7490
http://trac.macosforge.org/projects/calendarserver/changeset/7490
Author: sagen at apple.com
Date: 2011-05-17 10:37:07 -0700 (Tue, 17 May 2011)
Log Message:
-----------
Carry over all DirectoryService params except for the deprecated requireComputerRecord key. 9449685
Modified Paths:
--------------
CalendarServer/trunk/contrib/migration/calendarmigrator.py
CalendarServer/trunk/contrib/migration/test/test_migrator.py
Modified: CalendarServer/trunk/contrib/migration/calendarmigrator.py
===================================================================
--- CalendarServer/trunk/contrib/migration/calendarmigrator.py 2011-05-16 21:29:20 UTC (rev 7489)
+++ CalendarServer/trunk/contrib/migration/calendarmigrator.py 2011-05-17 17:37:07 UTC (rev 7490)
@@ -453,7 +453,7 @@
if "DirectoryService" in caldav:
combined["DirectoryService"] = caldav["DirectoryService"]
for key in combined["DirectoryService"]["params"].keys():
- if key not in ("node", "cacheTimeout", "xmlFile"):
+ if key in ("requireComputerRecord",):
del combined["DirectoryService"]["params"][key]
# Merge ports
Modified: CalendarServer/trunk/contrib/migration/test/test_migrator.py
===================================================================
--- CalendarServer/trunk/contrib/migration/test/test_migrator.py 2011-05-16 21:29:20 UTC (rev 7489)
+++ CalendarServer/trunk/contrib/migration/test/test_migrator.py 2011-05-17 17:37:07 UTC (rev 7490)
@@ -293,6 +293,51 @@
self.assertEquals(newCombined, expected)
+ def test_mergeDirectoryService(self):
+
+ # Ensure caldavd DirectoryService config is carried over, except
+ # for requireComputerRecord which was is obsolete.
+
+ oldCalDAV = {
+ "DirectoryService": {
+ "type" : "twistedcaldav.directory.appleopendirectory.OpenDirectoryService",
+ "params" : {
+ "node" : "/Search",
+ "cacheTimeout" : 15,
+ "restrictToGroup" : "test-group",
+ "restrictEnabledRecords" : True,
+ "negativeCaching" : False,
+ "requireComputerRecord" : True,
+ },
+ },
+ }
+ oldCardDAV = { "Is this ignored?" : True }
+ expected = {
+ "DirectoryService": {
+ "type" : "twistedcaldav.directory.appleopendirectory.OpenDirectoryService",
+ "params" : {
+ "node" : "/Search",
+ "cacheTimeout" : 15,
+ "restrictToGroup" : "test-group",
+ "restrictEnabledRecords" : True,
+ "negativeCaching" : False,
+ },
+ },
+ "BindHTTPPorts": [8008, 8800],
+ "BindSSLPorts": [8443, 8843],
+ "EnableSSL" : False,
+ "HTTPPort": 8008,
+ "RedirectHTTPToHTTPS": False,
+ "SSLAuthorityChain": "",
+ "SSLCertificate": "",
+ "SSLPort": 8443,
+ "SSLPrivateKey": "",
+ }
+ newCombined = { }
+ mergePlist(oldCalDAV, oldCardDAV, newCombined)
+ self.assertEquals(newCombined, expected)
+
+
def test_examinePreviousSystem(self):
"""
Set up a virtual system in various configurations, then ensure the
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110517/078c6a04/attachment.html>
More information about the calendarserver-changes
mailing list