[CalendarServer-changes] [3553] CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 19 07:52:15 PST 2008


Revision: 3553
          http://trac.macosforge.org/projects/calendarserver/changeset/3553
Author:   cdaboo at apple.com
Date:     2008-12-19 07:52:15 -0800 (Fri, 19 Dec 2008)
Log Message:
-----------
Simplify the repeat substitution behavior.

Modified Paths:
--------------
    CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo-template.xml
    CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.dtd
    CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.xml
    CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/sslserverinfo.xml
    CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/serverinfo.py
    CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/xmlDefs.py

Modified: CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo-template.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo-template.xml	2008-12-19 15:20:24 UTC (rev 3552)
+++ CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo-template.xml	2008-12-19 15:52:15 UTC (rev 3553)
@@ -191,83 +191,113 @@
 			<value>superuser</value>
 		</substitution>
 
-		<!-- user id -->
-		<substitution repeat="10">
-			<key>$userid%%d:</key>
-			<value>user%%02d</value>
-		</substitution>
-		<!-- user guid -->
-		<substitution repeat="10">
-			<key>$userguid%%d:</key>
-			<value>user%%02d</value>
-		</substitution>
-		<!-- password -->
-		<substitution repeat="10">
-			<key>$pswd%%d:</key>
-			<value>user%%02d</value>
-		</substitution>
-		<!-- relative path to first user principal resource-->
-		<substitution repeat="10">
-			<key>$principal%%d:</key>
-			<value>$principals_users:$userid%%d:/</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$principaluri%%d:</key>
-			<value>$principals_uids:$userguid%%d:/</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$principal%%dnoslash:</key>
-			<value>$principals_users:$userid%%d:</value>
-		</substitution>
-		<!-- relative path to first user calendar home-->
-		<substitution repeat="10">
-			<key>$pathprefix%%d:</key>
-			<value>$calendars_uids:$userguid%%d:</value>
-		</substitution>
-		<!-- relative path to first user calendar-->
-		<substitution repeat="10">
-			<key>$calendarpath%%d:</key>
-			<value>$calendars_uids:$userguid%%d:/$calendar:</value>
-		</substitution>
-		<!-- relative path to first user calendar home-->
-		<substitution repeat="10">
-			<key>$calendarpathalt%%d:</key>
-			<value>$calendars_uids:$userid%%d:/$calendar:</value>
-		</substitution>
-		<!-- calendar user address of first user-->
-		<substitution repeat="10">
-			<key>$cuaddr%%d:</key>
-			<value>mailto:$userid%%d:@example.com</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddralt%%d:</key>
-			<value>$principaluri%%d:</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddraltnoslash%%d:</key>
-			<value>$principals_uids:$userguid%%d:</value>
-		</substitution>
-		
+		<!--  Ten user accounts -->
+		<repeat count="10">
+			<!-- user id -->
+			<substitution>
+				<key>$userid%%d:</key>
+				<value>user%%02d</value>
+			</substitution>
+			<!-- user guid -->
+			<substitution>
+				<key>$userguid%%d:</key>
+				<value>user%%02d</value>
+			</substitution>
+			<!-- user name -->
+			<substitution>
+				<key>$username%%d:</key>
+				<value>User %%02d</value>
+			</substitution>
+			<!-- password -->
+			<substitution>
+				<key>$pswd%%d:</key>
+				<value>user%%02d</value>
+			</substitution>
+			<!-- relative path to user principal resource-->
+			<substitution>
+				<key>$principal%%d:</key>
+				<value>$principals_users:$userid%%d:/</value>
+			</substitution>
+			<substitution>
+				<key>$principaluri%%d:</key>
+				<value>$principals_uids:$userguid%%d:/</value>
+			</substitution>
+			<substitution>
+				<key>$principal%%dnoslash:</key>
+				<value>$principals_users:$userid%%d:</value>
+			</substitution>
+			<!-- relative path to user calendar home-->
+			<substitution>
+				<key>$pathprefix%%d:</key>
+				<value>$calendars_uids:$userguid%%d:</value>
+			</substitution>
+			<!-- relative path to user calendar-->
+			<substitution>
+				<key>$calendarpath%%d:</key>
+				<value>$calendars_uids:$userguid%%d:/$calendar:</value>
+			</substitution>
+			<!-- relative path to user inbox-->
+			<substitution>
+				<key>$inboxpath%%d:</key>
+				<value>$calendars_uids:$userguid%%d:/$inbox:</value>
+			</substitution>
+			<!-- relative path to user outbox-->
+			<substitution>
+				<key>$outboxpath%%d:</key>
+				<value>$calendars_uids:$userguid%%d:/$outbox:</value>
+			</substitution>
+			<!-- relative path to user dropbox-->
+			<substitution>
+				<key>$dropboxpath%%d:</key>
+				<value>$calendars_uids:$userguid%%d:/$dropbox:</value>
+			</substitution>
+			<!-- relative path to user freebusy-->
+			<substitution>
+				<key>$freebusypath%%d:</key>
+				<value>$calendars_uids:$userguid%%d:/$freebusy:</value>
+			</substitution>
+			<!-- relative path to user alternate calendar home-->
+			<substitution>
+				<key>$calendarpathalt%%d:</key>
+				<value>$calendars_users:$userid%%d:/$calendar:</value>
+			</substitution>
+			<substitution>
+				<key>$email%%d:</key>
+				<value>$userid%%d:@example.com</value>
+			</substitution>
+			<!-- calendar user address of user-->
+			<substitution>
+				<key>$cuaddr%%d:</key>
+				<value>mailto:$email%%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddralt%%d:</key>
+				<value>$principaluri%%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddraltnoslash%%d:</key>
+				<value>$principals_uids:$userguid%%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddrurn%%d:</key>
+				<value>urn:uuid:$userguid%%d:</value>
+			</substitution>
+		</repeat>
+
 		<!--  Override some of the above definitions for special cases -->
 
 		<!-- calendar user address of second user-->
 		<substitution>
 			<key>$cuaddr2:</key>
-			<value>MAILTO:user02 at example.com</value>
+			<value>MAILTO:$email2:</value>
 		</substitution>
 
-		<substitution>
-			<key>$userguid1:</key>
-			<value>%(userguid1)s</value>
-		</substitution>
-		<substitution>
-			<key>$userguid12:</key>
-			<value>%(userguid2)s</value>
-		</substitution>
-		<substitution>
-			<key>$userguid3:</key>
-			<value>%(userguid3)s</value>
-		</substitution>
+		<repeat count="3">
+			<substitution>
+				<key>$userguid%%d:</key>
+				<value>%(userguid%%d)s</value>
+			</substitution>
+		</repeat>
 
 		<!-- resource id-->
 		<substitution>
@@ -279,6 +309,11 @@
 			<key>$resourceguid1:</key>
 			<value>%(resourceguid1)s</value>
 		</substitution>
+		<!-- resource name-->
+		<substitution>
+			<key>$resourcename1:</key>
+			<value>Resource 01</value>
+		</substitution>
 		<!-- relative path to first resource calendar home-->
 		<substitution>
 			<key>$rpathprefix1:</key>
@@ -289,6 +324,16 @@
 			<key>$rcalendarpath1:</key>
 			<value>$calendars_uids:$resourceguid1:/$calendar:</value>
 		</substitution>
+		<!-- relative path to first resource inbox-->
+		<substitution>
+			<key>$rinboxpath1:</key>
+			<value>$calendars_uids:$resourceguid1:/$inbox:</value>
+		</substitution>
+		<!-- relative path to first resource outbox-->
+		<substitution>
+			<key>$routboxpath1:</key>
+			<value>$calendars_uids:$resourceguid1:/$outbox:</value>
+		</substitution>
 		<!-- relative path to first resource principal resource-->
 		<substitution>
 			<key>$rprincipal1:</key>
@@ -302,6 +347,10 @@
 			<key>$rcuaddralt1:</key>
 			<value>$rprincipaluri1:</value>
 		</substitution>
+		<substitution>
+			<key>$rcuaddrurn1:</key>
+			<value>urn:uuid:$resourceguid1:</value>
+		</substitution>
 
 		<!-- relative path to disabled group principal resource-->
 		<substitution>

Modified: CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.dtd
===================================================================
--- CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.dtd	2008-12-19 15:20:24 UTC (rev 3552)
+++ CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.dtd	2008-12-19 15:52:15 UTC (rev 3553)
@@ -20,9 +20,10 @@
 	<!ELEMENT port			(#PCDATA)>
 	<!ELEMENT authtype		(#PCDATA)>
 	<!ELEMENT ssl			EMPTY>
-	<!ELEMENT substitutions	(substitution*)>
+	<!ELEMENT substitutions	(substitution|repeat)*>
+		<!ELEMENT repeat	(substitution+)>
+    		<!ATTLIST repeat count CDATA "1">
 		<!ELEMENT substitution	(key, value)>
-    		<!ATTLIST substitution repeat CDATA "1">
 			<!ELEMENT key			(#PCDATA)>
 			<!ELEMENT value			(#PCDATA)>
 	

Modified: CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.xml	2008-12-19 15:20:24 UTC (rev 3552)
+++ CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/serverinfo.xml	2008-12-19 15:52:15 UTC (rev 3553)
@@ -191,102 +191,105 @@
 			<value>superuser</value>
 		</substitution>
 
-		<!-- user id -->
-		<substitution repeat="10">
-			<key>$userid%d:</key>
-			<value>user%02d</value>
-		</substitution>
-		<!-- user guid -->
-		<substitution repeat="10">
-			<key>$userguid%d:</key>
-			<value>user%02d</value>
-		</substitution>
-		<!-- user guid -->
-		<substitution repeat="10">
-			<key>$username%d:</key>
-			<value>User %02d</value>
-		</substitution>
-		<!-- password -->
-		<substitution repeat="10">
-			<key>$pswd%d:</key>
-			<value>user%02d</value>
-		</substitution>
-		<!-- relative path to user principal resource-->
-		<substitution repeat="10">
-			<key>$principal%d:</key>
-			<value>$principals_users:$userid%d:/</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$principaluri%d:</key>
-			<value>$principals_uids:$userguid%d:/</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$principal%dnoslash:</key>
-			<value>$principals_users:$userid%d:</value>
-		</substitution>
-		<!-- relative path to user calendar home-->
-		<substitution repeat="10">
-			<key>$pathprefix%d:</key>
-			<value>$calendars_uids:$userguid%d:</value>
-		</substitution>
-		<!-- relative path to user calendar-->
-		<substitution repeat="10">
-			<key>$calendarpath%d:</key>
-			<value>$calendars_uids:$userguid%d:/$calendar:</value>
-		</substitution>
-		<!-- relative path to user inbox-->
-		<substitution repeat="10">
-			<key>$inboxpath%d:</key>
-			<value>$calendars_uids:$userguid%d:/$inbox:</value>
-		</substitution>
-		<!-- relative path to user outbox-->
-		<substitution repeat="10">
-			<key>$outboxpath%d:</key>
-			<value>$calendars_uids:$userguid%d:/$outbox:</value>
-		</substitution>
-		<!-- relative path to user dropbox-->
-		<substitution repeat="10">
-			<key>$dropboxpath%d:</key>
-			<value>$calendars_uids:$userguid%d:/$dropbox:</value>
-		</substitution>
-		<!-- relative path to user freebusy-->
-		<substitution repeat="10">
-			<key>$freebusypath%d:</key>
-			<value>$calendars_uids:$userguid%d:/$freebusy:</value>
-		</substitution>
-		<!-- relative path to user alternate calendar home-->
-		<substitution repeat="10">
-			<key>$calendarpathalt%d:</key>
-			<value>$calendars_users:$userid%d:/$calendar:</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$email%d:</key>
-			<value>$userid%d:@example.com</value>
-		</substitution>
-		<!-- calendar user address of user-->
-		<substitution repeat="10">
-			<key>$cuaddr%d:</key>
-			<value>mailto:$email%d:</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddralt%d:</key>
-			<value>$principaluri%d:</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddraltnoslash%d:</key>
-			<value>$principals_uids:$userguid%d:</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddrurn%d:</key>
-			<value>urn:uuid:$userguid%d:</value>
-		</substitution>
-		
+		<!--  Ten user accounts -->
+		<repeat count="10">
+			<!-- user id -->
+			<substitution>
+				<key>$userid%d:</key>
+				<value>user%02d</value>
+			</substitution>
+			<!-- user guid -->
+			<substitution>
+				<key>$userguid%d:</key>
+				<value>user%02d</value>
+			</substitution>
+			<!-- user name -->
+			<substitution>
+				<key>$username%d:</key>
+				<value>User %02d</value>
+			</substitution>
+			<!-- password -->
+			<substitution>
+				<key>$pswd%d:</key>
+				<value>user%02d</value>
+			</substitution>
+			<!-- relative path to user principal resource-->
+			<substitution>
+				<key>$principal%d:</key>
+				<value>$principals_users:$userid%d:/</value>
+			</substitution>
+			<substitution>
+				<key>$principaluri%d:</key>
+				<value>$principals_uids:$userguid%d:/</value>
+			</substitution>
+			<substitution>
+				<key>$principal%dnoslash:</key>
+				<value>$principals_users:$userid%d:</value>
+			</substitution>
+			<!-- relative path to user calendar home-->
+			<substitution>
+				<key>$pathprefix%d:</key>
+				<value>$calendars_uids:$userguid%d:</value>
+			</substitution>
+			<!-- relative path to user calendar-->
+			<substitution>
+				<key>$calendarpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$calendar:</value>
+			</substitution>
+			<!-- relative path to user inbox-->
+			<substitution>
+				<key>$inboxpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$inbox:</value>
+			</substitution>
+			<!-- relative path to user outbox-->
+			<substitution>
+				<key>$outboxpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$outbox:</value>
+			</substitution>
+			<!-- relative path to user dropbox-->
+			<substitution>
+				<key>$dropboxpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$dropbox:</value>
+			</substitution>
+			<!-- relative path to user freebusy-->
+			<substitution>
+				<key>$freebusypath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$freebusy:</value>
+			</substitution>
+			<!-- relative path to user alternate calendar home-->
+			<substitution>
+				<key>$calendarpathalt%d:</key>
+				<value>$calendars_users:$userid%d:/$calendar:</value>
+			</substitution>
+			<substitution>
+				<key>$email%d:</key>
+				<value>$userid%d:@example.com</value>
+			</substitution>
+			<!-- calendar user address of user-->
+			<substitution>
+				<key>$cuaddr%d:</key>
+				<value>mailto:$email%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddralt%d:</key>
+				<value>$principaluri%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddraltnoslash%d:</key>
+				<value>$principals_uids:$userguid%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddrurn%d:</key>
+				<value>urn:uuid:$userguid%d:</value>
+			</substitution>
+		</repeat>
+
 		<!--  Override some of the above definitions for special cases -->
 
 		<!-- calendar user address of second user-->
 		<substitution>
 			<key>$cuaddr2:</key>
-			<value>MAILTO:user02 at example.com</value>
+			<value>MAILTO:$email2:</value>
 		</substitution>
 
 		<!-- resource id-->

Modified: CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/sslserverinfo.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/sslserverinfo.xml	2008-12-19 15:20:24 UTC (rev 3552)
+++ CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/scripts/server/sslserverinfo.xml	2008-12-19 15:52:15 UTC (rev 3553)
@@ -159,6 +159,11 @@
 			<key>$useradmin:</key>
 			<value>admin</value>
 		</substitution>
+		<!-- guid for admin user -->
+		<substitution>
+			<key>$useradminguid:</key>
+			<value>admin</value>
+		</substitution>
 		<!-- password for admin user -->
 		<substitution>
 			<key>$pswdadmin:</key>
@@ -172,7 +177,7 @@
 		</substitution>
 		<substitution>
 			<key>$principaluri_admin:</key>
-			<value>$principals_uids:$useradmin:/</value>
+			<value>$principals_uids:$useradminguid:/</value>
 		</substitution>
 
 		<!-- user id for proxy user -->
@@ -186,69 +191,105 @@
 			<value>superuser</value>
 		</substitution>
 
-		<!-- user id -->
-		<substitution repeat="10">
-			<key>$userid%d:</key>
-			<value>user%02d</value>
-		</substitution>
-		<!-- user guid -->
-		<substitution repeat="10">
-			<key>$userguid%d:</key>
-			<value>user%02d</value>
-		</substitution>
-		<!-- password -->
-		<substitution repeat="10">
-			<key>$pswd%d:</key>
-			<value>user%02d</value>
-		</substitution>
-		<!-- relative path to first user principal resource-->
-		<substitution repeat="10">
-			<key>$principal%d:</key>
-			<value>$principals_users:$userid%d:/</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$principaluri%d:</key>
-			<value>$principals_uids:$userguid%d:/</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$principal%dnoslash:</key>
-			<value>$principals_users:$userid%d:</value>
-		</substitution>
-		<!-- relative path to first user calendar home-->
-		<substitution repeat="10">
-			<key>$pathprefix%d:</key>
-			<value>$calendars_uids:$userguid%d:</value>
-		</substitution>
-		<!-- relative path to first user calendar-->
-		<substitution repeat="10">
-			<key>$calendarpath%d:</key>
-			<value>$calendars_uids:$userguid%d:/$calendar:</value>
-		</substitution>
-		<!-- relative path to first user calendar home-->
-		<substitution repeat="10">
-			<key>$calendarpathalt%d:</key>
-			<value>$calendars_uids:$userid%d:/$calendar:</value>
-		</substitution>
-		<!-- calendar user address of first user-->
-		<substitution repeat="10">
-			<key>$cuaddr%d:</key>
-			<value>mailto:$userid%d:@example.com</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddralt%d:</key>
-			<value>$principaluri%d:</value>
-		</substitution>
-		<substitution repeat="10">
-			<key>$cuaddraltnoslash%d:</key>
-			<value>$principals_uids:$userguid%d:</value>
-		</substitution>
-		
+		<!--  Ten user accounts -->
+		<repeat count="10">
+			<!-- user id -->
+			<substitution>
+				<key>$userid%d:</key>
+				<value>user%02d</value>
+			</substitution>
+			<!-- user guid -->
+			<substitution>
+				<key>$userguid%d:</key>
+				<value>user%02d</value>
+			</substitution>
+			<!-- user name -->
+			<substitution>
+				<key>$username%d:</key>
+				<value>User %02d</value>
+			</substitution>
+			<!-- password -->
+			<substitution>
+				<key>$pswd%d:</key>
+				<value>user%02d</value>
+			</substitution>
+			<!-- relative path to user principal resource-->
+			<substitution>
+				<key>$principal%d:</key>
+				<value>$principals_users:$userid%d:/</value>
+			</substitution>
+			<substitution>
+				<key>$principaluri%d:</key>
+				<value>$principals_uids:$userguid%d:/</value>
+			</substitution>
+			<substitution>
+				<key>$principal%dnoslash:</key>
+				<value>$principals_users:$userid%d:</value>
+			</substitution>
+			<!-- relative path to user calendar home-->
+			<substitution>
+				<key>$pathprefix%d:</key>
+				<value>$calendars_uids:$userguid%d:</value>
+			</substitution>
+			<!-- relative path to user calendar-->
+			<substitution>
+				<key>$calendarpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$calendar:</value>
+			</substitution>
+			<!-- relative path to user inbox-->
+			<substitution>
+				<key>$inboxpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$inbox:</value>
+			</substitution>
+			<!-- relative path to user outbox-->
+			<substitution>
+				<key>$outboxpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$outbox:</value>
+			</substitution>
+			<!-- relative path to user dropbox-->
+			<substitution>
+				<key>$dropboxpath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$dropbox:</value>
+			</substitution>
+			<!-- relative path to user freebusy-->
+			<substitution>
+				<key>$freebusypath%d:</key>
+				<value>$calendars_uids:$userguid%d:/$freebusy:</value>
+			</substitution>
+			<!-- relative path to user alternate calendar home-->
+			<substitution>
+				<key>$calendarpathalt%d:</key>
+				<value>$calendars_users:$userid%d:/$calendar:</value>
+			</substitution>
+			<substitution>
+				<key>$email%d:</key>
+				<value>$userid%d:@example.com</value>
+			</substitution>
+			<!-- calendar user address of user-->
+			<substitution>
+				<key>$cuaddr%d:</key>
+				<value>mailto:$email%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddralt%d:</key>
+				<value>$principaluri%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddraltnoslash%d:</key>
+				<value>$principals_uids:$userguid%d:</value>
+			</substitution>
+			<substitution>
+				<key>$cuaddrurn%d:</key>
+				<value>urn:uuid:$userguid%d:</value>
+			</substitution>
+		</repeat>
+
 		<!--  Override some of the above definitions for special cases -->
 
 		<!-- calendar user address of second user-->
 		<substitution>
 			<key>$cuaddr2:</key>
-			<value>MAILTO:user02 at example.com</value>
+			<value>MAILTO:$email2:</value>
 		</substitution>
 
 		<!-- resource id-->
@@ -261,6 +302,11 @@
 			<key>$resourceguid1:</key>
 			<value>resource01</value>
 		</substitution>
+		<!-- resource name-->
+		<substitution>
+			<key>$resourcename1:</key>
+			<value>Resource 01</value>
+		</substitution>
 		<!-- relative path to first resource calendar home-->
 		<substitution>
 			<key>$rpathprefix1:</key>
@@ -271,6 +317,16 @@
 			<key>$rcalendarpath1:</key>
 			<value>$calendars_uids:$resourceguid1:/$calendar:</value>
 		</substitution>
+		<!-- relative path to first resource inbox-->
+		<substitution>
+			<key>$rinboxpath1:</key>
+			<value>$calendars_uids:$resourceguid1:/$inbox:</value>
+		</substitution>
+		<!-- relative path to first resource outbox-->
+		<substitution>
+			<key>$routboxpath1:</key>
+			<value>$calendars_uids:$resourceguid1:/$outbox:</value>
+		</substitution>
 		<!-- relative path to first resource principal resource-->
 		<substitution>
 			<key>$rprincipal1:</key>
@@ -284,6 +340,10 @@
 			<key>$rcuaddralt1:</key>
 			<value>$rprincipaluri1:</value>
 		</substitution>
+		<substitution>
+			<key>$rcuaddrurn1:</key>
+			<value>urn:uuid:$resourceguid1:</value>
+		</substitution>
 
 		<!-- relative path to disabled group principal resource-->
 		<substitution>

Modified: CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/serverinfo.py
===================================================================
--- CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/serverinfo.py	2008-12-19 15:20:24 UTC (rev 3552)
+++ CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/serverinfo.py	2008-12-19 15:52:15 UTC (rev 3553)
@@ -99,24 +99,33 @@
             raise ValueError, "Must have $pswd1: substitution"
         self.pswd = self.subsdict["$pswd1:"]
 
+    def parseRepeatXML(self, node):
+        # Look for count
+        count = node.getAttribute( src.xmlDefs.ATTR_COUNT )
+
+        for child in node._get_childNodes():
+            self.parseSubstitutionXML(child, count)
+
     def parseSubstitutionsXML(self, node):
         for child in node._get_childNodes():
             if child._get_localName() == src.xmlDefs.ELEMENT_SUBSTITUTION:
-                
-                # Look for repeats
-                repeat = child.getAttribute( src.xmlDefs.ATTR_REPEAT )
+                self.parseSubstitutionXML(child)
+            elif child._get_localName() == src.xmlDefs.ELEMENT_REPEAT:
+                self.parseRepeatXML(child)
 
-                key = None
-                value = None
-                for schild in child._get_childNodes():
-                    if schild._get_localName() == src.xmlDefs.ELEMENT_KEY:
-                        key = schild.firstChild.data.encode("utf-8")
-                    elif schild._get_localName() == src.xmlDefs.ELEMENT_VALUE:
-                        value = schild.firstChild.data.encode("utf-8")
+    def parseSubstitutionXML(self, node, repeat=None):
+        if node._get_localName() == src.xmlDefs.ELEMENT_SUBSTITUTION:
+            key = None
+            value = None
+            for schild in node._get_childNodes():
+                if schild._get_localName() == src.xmlDefs.ELEMENT_KEY:
+                    key = schild.firstChild.data.encode("utf-8")
+                elif schild._get_localName() == src.xmlDefs.ELEMENT_VALUE:
+                    value = schild.firstChild.data.encode("utf-8")
 
-                if key and value:
-                    if repeat:
-                        for count in range(1, int(repeat)):
-                            self.subsdict[key % (count,)] = value % (count,)
-                    else:
-                        self.subsdict[key] = value
+            if key and value:
+                if repeat:
+                    for count in range(1, int(repeat)):
+                        self.subsdict[key % (count,)] = value % (count,)
+                else:
+                    self.subsdict[key] = value

Modified: CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/xmlDefs.py
===================================================================
--- CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/xmlDefs.py	2008-12-19 15:20:24 UTC (rev 3552)
+++ CalDAVTester/branches/users/cdaboo/normalize-cuaddr-3533/src/xmlDefs.py	2008-12-19 15:52:15 UTC (rev 3553)
@@ -48,6 +48,7 @@
 ELEMENT_POPULATE = "populate"
 ELEMENT_PORT = "port"
 ELEMENT_PROPERTY = "property"
+ELEMENT_REPEAT = "repeat"
 ELEMENT_REQUEST = "request"
 ELEMENT_RUNS = "runs"
 ELEMENT_RURI = "ruri"
@@ -82,7 +83,6 @@
 ATTR_NAME = "name"
 ATTR_PRINT_RESPONSE = "print-response"
 ATTR_PSWD = "pswd"
-ATTR_REPEAT = "repeat"
 ATTR_REQUEST_FAILED = "request-failed"
 ATTR_STATS = "stats"
 ATTR_SUBSTITUTIONS = "substitutions"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081219/8ac302f7/attachment-0001.html>


More information about the calendarserver-changes mailing list