[CalendarServer-changes] [8990] CalendarServer/trunk/calendarserver/tools/shell/vfs.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 5 14:21:49 PDT 2012


Revision: 8990
          http://trac.macosforge.org/projects/calendarserver/changeset/8990
Author:   wsanchez at apple.com
Date:     2012-04-05 14:21:49 -0700 (Thu, 05 Apr 2012)
Log Message:
-----------
Print owner info in calendar home folder.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/shell/vfs.py

Modified: CalendarServer/trunk/calendarserver/tools/shell/vfs.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/vfs.py	2012-04-05 20:01:02 UTC (rev 8989)
+++ CalendarServer/trunk/calendarserver/tools/shell/vfs.py	2012-04-05 21:21:49 UTC (rev 8990)
@@ -289,6 +289,7 @@
                     self.service,
                     self.path + ("calendars",),
                     home,
+                    self.record,
                 )
 
             if (
@@ -318,6 +319,7 @@
                     self.service,
                     self.path + ("addressbooks",),
                     home,
+                    self.record,
                 )
 
         self._didInitChildren = True
@@ -442,10 +444,11 @@
     """
     Calendar home folder.
     """
-    def __init__(self, service, path, home):
+    def __init__(self, service, path, home, record):
         Folder.__init__(self, service, path)
 
-        self.home = home
+        self.home   = home
+        self.record = record
 
     @inlineCallbacks
     def child(self, name):
@@ -473,8 +476,12 @@
         quotaUsed    = (yield self.home.quotaUsedBytes())
         quotaAllowed = (yield self.home.quotaAllowedBytes())
 
+        recordType      = (yield self.record.recordType)
+        recordShortName = (yield self.record.shortNames[0])
+
         rows = []
         rows.append(("UID", uid))
+        rows.append(("Owner", "(%s)%s" % (recordType, recordShortName)))
         rows.append(("Created"      , timeString(created)))
         rows.append(("Last modified", timeString(modified)))
         if quotaUsed is not None:
@@ -649,10 +656,11 @@
     """
     Address book home folder.
     """
-    def __init__(self, service, path, home):
+    def __init__(self, service, path, home, record):
         Folder.__init__(self, service, path)
 
-        self.home = home
+        self.home   = home
+        self.record = record
 
     # FIXME
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120405/6bbce05b/attachment-0001.html>


More information about the calendarserver-changes mailing list