[CalendarServer-changes] [861]
CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/test/
data/makelargefbset.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 19 16:40:41 PST 2006
Revision: 861
http://trac.macosforge.org/projects/calendarserver/changeset/861
Author: cdaboo at apple.com
Date: 2006-12-19 16:40:41 -0800 (Tue, 19 Dec 2006)
Log Message:
-----------
Script to setup calendar-free-busy-set property on a bunch of test accounts.
Added Paths:
-----------
CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/test/data/makelargefbset.py
Added: CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/test/data/makelargefbset.py
===================================================================
--- CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/test/data/makelargefbset.py (rev 0)
+++ CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/test/data/makelargefbset.py 2006-12-20 00:40:41 UTC (rev 861)
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+##
+# Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# DRI: Cyrus Daboo, cdaboo at apple.com
+##
+
+import os
+import xattr
+
+user_max = 99
+calendars = ("calendar.1000",)
+
+for ctr in xrange(1, user_max + 1):
+ path = "calendars/user/user%02d" % (ctr,)
+
+ try: os.makedirs(path)
+ except OSError: pass
+
+ try: os.makedirs(os.path.join(path, "calendar"))
+ except OSError: pass
+
+ for calendar in calendars:
+ inboxname = os.path.join(path, "inbox")
+ attrs = xattr.xattr(inboxname)
+ attrs["WebDAV:{urn:ietf:params:xml:ns:caldav}calendar-free-busy-set"] = """<?xml version='1.0' encoding='UTF-8'?>
+<calendar-free-busy-set xmlns='urn:ietf:params:xml:ns:caldav'>
+ <href xmlns='DAV:'>/calendars/user/user%02d/calendar/</href>
+ <href xmlns='DAV:'>/calendars/user/user%02d/calendar.1000/</href>
+</calendar-free-busy-set>""" % (ctr, ctr,)
Property changes on: CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/test/data/makelargefbset.py
___________________________________________________________________
Name: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061219/af742a52/attachment.html
More information about the calendarserver-changes
mailing list