<!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>[14787] 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.calendarserver.org//changeset/14787">14787</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2015-05-14 11:22:38 -0700 (Thu, 14 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add config option to support a migration-only mode of operation where HTTP requests (other than pod conduit) get a 503 response and no job processing takes place. This mode is used in the final sync pod2pod migration step.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarservertapcaldavpy">CalendarServer/trunk/calendarserver/tap/caldav.py</a></li>
<li><a href="#CalendarServertrunkcalendarservertaputilpy">CalendarServer/trunk/calendarserver/tap/util.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavsimpleresourcepy">CalendarServer/trunk/twistedcaldav/simpleresource.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavstdconfigpy">CalendarServer/trunk/twistedcaldav/stdconfig.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingmigrationhome_syncpy">CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingmigrationsync_metadatapy">CalendarServer/trunk/txdav/common/datastore/podding/migration/sync_metadata.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingmigrationtesttest_migrationpy">CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_migration.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingmigrationworkpy">CalendarServer/trunk/txdav/common/datastore/podding/migration/work.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarservertapcaldavpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tap/caldav.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tap/caldav.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -1303,7 +1303,8 @@
</span><span class="cx"> 
</span><span class="cx">             pool = PeerConnectionPool(
</span><span class="cx">                 reactor, store.newTransaction, ampPort,
</span><del>-                useWorkerPool=False
</del><ins>+                useWorkerPool=False,
+                disableWorkProcessing=config.MigrationOnly,
</ins><span class="cx">             )
</span><span class="cx">             self._initJobQueue(pool)
</span><span class="cx">             store.queuer = store.queuer.transferProposalCallbacks(pool)
</span><span class="lines">@@ -1873,7 +1874,8 @@
</span><span class="cx">                 ampPort = None
</span><span class="cx"> 
</span><span class="cx">             pool = PeerConnectionPool(
</span><del>-                reactor, store.newTransaction, ampPort
</del><ins>+                reactor, store.newTransaction, ampPort,
+                disableWorkProcessing=config.MigrationOnly,
</ins><span class="cx">             )
</span><span class="cx">             self._initJobQueue(pool)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunkcalendarservertaputilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tap/util.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tap/util.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/calendarserver/tap/util.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -72,7 +72,8 @@
</span><span class="cx"> from twistedcaldav.directory.principal import DirectoryPrincipalProvisioningResource
</span><span class="cx"> from twistedcaldav.directorybackedaddressbook import DirectoryBackedAddressBookResource
</span><span class="cx"> from twistedcaldav.resource import AuthenticationWrapper
</span><del>-from twistedcaldav.simpleresource import SimpleResource, SimpleRedirectResource
</del><ins>+from twistedcaldav.simpleresource import SimpleResource, SimpleRedirectResource, \
+    SimpleUnavailableResource
</ins><span class="cx"> from twistedcaldav.stdconfig import config
</span><span class="cx"> from twistedcaldav.timezones import TimezoneCache
</span><span class="cx"> from twistedcaldav.timezoneservice import TimezoneServiceResource
</span><span class="lines">@@ -541,6 +542,11 @@
</span><span class="cx">                 if e.errno != errno.ENOENT:
</span><span class="cx">                     log.error(&quot;Could not delete: {path} : {error}&quot;, path=directoryPath, error=e)
</span><span class="cx"> 
</span><ins>+    if config.MigrationOnly:
+        unavailable = SimpleUnavailableResource((principalCollection,))
+    else:
+        unavailable = None
+
</ins><span class="cx">     log.info(&quot;Setting up root resource: {cls}&quot;, cls=rootResourceClass)
</span><span class="cx"> 
</span><span class="cx">     root = rootResourceClass(
</span><span class="lines">@@ -548,13 +554,13 @@
</span><span class="cx">         principalCollections=(principalCollection,),
</span><span class="cx">     )
</span><span class="cx"> 
</span><del>-    root.putChild(&quot;principals&quot;, principalCollection)
</del><ins>+    root.putChild(&quot;principals&quot;, principalCollection if unavailable is None else unavailable)
</ins><span class="cx">     if config.EnableCalDAV:
</span><del>-        root.putChild(&quot;calendars&quot;, calendarCollection)
</del><ins>+        root.putChild(&quot;calendars&quot;, calendarCollection if unavailable is None else unavailable)
</ins><span class="cx">     if config.EnableCardDAV:
</span><del>-        root.putChild('addressbooks', addressBookCollection)
</del><ins>+        root.putChild('addressbooks', addressBookCollection if unavailable is None else unavailable)
</ins><span class="cx">         if config.DirectoryAddressBook.Enabled and config.EnableSearchAddressBook:
</span><del>-            root.putChild(config.DirectoryAddressBook.name, directoryBackedAddressBookCollection)
</del><ins>+            root.putChild(config.DirectoryAddressBook.name, directoryBackedAddressBookCollection if unavailable is None else unavailable)
</ins><span class="cx"> 
</span><span class="cx">     # /.well-known
</span><span class="cx">     if config.EnableWellKnown:
</span><span class="lines">@@ -652,7 +658,7 @@
</span><span class="cx">             newStore,
</span><span class="cx">             podding=True
</span><span class="cx">         )
</span><del>-        root.putChild(config.Servers.InboxName, ischedule)
</del><ins>+        root.putChild(config.Servers.InboxName, ischedule if unavailable is None else unavailable)
</ins><span class="cx"> 
</span><span class="cx">         log.info(&quot;Setting up podding conduit resource: {cls}&quot;, cls=conduitResourceClass)
</span><span class="cx"> 
</span><span class="lines">@@ -672,7 +678,7 @@
</span><span class="cx">             root,
</span><span class="cx">             newStore,
</span><span class="cx">         )
</span><del>-        root.putChild(&quot;ischedule&quot;, ischedule)
</del><ins>+        root.putChild(&quot;ischedule&quot;, ischedule if unavailable is None else unavailable)
</ins><span class="cx"> 
</span><span class="cx">         # Do DomainKey resources
</span><span class="cx">         DKIMUtils.validConfiguration(config)
</span><span class="lines">@@ -697,7 +703,7 @@
</span><span class="cx">             config.WebCalendarRoot,
</span><span class="cx">             principalCollections=(principalCollection,),
</span><span class="cx">         )
</span><del>-        root.putChild(&quot;webcal&quot;, webCalendar)
</del><ins>+        root.putChild(&quot;webcal&quot;, webCalendar if unavailable is None else unavailable)
</ins><span class="cx"> 
</span><span class="cx">     #
</span><span class="cx">     # WebAdmin
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavsimpleresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/simpleresource.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/simpleresource.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/twistedcaldav/simpleresource.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -26,9 +26,10 @@
</span><span class="cx">     &quot;SimpleDataResource&quot;,
</span><span class="cx"> ]
</span><span class="cx"> 
</span><del>-from txweb2 import http
</del><ins>+from txweb2 import http, server
+from txweb2 import responsecode
</ins><span class="cx"> from txweb2.dav.noneprops import NonePropertyStore
</span><del>-from txweb2.http import Response
</del><ins>+from txweb2.http import Response, HTTPError
</ins><span class="cx"> 
</span><span class="cx"> from twisted.internet.defer import succeed
</span><span class="cx"> 
</span><span class="lines">@@ -36,6 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> from txdav.xml import element as davxml
</span><span class="cx"> 
</span><ins>+import time
+
</ins><span class="cx"> class SimpleResource (
</span><span class="cx">     CalDAVResource,
</span><span class="cx"> ):
</span><span class="lines">@@ -108,6 +111,38 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+class SimpleUnavailableResource(SimpleResource):
+    &quot;&quot;&quot;
+    A L{SimpleResource} which always generates a 503 Service Unavailable response with an optional Retry-After value.
+    &quot;&quot;&quot;
+
+    def __init__(self, principalCollections, retryafter=300, defaultACL=SimpleResource.authReadACL, **kwargs):
+        &quot;&quot;&quot;
+        Parameters are URL components and are the same as those for
+        L{urlparse.urlunparse}.  URL components which are not specified will
+        default to the corresponding component of the URL of the request being
+        redirected.
+
+        @param retryafter: time in seconds to use in Retry-After header, or -1 for no header
+        @type retryafter: L{int}
+        &quot;&quot;&quot;
+        SimpleResource.__init__(self, principalCollections=principalCollections, isdir=False, defaultACL=defaultACL)
+        self.retryAfter = retryafter
+        self._kwargs = kwargs
+
+
+    def locateChild(self, request, segments):
+        return self, server.StopTraversal
+
+
+    def renderHTTP(self, request):
+        response = http.StatusResponse(responsecode.SERVICE_UNAVAILABLE, responsecode.RESPONSES[responsecode.SERVICE_UNAVAILABLE])
+        if self.retryAfter &gt; 0:
+            response.headers.setHeader(&quot;Retry-After&quot;, time.time() + self.retryAfter)
+        raise HTTPError(response)
+
+
+
</ins><span class="cx"> class SimpleDataResource(SimpleResource):
</span><span class="cx">     &quot;&quot;&quot;
</span><span class="cx">     A L{SimpleResource} which returns fixed content.
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavstdconfigpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/stdconfig.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -262,6 +262,7 @@
</span><span class="cx">     #
</span><span class="cx">     &quot;EnableCalDAV&quot;: True, # Enable CalDAV service
</span><span class="cx">     &quot;EnableCardDAV&quot;: True, # Enable CardDAV service
</span><ins>+    &quot;MigrationOnly&quot;: False, # When True override all other services and set the server into podding-only mode
</ins><span class="cx"> 
</span><span class="cx">     #
</span><span class="cx">     # Data store
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingmigrationhome_syncpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/txdav/common/datastore/podding/migration/home_sync.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -24,9 +24,8 @@
</span><span class="cx"> from txdav.caldav.datastore.sql import ManagedAttachment, CalendarBindRecord
</span><span class="cx"> from txdav.caldav.icalendarstore import ComponentUpdateState
</span><span class="cx"> from txdav.common.datastore.podding.migration.sync_metadata import CalendarMigrationRecord, \
</span><del>-    CalendarObjectMigrationRecord, AttachmentMigrationRecord, \
-    MigrationCleanupWork
-from txdav.common.datastore.podding.migration.work import HomeCleanupWork
</del><ins>+    CalendarObjectMigrationRecord, AttachmentMigrationRecord
+from txdav.common.datastore.podding.migration.work import HomeCleanupWork, MigrationCleanupWork
</ins><span class="cx"> from txdav.common.datastore.sql_external import NotificationCollectionExternal
</span><span class="cx"> from txdav.common.datastore.sql_notification import NotificationCollection
</span><span class="cx"> from txdav.common.datastore.sql_tables import _HOME_STATUS_MIGRATING, _HOME_STATUS_DISABLED, \
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingmigrationsync_metadatapy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/migration/sync_metadata.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/migration/sync_metadata.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/txdav/common/datastore/podding/migration/sync_metadata.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -16,7 +16,6 @@
</span><span class="cx"> 
</span><span class="cx"> from twext.enterprise.dal.record import Record, fromTable
</span><span class="cx"> from twext.enterprise.dal.syntax import Parameter, Delete
</span><del>-from twext.enterprise.jobqueue import WorkItem
</del><span class="cx"> from twisted.internet.defer import inlineCallbacks
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><span class="cx"> 
</span><span class="lines">@@ -57,30 +56,3 @@
</span><span class="cx">     L{Record} for L{schema.ATTACHMENT_MIGRATION}.
</span><span class="cx">     &quot;&quot;&quot;
</span><span class="cx">     pass
</span><del>-
-
-
-class MigrationCleanupWork(WorkItem, fromTable(schema.MIGRATION_CLEANUP_WORK)):
-
-    group = &quot;homeResourceID&quot;
-
-    notBeforeDelay = 300    # 5 minutes
-
-    @inlineCallbacks
-    def doWork(self):
-        &quot;&quot;&quot;
-        Delete all the corresponding migration records.
-        &quot;&quot;&quot;
-
-        yield CalendarMigrationRecord.deletesome(
-            self.transaction,
-            CalendarMigrationRecord.calendarHomeResourceID == self.homeResourceID,
-        )
-        yield CalendarObjectMigrationRecord.deletesome(
-            self.transaction,
-            CalendarObjectMigrationRecord.calendarHomeResourceID == self.homeResourceID,
-        )
-        yield AttachmentMigrationRecord.deletesome(
-            self.transaction,
-            AttachmentMigrationRecord.calendarHomeResourceID == self.homeResourceID,
-        )
</del></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingmigrationtesttest_migrationpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_migration.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_migration.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/txdav/common/datastore/podding/migration/test/test_migration.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -31,9 +31,8 @@
</span><span class="cx"> from txdav.caldav.datastore.test.common import CaptureProtocol
</span><span class="cx"> from txdav.common.datastore.podding.migration.home_sync import CrossPodHomeSync
</span><span class="cx"> from txdav.common.datastore.podding.migration.sync_metadata import CalendarMigrationRecord, \
</span><del>-    AttachmentMigrationRecord, CalendarObjectMigrationRecord, \
-    MigrationCleanupWork
-from txdav.common.datastore.podding.migration.work import HomeCleanupWork, MigratedHomeCleanupWork
</del><ins>+    AttachmentMigrationRecord, CalendarObjectMigrationRecord
+from txdav.common.datastore.podding.migration.work import HomeCleanupWork, MigratedHomeCleanupWork, MigrationCleanupWork
</ins><span class="cx"> from txdav.common.datastore.podding.test.util import MultiStoreConduitTest
</span><span class="cx"> from txdav.common.datastore.sql_directory import DelegateRecord,\
</span><span class="cx">     DelegateGroupsRecord, ExternalDelegateGroupsRecord
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingmigrationworkpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/migration/work.py (14786 => 14787)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/migration/work.py        2015-05-14 18:17:39 UTC (rev 14786)
+++ CalendarServer/trunk/txdav/common/datastore/podding/migration/work.py        2015-05-14 18:22:38 UTC (rev 14787)
</span><span class="lines">@@ -21,6 +21,8 @@
</span><span class="cx"> 
</span><span class="cx"> from txdav.caldav.datastore.scheduling.imip.token import iMIPTokenRecord
</span><span class="cx"> from txdav.caldav.datastore.scheduling.work import allScheduleWork
</span><ins>+from txdav.common.datastore.podding.migration.sync_metadata import CalendarMigrationRecord, \
+    CalendarObjectMigrationRecord, AttachmentMigrationRecord
</ins><span class="cx"> from txdav.common.datastore.sql_directory import DelegateRecord, \
</span><span class="cx">     DelegateGroupsRecord, ExternalDelegateGroupsRecord
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema, _HOME_STATUS_DISABLED
</span><span class="lines">@@ -99,3 +101,30 @@
</span><span class="cx">         yield DelegateRecord.deletesome(self.transaction, DelegateRecord.delegator == self.ownerUID)
</span><span class="cx">         yield DelegateGroupsRecord.deletesome(self.transaction, DelegateGroupsRecord.delegator == self.ownerUID)
</span><span class="cx">         yield ExternalDelegateGroupsRecord.deletesome(self.transaction, ExternalDelegateGroupsRecord.delegator == self.ownerUID)
</span><ins>+
+
+
+class MigrationCleanupWork(WorkItem, fromTable(schema.MIGRATION_CLEANUP_WORK)):
+
+    group = &quot;homeResourceID&quot;
+
+    notBeforeDelay = 300    # 5 minutes
+
+    @inlineCallbacks
+    def doWork(self):
+        &quot;&quot;&quot;
+        Delete all the corresponding migration records.
+        &quot;&quot;&quot;
+
+        yield CalendarMigrationRecord.deletesome(
+            self.transaction,
+            CalendarMigrationRecord.calendarHomeResourceID == self.homeResourceID,
+        )
+        yield CalendarObjectMigrationRecord.deletesome(
+            self.transaction,
+            CalendarObjectMigrationRecord.calendarHomeResourceID == self.homeResourceID,
+        )
+        yield AttachmentMigrationRecord.deletesome(
+            self.transaction,
+            AttachmentMigrationRecord.calendarHomeResourceID == self.homeResourceID,
+        )
</ins></span></pre>
</div>
</div>

</body>
</html>