Message info
 
To:calendarserver-changes@lists.macosforge.org From:source_changes@macosforge.org Subject:[CalendarServer-changes] [8990] CalendarServer/trunk/calendarserver/tools/shell/vfs.py Date:Thu, 05 Apr 2012 14:21:49 -0700 (PDT)
 

Revision
8990
Author
wsanchez@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

Diff

Modified: CalendarServer/trunk/calendarserver/tools/shell/vfs.py (8989 => 8990)


--- 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