[CalendarServer-changes] [13793] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jul 25 12:29:30 PDT 2014
Revision: 13793
http://trac.calendarserver.org//changeset/13793
Author: cdaboo at apple.com
Date: 2014-07-25 12:29:30 -0700 (Fri, 25 Jul 2014)
Log Message:
-----------
White space.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/controlsocket.py
CalendarServer/trunk/calendarserver/platform/darwin/sacl.py
CalendarServer/trunk/calendarserver/profiling.py
CalendarServer/trunk/calendarserver/push/amppush.py
CalendarServer/trunk/calendarserver/push/applepush.py
CalendarServer/trunk/calendarserver/push/notifier.py
CalendarServer/trunk/calendarserver/push/test/test_amppush.py
CalendarServer/trunk/calendarserver/push/test/test_applepush.py
CalendarServer/trunk/calendarserver/push/test/test_notifier.py
CalendarServer/trunk/calendarserver/push/util.py
CalendarServer/trunk/calendarserver/tap/caldav.py
CalendarServer/trunk/calendarserver/tap/test/test_util.py
CalendarServer/trunk/calendarserver/tap/util.py
CalendarServer/trunk/calendarserver/tools/anonymize.py
CalendarServer/trunk/calendarserver/tools/calverify.py
CalendarServer/trunk/calendarserver/tools/cmdline.py
CalendarServer/trunk/calendarserver/tools/dbinspect.py
CalendarServer/trunk/calendarserver/tools/notifications.py
CalendarServer/trunk/calendarserver/tools/obliterate.py
CalendarServer/trunk/calendarserver/tools/principals.py
CalendarServer/trunk/calendarserver/tools/purge.py
CalendarServer/trunk/calendarserver/tools/resources.py
CalendarServer/trunk/calendarserver/tools/shell/cmd.py
CalendarServer/trunk/calendarserver/tools/shell/directory.py
CalendarServer/trunk/calendarserver/tools/shell/terminal.py
CalendarServer/trunk/calendarserver/tools/shell/vfs.py
CalendarServer/trunk/calendarserver/tools/test/test_calverify.py
CalendarServer/trunk/calendarserver/tools/test/test_config.py
CalendarServer/trunk/calendarserver/tools/test/test_export.py
CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
CalendarServer/trunk/calendarserver/tools/test/test_purge.py
CalendarServer/trunk/calendarserver/tools/test/test_purge_old_events.py
CalendarServer/trunk/calendarserver/webadmin/landing.py
CalendarServer/trunk/conf/auth/generate_test_accounts.py
CalendarServer/trunk/contrib/od/dsattributes.py
CalendarServer/trunk/contrib/od/odframework.py
CalendarServer/trunk/contrib/performance/_event_create.py
CalendarServer/trunk/contrib/performance/benchlib.py
CalendarServer/trunk/contrib/performance/benchmark.py
CalendarServer/trunk/contrib/performance/benchmarks/find_events.py
CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy.py
CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy_vary_attendees.py
CalendarServer/trunk/contrib/performance/eventkitframework.py
CalendarServer/trunk/contrib/performance/httpauth.py
CalendarServer/trunk/contrib/performance/stats.py
CalendarServer/trunk/contrib/performance/test_benchmark.py
CalendarServer/trunk/contrib/performance/test_stats.py
CalendarServer/trunk/contrib/performance/upload.py
CalendarServer/trunk/contrib/tools/fakecalendardata.py
CalendarServer/trunk/contrib/tools/monitoranalysis.py
CalendarServer/trunk/contrib/tools/pg_stats_analysis.py
CalendarServer/trunk/contrib/tools/protocolanalysis.py
CalendarServer/trunk/contrib/tools/readStats.py
CalendarServer/trunk/contrib/tools/request_monitor.py
CalendarServer/trunk/contrib/tools/statsanalysis.py
Modified: CalendarServer/trunk/calendarserver/controlsocket.py
===================================================================
--- CalendarServer/trunk/calendarserver/controlsocket.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/controlsocket.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -91,7 +91,7 @@
Build a thing that will multiplex AMP to all the relevant sockets.
"""
receiverMap = {}
- for k, f in self._factoryMap.items():
+ for k, f in self._factoryMap.items():
receiverMap[k] = f.buildProtocol(addr)
return BinaryBoxProtocol(DispatchingBoxReceiver(receiverMap))
Modified: CalendarServer/trunk/calendarserver/platform/darwin/sacl.py
===================================================================
--- CalendarServer/trunk/calendarserver/platform/darwin/sacl.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/platform/darwin/sacl.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -39,6 +39,7 @@
raise ImportError(ve)
+
def checkSACL(userOrGroupName, serviceName):
"""
Check to see if a given user or group is a member of an OS X Server
Modified: CalendarServer/trunk/calendarserver/profiling.py
===================================================================
--- CalendarServer/trunk/calendarserver/profiling.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/profiling.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -38,6 +38,7 @@
return wrapper
+
def profile_inline_callback():
"""
Decorator to profile an inlineCallback function
Modified: CalendarServer/trunk/calendarserver/push/amppush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/amppush.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/amppush.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -85,12 +85,15 @@
@inlineCallbacks
- def enqueue(self, transaction, id, dataChangedTimestamp=None,
- priority=PushPriority.high):
+ def enqueue(
+ self, transaction, id, dataChangedTimestamp=None,
+ priority=PushPriority.high
+ ):
if dataChangedTimestamp is None:
dataChangedTimestamp = int(time.time())
for protocol in self.protocols:
- yield protocol.callRemote(NotificationForID, id=id,
+ yield protocol.callRemote(
+ NotificationForID, id=id,
dataChangedTimestamp=dataChangedTimestamp,
priority=priority.value)
@@ -108,11 +111,14 @@
@NotificationForID.responder
- def enqueueFromWorker(self, id, dataChangedTimestamp=None,
- priority=PushPriority.high.value):
+ def enqueueFromWorker(
+ self, id, dataChangedTimestamp=None,
+ priority=PushPriority.high.value
+ ):
if dataChangedTimestamp is None:
dataChangedTimestamp = int(time.time())
- self.master.enqueue(None, id, dataChangedTimestamp=dataChangedTimestamp,
+ self.master.enqueue(
+ None, id, dataChangedTimestamp=dataChangedTimestamp,
priority=PushPriority.lookupByValue(priority))
return {"status" : "OK"}
@@ -138,8 +144,10 @@
"""
log = Logger()
- def __init__(self, controlSocket, parentService, port, enableStaggering,
- staggerSeconds, reactor=None):
+ def __init__(
+ self, controlSocket, parentService, port, enableStaggering,
+ staggerSeconds, reactor=None
+ ):
if reactor is None:
from twisted.internet import reactor
from twisted.application.strports import service as strPortsService
@@ -147,18 +155,21 @@
if port:
# Service which listens for client subscriptions and sends
# notifications to them
- strPortsService(str(port), AMPPushNotifierFactory(self),
+ strPortsService(
+ str(port), AMPPushNotifierFactory(self),
reactor=reactor).setServiceParent(parentService)
if controlSocket is not None:
# Set up the listener which gets notifications from the slaves
- controlSocket.addFactory(PUSH_ROUTE,
- AMPPushMasterListenerFactory(self))
+ controlSocket.addFactory(
+ PUSH_ROUTE, AMPPushMasterListenerFactory(self)
+ )
self.subscribers = []
if enableStaggering:
- self.scheduler = PushScheduler(reactor, self.sendNotification,
+ self.scheduler = PushScheduler(
+ reactor, self.sendNotification,
staggerSeconds=staggerSeconds)
else:
self.scheduler = None
@@ -174,8 +185,10 @@
self.subscribers.remove(p)
- def enqueue(self, transaction, pushKey, dataChangedTimestamp=None,
- priority=PushPriority.high):
+ def enqueue(
+ self, transaction, pushKey, dataChangedTimestamp=None,
+ priority=PushPriority.high
+ ):
"""
Sends an AMP push notification to any clients subscribing to this pushKey.
@@ -200,7 +213,8 @@
if token is not None:
tokens.append(token)
if tokens:
- return self.scheduleNotifications(tokens, pushKey,
+ return self.scheduleNotifications(
+ tokens, pushKey,
dataChangedTimestamp, priority)
@@ -208,7 +222,8 @@
def sendNotification(self, token, id, dataChangedTimestamp, priority):
for subscriber in self.subscribers:
if subscriber.subscribedToID(id):
- yield subscriber.notify(token, id, dataChangedTimestamp,
+ yield subscriber.notify(
+ token, id, dataChangedTimestamp,
priority)
@@ -218,7 +233,8 @@
self.scheduler.schedule(tokens, id, dataChangedTimestamp, priority)
else:
for token in tokens:
- yield self.sendNotification(token, id, dataChangedTimestamp,
+ yield self.sendNotification(
+ token, id, dataChangedTimestamp,
priority)
@@ -252,7 +268,8 @@
def notify(self, token, id, dataChangedTimestamp, priority):
if self.subscribedToID(id) == token:
self.log.debug("Sending notification for %s to %s" % (id, token))
- return self.callRemote(NotificationForID, id=id,
+ return self.callRemote(
+ NotificationForID, id=id,
dataChangedTimestamp=dataChangedTimestamp,
priority=priority.value)
Modified: CalendarServer/trunk/calendarserver/push/applepush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/applepush.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/applepush.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -71,8 +71,10 @@
log = Logger()
@classmethod
- def makeService(cls, settings, store, testConnectorClass=None,
- reactor=None):
+ def makeService(
+ cls, settings, store, testConnectorClass=None,
+ reactor=None
+ ):
"""
Creates the various "subservices" that work together to implement
APN, including "provider" and "feedback" services for CalDAV and
@@ -129,7 +131,8 @@
)
provider.setServiceParent(service)
service.providers[protocol] = provider
- service.log.info("APNS %s topic: %s" %
+ service.log.info(
+ "APNS %s topic: %s" %
(protocol, settings[protocol]["Topic"]))
feedback = APNFeedbackService(
@@ -188,8 +191,10 @@
@inlineCallbacks
- def enqueue(self, transaction, pushKey, dataChangedTimestamp=None,
- priority=PushPriority.high):
+ def enqueue(
+ self, transaction, pushKey, dataChangedTimestamp=None,
+ priority=PushPriority.high
+ ):
"""
Sends an Apple Push Notification to any device token subscribed to
this pushKey.
@@ -226,14 +231,16 @@
numSubscriptions = len(subscriptions)
if numSubscriptions > 0:
- self.log.debug("Sending %d APNS notifications for %s" %
+ self.log.debug(
+ "Sending %d APNS notifications for %s" %
(numSubscriptions, pushKey))
tokens = []
for token, uid in subscriptions:
if token and uid:
tokens.append(token)
if tokens:
- provider.scheduleNotifications(tokens, pushKey,
+ provider.scheduleNotifications(
+ tokens, pushKey,
dataChangedTimestamp, priority)
@@ -313,7 +320,8 @@
if command == self.COMMAND_ERROR:
yield fn(status, identifier)
except Exception, e:
- self.log.warn("ProviderProtocol could not process error: %s (%s)" %
+ self.log.warn(
+ "ProviderProtocol could not process error: %s (%s)" %
(message.encode("hex"), e))
@@ -336,12 +344,14 @@
if status in self.TOKEN_REMOVAL_CODES:
token = self.history.extractIdentifier(identifier)
if token is not None:
- self.log.debug("Removing subscriptions for bad token: %s" %
+ self.log.debug(
+ "Removing subscriptions for bad token: %s" %
(token,))
txn = self.factory.store.newTransaction(label="APNProviderProtocol.processError")
subscriptions = (yield txn.apnSubscriptionsByToken(token))
for key, _ignore_modified, _ignore_uid in subscriptions:
- self.log.debug("Removing subscription: %s %s" %
+ self.log.debug(
+ "Removing subscription: %s %s" %
(token, key))
yield txn.removeAPNSubscription(token, key)
yield txn.commit()
@@ -380,7 +390,8 @@
}
)
payloadLength = len(payload)
- self.log.debug("Sending APNS notification to {token}: id={id} payload={payload} priority={priority}",
+ self.log.debug(
+ "Sending APNS notification to {token}: id={id} payload={payload} priority={priority}",
token=token, id=identifier, payload=payload, priority=apnsPriority)
"""
@@ -397,34 +408,34 @@
at a time that conservces power on the device receiving it)
"""
- # Frame struct.pack format
- # ! Network byte order
+ # Frame struct.pack format ! Network byte order
command = self.COMMAND_PROVIDER # B
frameLength = (# I
# Item 1 (Device token)
- 1 + # Item number # B
- 2 + # Item length # H
+ 1 + # Item number # B
+ 2 + # Item length # H
32 + # device token # 32s
# Item 2 (Payload)
- 1 + # Item number # B
- 2 + # Item length # H
+ 1 + # Item number # B
+ 2 + # Item length # H
payloadLength + # the JSON payload # %d s
# Item 3 (Notification ID)
- 1 + # Item number # B
- 2 + # Item length # H
- 4 + # Notification ID # I
+ 1 + # Item number # B
+ 2 + # Item length # H
+ 4 + # Notification ID # I
# Item 4 (Expiration)
- 1 + # Item number # B
- 2 + # Item length # H
- 4 + # Expiration seconds since epoch # I
+ 1 + # Item number # B
+ 2 + # Item length # H
+ 4 + # Expiration seconds since epoch # I
# Item 5 (Priority)
- 1 + # Item number # B
- 2 + # Item length # H
+ 1 + # Item number # B
+ 2 + # Item length # H
1 # Priority # B
)
self.transport.write(
- struct.pack("!BIBH32sBH%dsBHIBHIBHB" % (payloadLength,),
+ struct.pack(
+ "!BIBH32sBH%dsBHIBHIBHB" % (payloadLength,),
command, # Command
frameLength, # Frame length
@@ -482,7 +493,8 @@
def clientConnectionFailed(self, connector, reason):
self.log.error("Unable to connect to APN server: %s" % (reason,))
self.connected = False
- ReconnectingClientFactory.clientConnectionFailed(self, connector,
+ ReconnectingClientFactory.clientConnectionFailed(
+ self, connector,
reason)
@@ -500,9 +512,11 @@
class APNConnectionService(service.Service):
log = Logger()
- def __init__(self, host, port, certPath, keyPath, chainPath="",
+ def __init__(
+ self, host, port, certPath, keyPath, chainPath="",
passphrase="", sslMethod="TLSv1_METHOD", testConnector=None,
- reactor=None):
+ reactor=None
+ ):
self.host = host
self.port = port
@@ -541,12 +555,15 @@
class APNProviderService(APNConnectionService):
- def __init__(self, store, host, port, certPath, keyPath, chainPath="",
+ def __init__(
+ self, store, host, port, certPath, keyPath, chainPath="",
passphrase="", sslMethod="TLSv1_METHOD",
staggerNotifications=False, staggerSeconds=3,
- testConnector=None, reactor=None):
+ testConnector=None, reactor=None
+ ):
- APNConnectionService.__init__(self, host, port, certPath, keyPath,
+ APNConnectionService.__init__(
+ self, host, port, certPath, keyPath,
chainPath=chainPath, passphrase=passphrase, sslMethod=sslMethod,
testConnector=testConnector, reactor=reactor)
@@ -554,7 +571,8 @@
self.factory = None
self.queue = []
if staggerNotifications:
- self.scheduler = PushScheduler(self.reactor, self.sendNotification,
+ self.scheduler = PushScheduler(
+ self.reactor, self.sendNotification,
staggerSeconds=staggerSeconds)
else:
self.scheduler = None
@@ -583,7 +601,8 @@
self.queue = []
for (token, key), dataChangedTimestamp, priority in queued:
if token and key and dataChangedTimestamp and priority:
- self.sendNotification(token, key, dataChangedTimestamp,
+ self.sendNotification(
+ token, key, dataChangedTimestamp,
priority)
@@ -695,12 +714,14 @@
self.buffer = self.buffer[self.MESSAGE_LENGTH:]
try:
- timestamp, _ignore_tokenLength, binaryToken = struct.unpack("!IH32s",
+ timestamp, _ignore_tokenLength, binaryToken = struct.unpack(
+ "!IH32s",
message)
token = binaryToken.encode("hex").lower()
yield fn(timestamp, token)
except Exception, e:
- self.log.warn("FeedbackProtocol could not process message: %s (%s)" %
+ self.log.warn(
+ "FeedbackProtocol could not process message: %s (%s)" %
(message.encode("hex"), e))
@@ -719,14 +740,16 @@
@type token: C{str}
"""
- self.log.debug("FeedbackProtocol processFeedback time=%d token=%s" %
+ self.log.debug(
+ "FeedbackProtocol processFeedback time=%d token=%s" %
(timestamp, token))
txn = self.factory.store.newTransaction(label="APNFeedbackProtocol.processFeedback")
subscriptions = (yield txn.apnSubscriptionsByToken(token))
for key, modified, _ignore_uid in subscriptions:
if timestamp > modified:
- self.log.debug("FeedbackProtocol removing subscription: %s %s" %
+ self.log.debug(
+ "FeedbackProtocol removing subscription: %s %s" %
(token, key))
yield txn.removeAPNSubscription(token, key)
yield txn.commit()
@@ -743,7 +766,8 @@
def clientConnectionFailed(self, connector, reason):
- self.log.error("Unable to connect to APN feedback server: %s" %
+ self.log.error(
+ "Unable to connect to APN feedback server: %s" %
(reason,))
self.connected = False
ClientFactory.clientConnectionFailed(self, connector, reason)
@@ -752,11 +776,14 @@
class APNFeedbackService(APNConnectionService):
- def __init__(self, store, updateSeconds, host, port,
+ def __init__(
+ self, store, updateSeconds, host, port,
certPath, keyPath, chainPath="", passphrase="", sslMethod="TLSv1_METHOD",
- testConnector=None, reactor=None):
+ testConnector=None, reactor=None
+ ):
- APNConnectionService.__init__(self, host, port, certPath, keyPath,
+ APNConnectionService.__init__(
+ self, host, port, certPath, keyPath,
chainPath=chainPath, passphrase=passphrase, sslMethod=sslMethod,
testConnector=testConnector, reactor=reactor)
@@ -780,13 +807,16 @@
self.nextCheck = None
self.log.debug("APNFeedbackService checkForFeedback")
self.connect(self.factory)
- self.nextCheck = self.reactor.callLater(self.updateSeconds,
+ self.nextCheck = self.reactor.callLater(
+ self.updateSeconds,
self.checkForFeedback)
-class APNSubscriptionResource(ReadOnlyNoCopyResourceMixIn,
- DAVResourceWithoutChildrenMixin, DAVResource):
+class APNSubscriptionResource(
+ ReadOnlyNoCopyResourceMixIn,
+ DAVResourceWithoutChildrenMixin, DAVResource
+):
"""
The DAV resource allowing clients to subscribe to Apple push notifications.
To subscribe, a client should first determine the key they are interested
Modified: CalendarServer/trunk/calendarserver/push/notifier.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/notifier.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/notifier.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -50,7 +50,8 @@
# Find all work items with the same push ID and find the highest
# priority. Delete matching work items.
- results = (yield Select([self.table.WORK_ID, self.table.JOB_ID, self.table.PUSH_PRIORITY],
+ results = (yield Select(
+ [self.table.WORK_ID, self.table.JOB_ID, self.table.PUSH_PRIORITY],
From=self.table, Where=self.table.PUSH_ID == self.pushID).on(
self.transaction))
@@ -132,12 +133,15 @@
for prefix, id in ids:
if self._notify:
- self.log.debug("Notifications are enabled: %s %s/%s priority=%d" %
+ self.log.debug(
+ "Notifications are enabled: %s %s/%s priority=%d" %
(self._storeObject, prefix, id, priority.value))
- yield self._notifierFactory.send(prefix, id, txn,
+ yield self._notifierFactory.send(
+ prefix, id, txn,
priority=priority)
else:
- self.log.debug("Skipping notification for: %s %s/%s" %
+ self.log.debug(
+ "Skipping notification for: %s %s/%s" %
(self._storeObject, prefix, id,))
@@ -220,10 +224,12 @@
settings = {}
settings["APSBundleID"] = applePushSettings[protocol]["Topic"]
if config.EnableSSL:
- url = "https://%s:%s/%s" % (config.ServerHostName, config.SSLPort,
+ url = "https://%s:%s/%s" % (
+ config.ServerHostName, config.SSLPort,
applePushSettings.SubscriptionURL)
else:
- url = "http://%s:%s/%s" % (config.ServerHostName, config.HTTPPort,
+ url = "http://%s:%s/%s" % (
+ config.ServerHostName, config.HTTPPort,
applePushSettings.SubscriptionURL)
settings["SubscriptionURL"] = url
settings["SubscriptionRefreshIntervalSeconds"] = applePushSettings.SubscriptionRefreshIntervalSeconds
@@ -263,5 +269,6 @@
@type priority: L{PushPriority}
"""
for observer in self.observers:
- yield observer.enqueue(transaction, pushKey,
+ yield observer.enqueue(
+ transaction, pushKey,
dataChangedTimestamp=None, priority=priority)
Modified: CalendarServer/trunk/calendarserver/push/test/test_amppush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/test/test_amppush.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/test/test_amppush.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -58,7 +58,8 @@
self.assertTrue(client3.subscribedToID("/CalDAV/localhost/user03/"))
dataChangedTimestamp = 1354815999
- service.enqueue(None, "/CalDAV/localhost/user01/",
+ service.enqueue(
+ None, "/CalDAV/localhost/user01/",
dataChangedTimestamp=dataChangedTimestamp,
priority=PushPriority.high)
self.assertEquals(len(client1.history), 0)
@@ -114,7 +115,8 @@
client1.reset()
client2.reset()
client2.unsubscribe("token2", "/CalDAV/localhost/user01/")
- service.enqueue(None, "/CalDAV/localhost/user01/",
+ service.enqueue(
+ None, "/CalDAV/localhost/user01/",
dataChangedTimestamp=dataChangedTimestamp,
priority=PushPriority.low)
self.assertEquals(len(client1.history), 0)
@@ -142,7 +144,8 @@
client1.reset()
client2.reset()
client2.subscribe("token2", "/CalDAV/localhost/user01/")
- service.enqueue(None, "/CalDAV/localhost/user01/",
+ service.enqueue(
+ None, "/CalDAV/localhost/user01/",
dataChangedTimestamp=dataChangedTimestamp,
priority=PushPriority.medium)
self.assertEquals(
Modified: CalendarServer/trunk/calendarserver/push/test/test_applepush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/test/test_applepush.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/test/test_applepush.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -109,7 +109,8 @@
# Set up the service
clock = Clock()
- service = (yield ApplePushNotifierService.makeService(settings,
+ service = (yield ApplePushNotifierService.makeService(
+ settings,
self._sqlCalendarStore, testConnectorClass=TestConnector, reactor=clock))
self.assertEquals(set(service.providers.keys()), set(["CalDAV", "CardDAV"]))
self.assertEquals(set(service.feedbacks.keys()), set(["CalDAV", "CardDAV"]))
@@ -120,14 +121,17 @@
# Notification arrives from calendar server
dataChangedTimestamp = 1354815999
txn = self._sqlCalendarStore.newTransaction()
- yield service.enqueue(txn, "/CalDAV/calendars.example.com/user01/calendar/",
+ yield service.enqueue(
+ txn, "/CalDAV/calendars.example.com/user01/calendar/",
dataChangedTimestamp=dataChangedTimestamp, priority=PushPriority.high)
yield txn.commit()
# The notifications should be in the queue
- self.assertTrue(((token, key1), dataChangedTimestamp, PushPriority.high)
+ self.assertTrue(
+ ((token, key1), dataChangedTimestamp, PushPriority.high)
in service.providers["CalDAV"].queue)
- self.assertTrue(((token2, key1), dataChangedTimestamp, PushPriority.high)
+ self.assertTrue(
+ ((token2, key1), dataChangedTimestamp, PushPriority.high)
in service.providers["CalDAV"].queue)
# Start the service, making the connection which should service the
@@ -186,7 +190,8 @@
providerConnector.transport.data = None
# Send notification while service is connected
txn = self._sqlCalendarStore.newTransaction()
- yield service.enqueue(txn, "/CalDAV/calendars.example.com/user01/calendar/",
+ yield service.enqueue(
+ txn, "/CalDAV/calendars.example.com/user01/calendar/",
priority=PushPriority.low)
yield txn.commit()
clock.advance(1) # so that first push is sent
@@ -217,7 +222,8 @@
# with amounts of data not fitting message boundaries
# Send 1st 4 bytes
history = []
- errorData = struct.pack("!BBIBBI",
+ errorData = struct.pack(
+ "!BBIBBI",
APNProviderProtocol.COMMAND_ERROR, 3, 4,
APNProviderProtocol.COMMAND_ERROR, 5, 6,
)
@@ -243,7 +249,8 @@
feedbackConnector = service.feedbacks["CalDAV"].testConnector
timestamp = 2000
binaryToken = token.decode("hex")
- feedbackData = struct.pack("!IH32s", timestamp, len(binaryToken),
+ feedbackData = struct.pack(
+ "!IH32s", timestamp, len(binaryToken),
binaryToken)
yield feedbackConnector.receiveData(feedbackData)
@@ -255,10 +262,11 @@
return succeed(None)
timestamp = 2000
binaryToken = token.decode("hex")
- feedbackData = struct.pack("!IH32sIH32s",
+ feedbackData = struct.pack(
+ "!IH32sIH32s",
timestamp, len(binaryToken), binaryToken,
timestamp, len(binaryToken), binaryToken,
- )
+ )
# Send 1st 10 bytes
yield feedbackConnector.receiveData(feedbackData[:10], fn=feedbackTestFunction)
# Send remaining bytes
@@ -276,7 +284,8 @@
txn = self._sqlCalendarStore.newTransaction()
subscriptions = (yield txn.apnSubscriptionsByToken(token))
yield txn.commit()
- self.assertEquals(subscriptions,
+ self.assertEquals(
+ subscriptions,
[["/CalDAV/calendars.example.com/user02/calendar/", 3000, "D2256BCC-48E2-42D1-BD89-CBA1E4CCDFFB"]]
)
@@ -333,8 +342,10 @@
history = TokenHistory(maxSize=5)
# Ensure returned identifiers increment
- for id, token in enumerate(("one", "two", "three", "four", "five"),
- start=1):
+ for id, token in enumerate(
+ ("one", "two", "three", "four", "five"),
+ start=1
+ ):
self.assertEquals(id, history.add(token))
self.assertEquals(len(history.history), 5)
Modified: CalendarServer/trunk/calendarserver/push/test/test_notifier.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/test/test_notifier.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/test/test_notifier.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -36,8 +36,10 @@
self.history = []
- def enqueue(self, transaction, id, dataChangedTimestamp=None,
- priority=None):
+ def enqueue(
+ self, transaction, id, dataChangedTimestamp=None,
+ priority=None
+ ):
self.history.append((id, priority))
return(succeed(None))
@@ -95,8 +97,10 @@
self.history = []
- def enqueue(self, transaction, pushID, dataChangedTimestamp=None,
- priority=None):
+ def enqueue(
+ self, transaction, pushID, dataChangedTimestamp=None,
+ priority=None
+ ):
self.history.append((pushID, priority))
return(succeed(None))
@@ -117,61 +121,75 @@
self._sqlCalendarStore.callWithNewTransactions(decorateTransaction)
txn = self._sqlCalendarStore.newTransaction()
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/foo/",
pushPriority=PushPriority.high.value
)
yield txn.commit()
yield JobItem.waitEmpty(self.storeUnderTest().newTransaction, reactor, 60)
- self.assertEquals(pushDistributor.history,
+ self.assertEquals(
+ pushDistributor.history,
[("/CalDAV/localhost/foo/", PushPriority.high)])
pushDistributor.reset()
txn = self._sqlCalendarStore.newTransaction()
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/bar/",
pushPriority=PushPriority.high.value
)
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/bar/",
pushPriority=PushPriority.high.value
)
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/bar/",
pushPriority=PushPriority.high.value
)
# Enqueue a different pushID to ensure those are not grouped with
# the others:
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/baz/",
pushPriority=PushPriority.high.value
)
yield txn.commit()
yield JobItem.waitEmpty(self.storeUnderTest().newTransaction, reactor, 60)
- self.assertEquals(set(pushDistributor.history),
- set([("/CalDAV/localhost/bar/", PushPriority.high),
- ("/CalDAV/localhost/baz/", PushPriority.high)]))
+ self.assertEquals(
+ set(pushDistributor.history),
+ set([
+ ("/CalDAV/localhost/bar/", PushPriority.high),
+ ("/CalDAV/localhost/baz/", PushPriority.high)
+ ])
+ )
# Ensure only the high-water-mark priority push goes out, by
# enqueuing low, medium, and high notifications
pushDistributor.reset()
txn = self._sqlCalendarStore.newTransaction()
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/bar/",
pushPriority=PushPriority.low.value
)
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/bar/",
pushPriority=PushPriority.high.value
)
- yield txn.enqueue(PushNotificationWork,
+ yield txn.enqueue(
+ PushNotificationWork,
pushID="/CalDAV/localhost/bar/",
pushPriority=PushPriority.medium.value
)
yield txn.commit()
yield JobItem.waitEmpty(self.storeUnderTest().newTransaction, reactor, 60)
- self.assertEquals(pushDistributor.history,
+ self.assertEquals(
+ pushDistributor.history,
[("/CalDAV/localhost/bar/", PushPriority.high)])
@@ -205,7 +223,8 @@
home = yield self.homeUnderTest(name="user01")
yield home.notifyChanged(category=ChangeCategory.default)
- self.assertEquals(self.notifierFactory.history,
+ self.assertEquals(
+ self.notifierFactory.history,
[("/CalDAV/example.com/user01/", PushPriority.high)])
yield self.commit()
Modified: CalendarServer/trunk/calendarserver/push/util.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/util.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/push/util.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -160,13 +160,15 @@
for token in tokens:
internalKey = (token, key)
if internalKey in self.outstanding:
- self.log.debug("PushScheduler already has this scheduled: %s" %
+ self.log.debug(
+ "PushScheduler already has this scheduled: %s" %
(internalKey,))
else:
self.outstanding[internalKey] = self.reactor.callLater(
scheduleTime, self.send, token, key, dataChangedTimestamp,
priority)
- self.log.debug("PushScheduler scheduled: %s in %.0f sec" %
+ self.log.debug(
+ "PushScheduler scheduled: %s in %.0f sec" %
(internalKey, scheduleTime))
scheduleTime += self.staggerSeconds
Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -2470,7 +2470,7 @@
@param name: the name of the process to signal.
@type signal: C{str}
"""
- if not name in self.protocols:
+ if name not in self.protocols:
return
proc = self.protocols[name].transport
try:
Modified: CalendarServer/trunk/calendarserver/tap/test/test_util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/test/test_util.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tap/test/test_util.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -201,7 +201,8 @@
)
result = (yield self.stepper.start("abc"))
self.assertEquals(result, "abc") # original result passed through
- self.assertEquals(self.history,
+ self.assertEquals(
+ self.history,
['one success', 'two success', 'three success', 'four success'])
@@ -211,7 +212,8 @@
self.stepper.addStep(StepThree(self._record, True))
self.stepper.addStep(StepFour(self._record, True))
self.failUnlessFailure(self.stepper.start(), ZeroDivisionError)
- self.assertEquals(self.history,
+ self.assertEquals(
+ self.history,
['one success', 'two failure', 'three failure', 'four failure'])
@@ -223,5 +225,6 @@
self.stepper.addStep(StepFour(self._record, False))
result = (yield self.stepper.start("abc"))
self.assertEquals(result, None) # original result is gone
- self.assertEquals(self.history,
+ self.assertEquals(
+ self.history,
['one success', 'two failure', 'three success', 'four failure'])
Modified: CalendarServer/trunk/calendarserver/tap/util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/util.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tap/util.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -289,7 +289,7 @@
"No such user: {user}".format(
user=credentials.credentials.username
)
- )
+ )
# See if record is enabledForLogin
if not credentials.authnPrincipal.record.isLoginEnabled():
@@ -461,7 +461,8 @@
)
if config.DirectoryAddressBook.Enabled and config.EnableSearchAddressBook:
- log.info("Setting up directory address book: {cls}",
+ log.info(
+ "Setting up directory address book: {cls}",
cls=directoryBackedAddressBookResourceClass)
directoryBackedAddressBookCollection = directoryBackedAddressBookResourceClass(
@@ -557,8 +558,9 @@
# Timezone service is optional
if config.EnableTimezoneService:
- log.info("Setting up time zone service resource: {cls}",
- cls=timezoneServiceResourceClass)
+ log.info(
+ "Setting up time zone service resource: {cls}",
+ cls=timezoneServiceResourceClass)
timezoneService = timezoneServiceResourceClass(
root,
@@ -567,8 +569,9 @@
# Standard Timezone service is optional
if config.TimezoneService.Enabled:
- log.info("Setting up standard time zone service resource: {cls}",
- cls=timezoneStdServiceResourceClass)
+ log.info(
+ "Setting up standard time zone service resource: {cls}",
+ cls=timezoneStdServiceResourceClass)
timezoneStdService = timezoneStdServiceResourceClass(
root,
@@ -630,8 +633,9 @@
# WebCal
#
if config.WebCalendarRoot:
- log.info("Setting up WebCalendar resource: {res}",
- res=config.WebCalendarRoot)
+ log.info(
+ "Setting up WebCalendar resource: {res}",
+ res=config.WebCalendarRoot)
webCalendar = webCalendarResourceClass(
config.WebCalendarRoot,
principalCollections=(principalCollection,),
@@ -657,7 +661,8 @@
#
apnConfig = config.Notifications.Services.APNS
if apnConfig.Enabled:
- log.info("Setting up APNS resource at /{url}",
+ log.info(
+ "Setting up APNS resource at /{url}",
url=apnConfig["SubscriptionURL"])
apnResource = apnSubscriptionResourceClass(root, newStore)
root.putChild(apnConfig["SubscriptionURL"], apnResource)
@@ -690,7 +695,8 @@
schemeConfig["Qop"],
realm,
))
- log.info("Overriding {path} with {cls} ({schemes})",
+ log.info(
+ "Overriding {path} with {cls} ({schemes})",
path=path, cls=cls, schemes=schemes)
authWrapper = AuthenticationWrapper(
@@ -917,11 +923,13 @@
try:
memory = self._memoryForPID(pid, self._residentOnly)
except Exception, e:
- log.error("Unable to determine memory usage of PID: {pid} ({err})",
+ log.error(
+ "Unable to determine memory usage of PID: {pid} ({err})",
pid=pid, err=e)
continue
if memory > self._bytes:
- log.warn("Killing large process: {name} PID:{pid} {memtype}:{mem}",
+ log.warn(
+ "Killing large process: {name} PID:{pid} {memtype}:{mem}",
name=name, pid=pid,
memtype=("Resident" if self._residentOnly else "Virtual"),
mem=memory)
Modified: CalendarServer/trunk/calendarserver/tools/anonymize.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/anonymize.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/anonymize.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -151,7 +151,8 @@
print("Couldn't find %s, skipping." % (home,))
continue
sourceHome = os.path.join(secondPath, home)
- destHome = os.path.join(destUidHomes,
+ destHome = os.path.join(
+ destUidHomes,
record['guid'][0:2], record['guid'][2:4],
record['guid'])
homeList.append((sourceHome, destHome, record))
@@ -261,7 +262,8 @@
for freeBusy in freeBusies:
xml += "<href xmlns='DAV:'>/calendars/__uids__/%s/%s/</href>\n" % (record['guid'], freeBusy)
xml += "</calendar-free-busy-set>\n"
- xattr.setxattr(destInbox,
+ xattr.setxattr(
+ destInbox,
"WebDAV:{urn:ietf:params:xml:ns:caldav}calendar-free-busy-set",
zlib.compress(xml)
)
@@ -399,7 +401,8 @@
origRecordNames = record['dsAttrTypeStandard:RecordName']
origEmails = record.get('dsAttrTypeStandard:EMailAddress', [])
origMembers = record.get('dsAttrTypeStandard:GroupMembers', [])
- self.addRecord(internalType=internalType, guid=origGUID,
+ self.addRecord(
+ internalType=internalType, guid=origGUID,
names=origRecordNames, emails=origEmails,
members=origMembers)
@@ -407,8 +410,10 @@
print("")
- def addRecord(self, internalType="users", guid=None, names=None,
- emails=None, members=None, cua=None):
+ def addRecord(
+ self, internalType="users", guid=None, names=None,
+ emails=None, members=None, cua=None
+ ):
if cua:
keys = [self.cua2key(cua)]
Modified: CalendarServer/trunk/calendarserver/tools/calverify.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/calverify.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/calverify.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -170,7 +170,8 @@
brokenRID = brokenComponent.propertyValue("RECURRENCE-ID")
if doFix:
master.addProperty(Property("RDATE", [brokenRID, ]))
- fixed.append("Added RDATE for invalid occurrence: %s" %
+ fixed.append(
+ "Added RDATE for invalid occurrence: %s" %
(brokenRID,))
else:
unfixed.append("Invalid occurrence: %s" % (brokenRID,))
@@ -339,7 +340,7 @@
['no-organizer', '', "Detect dark events without an organizer"],
['invalid-organizer', '', "Detect dark events with an organizer not in the directory"],
['disabled-organizer', '', "Detect dark events with a disabled organizer"],
-]
+ ]
optParameters = [
['config', 'f', DEFAULT_CONFIG_FILE, "Specify caldavd.plist configuration path."],
@@ -478,11 +479,11 @@
if inbox:
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN)
+ cb.BIND_MODE == _BIND_MODE_OWN)
else:
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN).And(
- cb.CALENDAR_RESOURCE_NAME != "inbox")
+ cb.BIND_MODE == _BIND_MODE_OWN).And(
+ cb.CALENDAR_RESOURCE_NAME != "inbox")
kwds = {}
rows = (yield Select(
@@ -503,11 +504,11 @@
if inbox:
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN)
+ cb.BIND_MODE == _BIND_MODE_OWN)
else:
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN).And(
- cb.CALENDAR_RESOURCE_NAME != "inbox")
+ cb.BIND_MODE == _BIND_MODE_OWN).And(
+ cb.CALENDAR_RESOURCE_NAME != "inbox")
kwds = {"uuid": uuid}
if len(uuid) != 36:
@@ -558,11 +559,11 @@
if inbox:
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN)
+ cb.BIND_MODE == _BIND_MODE_OWN)
else:
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN).And(
- cb.CALENDAR_RESOURCE_NAME != "inbox")
+ cb.BIND_MODE == _BIND_MODE_OWN).And(
+ cb.CALENDAR_RESOURCE_NAME != "inbox")
kwds = {
"UID" : uid,
@@ -611,8 +612,8 @@
tr = schema.TIME_RANGE
cojoin = (cb.CALENDAR_RESOURCE_ID == co.CALENDAR_RESOURCE_ID).And(
- cb.BIND_MODE == _BIND_MODE_OWN).And(
- cb.CALENDAR_RESOURCE_NAME != "inbox")
+ cb.BIND_MODE == _BIND_MODE_OWN).And(
+ cb.CALENDAR_RESOURCE_NAME != "inbox")
kwds = {
"Start" : pyCalendarTodatetime(start),
@@ -1543,7 +1544,7 @@
eachAttendeesOwnStatus[organizerAttendee] = self.buildAttendeeStates(calendar, self.start, self.end, attendee_only=organizerAttendee)
attendeeResIDs[(organizerAttendee, uid)] = attresid
attendeeCreatedModified[organizerAttendee] = (att_created, att_modified,)
- #print("Reloaded missing attendee data")
+ # print("Reloaded missing attendee data")
# If an entry for the attendee exists, then check whether attendee status matches
if organizerAttendee in eachAttendeesOwnStatus:
@@ -1708,8 +1709,8 @@
rows = yield self.getAllResourceInfoWithUID(uid)
yield self.buildResourceInfo(rows, onlyOrganizer=True)
- #if uid in self.organized_byuid:
- # print("Reloaded missing organizer data: %s" % (uid,))
+ # if uid in self.organized_byuid:
+ # print("Reloaded missing organizer data: %s" % (uid,))
if uid not in self.organized_byuid:
Modified: CalendarServer/trunk/calendarserver/tools/cmdline.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/cmdline.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/cmdline.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -74,6 +74,7 @@
if serviceMaker is None:
serviceMaker = CalDAVServiceMaker
+
# We want to validate that the actual service is always an instance of WorkerService, so wrap the
# service maker callback inside a function that does that check
def _makeValidService(store):
Modified: CalendarServer/trunk/calendarserver/tools/dbinspect.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/dbinspect.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/dbinspect.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -101,6 +101,7 @@
returnValue(record.shortNames[0] if record else "(%s)" % (uid,))
+
@inlineCallbacks
def UIDFromInput(txn, value):
try:
@@ -755,14 +756,14 @@
# Create fake filter element to match time-range
filter = caldavxml.Filter(
- caldavxml.ComponentFilter(
- caldavxml.ComponentFilter(
- timerange,
- name=("VEVENT",),
- ),
- name="VCALENDAR",
- )
- )
+ caldavxml.ComponentFilter(
+ caldavxml.ComponentFilter(
+ timerange,
+ name=("VEVENT",),
+ ),
+ name="VCALENDAR",
+ )
+ )
filter = Filter(filter)
filter.settimezone(None)
@@ -806,26 +807,26 @@
schema.CALENDAR_OBJECT_REVISIONS,
schema.CALENDAR,
- #schema.CALENDAR_BIND, - cascades
- #schema.CALENDAR_OBJECT, - cascades
- #schema.TIME_RANGE, - cascades
- #schema.TRANSPARENCY, - cascades
+ # schema.CALENDAR_BIND, - cascades
+ # schema.CALENDAR_OBJECT, - cascades
+ # schema.TIME_RANGE, - cascades
+ # schema.TRANSPARENCY, - cascades
schema.CALENDAR_HOME,
- #schema.CALENDAR_HOME_METADATA - cascades
+ # schema.CALENDAR_HOME_METADATA - cascades
schema.ATTACHMENT,
schema.ADDRESSBOOK_OBJECT_REVISIONS,
schema.ADDRESSBOOK_HOME,
- #schema.ADDRESSBOOK_HOME_METADATA, - cascades
- #schema.ADDRESSBOOK_BIND, - cascades
- #schema.ADDRESSBOOK_OBJECT, - cascades
+ # schema.ADDRESSBOOK_HOME_METADATA, - cascades
+ # schema.ADDRESSBOOK_BIND, - cascades
+ # schema.ADDRESSBOOK_OBJECT, - cascades
schema.NOTIFICATION_HOME,
schema.NOTIFICATION,
- #schema.NOTIFICATION_OBJECT_REVISIONS - cascades,
+ # schema.NOTIFICATION_OBJECT_REVISIONS - cascades,
)
for tableschema in wipeout:
Modified: CalendarServer/trunk/calendarserver/tools/notifications.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/notifications.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/notifications.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -143,11 +143,14 @@
password = getpass("Password for %s: " % (username,))
admin = username
- monitorService = PushMonitorService(useSSL, host, port, nodes, admin,
+ monitorService = PushMonitorService(
+ useSSL, host, port, nodes, admin,
username, password, verbose)
- reactor.addSystemEventTrigger("during", "startup",
+ reactor.addSystemEventTrigger(
+ "during", "startup",
monitorService.startService)
- reactor.addSystemEventTrigger("before", "shutdown",
+ reactor.addSystemEventTrigger(
+ "before", "shutdown",
monitorService.stopService)
reactor.run()
@@ -177,17 +180,20 @@
self.xmlStream = None
self.doKeepAlive = True
- xmlstream.XmlStreamFactory.__init__(self,
- XMPPAuthenticator(JID(self.jid), password))
+ xmlstream.XmlStreamFactory.__init__(
+ self,
+ XMPPAuthenticator(JID(self.jid), password))
self.addBootstrap(xmlstream.STREAM_CONNECTED_EVENT, self.connected)
self.addBootstrap(xmlstream.STREAM_END_EVENT, self.disconnected)
self.addBootstrap(xmlstream.INIT_FAILED_EVENT, self.initFailed)
self.addBootstrap(xmlstream.STREAM_AUTHD_EVENT, self.authenticated)
- self.addBootstrap(IQAuthInitializer.INVALID_USER_EVENT,
+ self.addBootstrap(
+ IQAuthInitializer.INVALID_USER_EVENT,
self.authFailed)
- self.addBootstrap(IQAuthInitializer.AUTH_FAILED_EVENT,
+ self.addBootstrap(
+ IQAuthInitializer.AUTH_FAILED_EVENT,
self.authFailed)
if sigint:
@@ -253,7 +259,8 @@
if self.doKeepAlive and self.xmlStream is not None:
presence = domish.Element(('jabber:client', 'presence'))
self.xmlStream.send(presence)
- self.presenceCall = reactor.callLater(self.presenceSeconds,
+ self.presenceCall = reactor.callLater(
+ self.presenceSeconds,
self.sendPresence)
@@ -340,8 +347,10 @@
using XMPP and monitored for updates.
"""
- def __init__(self, useSSL, host, port, nodes, authname, username, password,
- verbose):
+ def __init__(
+ self, useSSL, host, port, nodes, authname, username, password,
+ verbose
+ ):
self.useSSL = useSSL
self.host = host
self.port = port
@@ -365,7 +374,8 @@
for home in homes:
paths.add(home)
for principal in (yield self.getProxyFor()):
- name, homes = (yield self.getPrincipalDetails(principal,
+ name, homes = (yield self.getPrincipalDetails(
+ principal,
includeCardDAV=False))
if self.verbose:
print(name, homes)
@@ -421,7 +431,8 @@
"""
try:
- responseBody = (yield self.makeRequest(path, "PROPFIND", headers,
+ responseBody = (yield self.makeRequest(
+ path, "PROPFIND", headers,
body))
try:
doc = ElementTree.fromstring(responseBody)
@@ -485,7 +496,8 @@
path = "/principals/users/%s/" % (self.username,)
try:
- responseBody = (yield self.makeRequest(path, "PROPFIND", headers,
+ responseBody = (yield self.makeRequest(
+ path, "PROPFIND", headers,
body))
try:
doc = ElementTree.fromstring(responseBody)
@@ -541,7 +553,8 @@
"""
try:
- responseBody = (yield self.makeRequest(path, "PROPFIND", headers,
+ responseBody = (yield self.makeRequest(
+ path, "PROPFIND", headers,
body))
host = None
port = None
@@ -617,7 +630,8 @@
service = "pubsub.%s" % (host,)
jid = "%s@%s" % (self.authname, host)
- pubsubFactory = PubSubClientFactory(jid, self.password, service, nodes,
+ pubsubFactory = PubSubClientFactory(
+ jid, self.password, service, nodes,
self.verbose)
connect(GAIEndpoint(reactor, host, port), pubsubFactory)
@@ -625,7 +639,8 @@
def makeRequest(self, path, method, headers, body):
scheme = "https:" if self.useSSL else "http:"
url = "%s//%s:%d%s" % (scheme, self.host, self.port, path)
- caldavFactory = client.HTTPClientFactory(url, method=method,
+ caldavFactory = client.HTTPClientFactory(
+ url, method=method,
headers=headers, postdata=body, agent="Push Monitor")
caldavFactory.username = self.authname
caldavFactory.password = self.password
Modified: CalendarServer/trunk/calendarserver/tools/obliterate.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/obliterate.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/obliterate.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -296,8 +296,8 @@
self.output.write("Total Resources: %d\n" % (self.totalResources,))
if self.attachments:
self.output.write("Attachments removed: %s\n" % (len(self.attachments,)))
- #for attachment in self.attachments:
- # self.output.write(" %s\n" % (attachment,))
+ # for attachment in self.attachments:
+ # self.output.write(" %s\n" % (attachment,))
self.output.write("Obliteration time: %.1fs\n" % (time.time() - t,))
Modified: CalendarServer/trunk/calendarserver/tools/principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/principals.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/principals.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -63,7 +63,7 @@
print("")
print(" Principals are identified by one of the following:")
print(" Type and shortname (eg.: users:wsanchez)")
- #print(" A principal path (eg.: /principals/users/wsanchez/)")
+ # print(" A principal path (eg.: /principals/users/wsanchez/)")
print(" A GUID (eg.: E415DBA7-40B5-49F5-A7CC-ACC81E4DEC79)")
print("")
print("options:")
@@ -791,7 +791,7 @@
groupUIDs = yield txn.allGroupDelegates()
for groupUID in groupUIDs:
(
- groupID, name, _ignore_membershipHash, modified, extant
+ groupID, name, _ignore_membershipHash, modified, _ignore_extant
) = yield txn.groupByUID(
groupUID
)
Modified: CalendarServer/trunk/calendarserver/tools/purge.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/purge.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/purge.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -302,7 +302,7 @@
print(" -h --help: print this help and exit")
print(" -f --config <path>: Specify caldavd.plist configuration path")
print(" -d --days <number>: specify how many days in the past to retain (default=%d)" % (DEFAULT_RETAIN_DAYS,))
- #print(" -b --batch <number>: number of events to remove in each transaction (default=%d)" % (DEFAULT_BATCH_SIZE,))
+ # print(" -b --batch <number>: number of events to remove in each transaction (default=%d)" % (DEFAULT_BATCH_SIZE,))
print(" -n --dry-run: calculate how many events to purge, but do not purge data")
print(" -v --verbose: print progress information")
print(" -D --debug: debug logging")
@@ -475,7 +475,7 @@
print(" -h --help: print this help and exit")
print(" -f --config <path>: Specify caldavd.plist configuration path")
print(" -u --uuid <owner uid>: target a specific user UID")
- #print(" -b --batch <number>: number of attachments to remove in each transaction (default=%d)" % (DEFAULT_BATCH_SIZE,))
+ # print(" -b --batch <number>: number of attachments to remove in each transaction (default=%d)" % (DEFAULT_BATCH_SIZE,))
print(" -d --days <number>: specify how many days in the past to retain (default=%d) zero means no removal of old attachments" % (DEFAULT_RETAIN_DAYS,))
print(" -n --dry-run: calculate how many attachments to purge, but do not purge data")
print(" -v --verbose: print progress information")
@@ -680,7 +680,7 @@
table = tables.Table()
table.addHeader(("User", "Current Quota", "Orphan Size", "Orphan Count", "Dropbox Size", "Dropbox Count", "Managed Size", "Managed Count", "Total Size", "Total Count"))
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.LEFT_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
@@ -1011,14 +1011,14 @@
# Anything in the past is left alone
whenString = self.when.getText()
query_filter = caldavxml.Filter(
- caldavxml.ComponentFilter(
- caldavxml.ComponentFilter(
- caldavxml.TimeRange(start=whenString,),
- name=("VEVENT",),
- ),
- name="VCALENDAR",
- )
- )
+ caldavxml.ComponentFilter(
+ caldavxml.ComponentFilter(
+ caldavxml.TimeRange(start=whenString,),
+ name=("VEVENT",),
+ ),
+ name="VCALENDAR",
+ )
+ )
query_filter = Filter(query_filter)
count = 0
Modified: CalendarServer/trunk/calendarserver/tools/resources.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/resources.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/resources.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -54,6 +54,7 @@
yield migrateResources(sourceService, destService)
+
def usage():
name = os.path.basename(sys.argv[0])
@@ -101,10 +102,12 @@
utilityMain(configFileName, ResourceMigrationService, verbose=verbose)
+
class DirectoryRecord(BaseDirectoryRecord, CalendarDirectoryRecordMixin):
pass
+
@inlineCallbacks
def migrateResources(sourceService, destService, verbose=False):
"""
Modified: CalendarServer/trunk/calendarserver/tools/shell/cmd.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/cmd.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/shell/cmd.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -472,7 +472,7 @@
if not isinstance(wd, Folder):
raise NotFoundError("Not a folder: %s" % (wd,))
- #log.info("wd -> %s" % (wd,))
+ # log.info("wd -> %s" % (wd,))
self.wd = wd
Modified: CalendarServer/trunk/calendarserver/tools/shell/directory.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/directory.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/shell/directory.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -72,16 +72,16 @@
if value:
table.addRow((name, value))
- add("Service" , record.service )
+ add("Service" , record.service)
add("Record Type", record.recordType)
for shortName in record.shortNames:
add("Short Name", shortName)
- add("GUID" , record.guid )
- add("Full Name" , record.fullName )
+ add("GUID" , record.guid)
+ add("Full Name" , record.fullName)
add("First Name", record.firstName)
- add("Last Name" , record.lastName )
+ add("Last Name" , record.lastName)
try:
for email in record.emailAddresses:
@@ -116,7 +116,8 @@
if not rows:
return succeed(None)
- rows = sorted(rows,
+ rows = sorted(
+ rows,
key=lambda row: (row[1], row[2])
)
@@ -162,7 +163,8 @@
if not rows:
returnValue(None)
- rows = sorted(rows,
+ rows = sorted(
+ rows,
key=lambda row: (row[1], row[2], row[4])
)
Modified: CalendarServer/trunk/calendarserver/tools/shell/terminal.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/terminal.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/shell/terminal.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -203,7 +203,7 @@
self.keyHandlers['\x04'] = self.handle_EOF # Control-D
self.keyHandlers['\x1c'] = self.handle_QUIT # Control-\
self.keyHandlers['\x0c'] = self.handle_FF # Control-L
- #self.keyHandlers['\t' ] = self.handle_TAB # Tab
+ # self.keyHandlers['\t' ] = self.handle_TAB # Tab
if self.emulate == "emacs":
# EMACS key bindinds
@@ -320,7 +320,7 @@
self.characterReceived(c, True)
# FIXME: Add a space only if we know we've fully completed the term.
- #self.characterReceived(" ", False)
+ # self.characterReceived(" ", False)
else:
self.terminal.nextLine()
for completion in completions:
@@ -363,7 +363,7 @@
if tokens:
cmd = tokens.pop(0)
- #print("Arguments: %r" % (tokens,))
+ # print("Arguments: %r" % (tokens,))
m = getattr(self.commands, "cmd_%s" % (cmd,), None)
if m:
Modified: CalendarServer/trunk/calendarserver/tools/shell/vfs.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/vfs.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/shell/vfs.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -206,15 +206,15 @@
@inlineCallbacks
def child(self, name):
# FIXME: Move this logic to locate()
- #if not name:
- # return succeed(self)
- #if name == ".":
- # return succeed(self)
- #if name == "..":
- # path = self.path[:-1]
- # if not path:
- # path = "/"
- # return RootFolder(self.service).locate(path)
+ # if not name:
+ # return succeed(self)
+ # if name == ".":
+ # return succeed(self)
+ # if name == "..":
+ # path = self.path[:-1]
+ # if not path:
+ # path = "/"
+ # return RootFolder(self.service).locate(path)
if name in self._children:
returnValue(self._children[name])
@@ -736,7 +736,7 @@
organizerName = organizer.parameterValue("CN")
organizerEmail = organizer.parameterValue("EMAIL")
- name = " (%s)" % (organizerName ,) if organizerName else ""
+ name = " (%s)" % (organizerName ,) if organizerName else ""
email = " <%s>" % (organizerEmail,) if organizerEmail else ""
rows.append(("Organizer", "%s%s%s" % (organizer.value(), name, email)))
Modified: CalendarServer/trunk/calendarserver/tools/test/test_calverify.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_calverify.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/test/test_calverify.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -1030,14 +1030,14 @@
requirements = {
CalVerifyMismatchTestsBase.uuid1 : {
"calendar" : {
- "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched2_attendee.ics" : (MISMATCH2_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched3_attendee.ics" : (MISMATCH3_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched_organizer.ics" : (MISMATCH_ORGANIZER_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched2_organizer.ics" : (MISMATCH2_ORGANIZER_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- },
- "inbox" : {},
+ "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched2_attendee.ics" : (MISMATCH2_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched3_attendee.ics" : (MISMATCH3_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched_organizer.ics" : (MISMATCH_ORGANIZER_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched2_organizer.ics" : (MISMATCH2_ORGANIZER_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ },
+ "inbox" : {},
},
CalVerifyMismatchTestsBase.uuid2 : {
"calendar" : {
@@ -1048,7 +1048,7 @@
"mismatched_organizer.ics" : (MISMATCH_ORGANIZER_2_ICS, CalVerifyMismatchTestsBase.metadata,),
"mismatched2_organizer.ics" : (MISMATCH2_ORGANIZER_2_ICS, CalVerifyMismatchTestsBase.metadata,),
},
- "inbox" : {},
+ "inbox" : {},
},
CalVerifyMismatchTestsBase.uuid3 : {
"calendar" : {
@@ -1061,7 +1061,7 @@
"mismatched_organizer.ics" : (MISMATCH_ORGANIZER_3_ICS, CalVerifyMismatchTestsBase.metadata,),
"mismatched2_attendee.ics" : (MISMATCH2_ATTENDEE_3_ICS, CalVerifyMismatchTestsBase.metadata,),
},
- "inbox" : {},
+ "inbox" : {},
},
}
@@ -1331,10 +1331,10 @@
requirements = {
CalVerifyMismatchTestsBase.uuid1 : {
"calendar" : {
- "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- },
- "inbox" : {},
+ "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ },
+ "inbox" : {},
},
CalVerifyMismatchTestsBase.uuid2 : {
"calendar" : {},
@@ -1558,10 +1558,10 @@
requirements = {
CalVerifyMismatchTestsBase.uuid1 : {
"calendar" : {
- "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
- },
- "inbox" : {},
+ "missing_attendee.ics" : (MISSING_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ "mismatched_attendee.ics" : (MISMATCH_ATTENDEE_1_ICS, CalVerifyMismatchTestsBase.metadata,),
+ },
+ "inbox" : {},
},
CalVerifyMismatchTestsBase.uuid2 : {
"calendar" : {},
Modified: CalendarServer/trunk/calendarserver/tools/test/test_config.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_config.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/test/test_config.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -16,7 +16,8 @@
from twistedcaldav.test.util import TestCase
from twistedcaldav.config import ConfigDict
-from calendarserver.tools.config import (WritableConfig, setKeyPath, getKeyPath,
+from calendarserver.tools.config import (
+ WritableConfig, setKeyPath, getKeyPath,
flattenDictionary, processArgs)
from calendarserver.tools.test.test_gateway import RunCommandTestCase
from twisted.internet.defer import inlineCallbacks
@@ -118,7 +119,8 @@
"""
Verify readConfig returns with only the writable keys
"""
- results = yield self.runCommand(command_readConfig,
+ results = yield self.runCommand(
+ command_readConfig,
script="calendarserver_config")
self.assertEquals(results["result"]["RedirectHTTPToHTTPS"], False)
@@ -140,7 +142,8 @@
"""
Verify writeConfig updates the writable plist file only
"""
- results = yield self.runCommand(command_writeConfig,
+ results = yield self.runCommand(
+ command_writeConfig,
script="calendarserver_config")
self.assertEquals(results["result"]["EnableCalDAV"], False)
@@ -161,7 +164,8 @@
"""
Verify sending a bogus command returns an error
"""
- results = yield self.runCommand(command_bogusCommand,
+ results = yield self.runCommand(
+ command_bogusCommand,
script="calendarserver_config")
self.assertEquals(results["error"], "Unknown command 'bogus'")
Modified: CalendarServer/trunk/calendarserver/tools/test/test_export.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_export.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/test/test_export.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -48,8 +48,8 @@
def holiday(uid):
return (
getModule("twistedcaldav.test").filePath
- .sibling("data").child("Holidays").child(uid + ".ics")
- .getContent()
+ .sibling("data").child("Holidays").child(uid + ".ics")
+ .getContent()
)
@@ -292,7 +292,7 @@
io = StringIO()
yield exportToFile(
[(yield self.txn().calendarHomeWithUID("user01"))
- .calendarWithName("calendar1")], io
+ .calendarWithName("calendar1")], io
)
self.assertEquals(Component.fromString(io.getvalue()),
expected)
@@ -325,7 +325,7 @@
io = StringIO()
yield exportToFile(
[(yield self.txn().calendarHomeWithUID("user01"))
- .calendarWithName("calendar1")], io
+ .calendarWithName("calendar1")], io
)
self.assertEquals(Component.fromString(io.getvalue()),
expected)
@@ -355,7 +355,7 @@
io = StringIO()
yield exportToFile(
[(yield self.txn().calendarHomeWithUID("user01"))
- .calendarWithName("calendar1")], io
+ .calendarWithName("calendar1")], io
)
result = Component.fromString(io.getvalue())
@@ -396,7 +396,7 @@
io = StringIO()
yield exportToFile(
[(yield self.txn().calendarHomeWithUID("user02"))
- .calendarWithName("calendar1")], io
+ .calendarWithName("calendar1")], io
)
self.assertEquals(
Component.fromString(resultForUser2),
Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -209,7 +209,8 @@
# self.assertEquals(results["result"]["Capacity"], "40")
# self.assertEquals(results["result"]["Description"], "Test Description")
self.assertEquals(results["result"]["RecordName"], ["createdlocation01"])
- self.assertEquals(results["result"]["RealName"],
+ self.assertEquals(
+ results["result"]["RealName"],
"Created Location 01 %s %s" % (unichr(208), u"\ud83d\udca3"))
# self.assertEquals(results["result"]["Comment"], "Test Comment")
self.assertEquals(results["result"]["AutoScheduleMode"], u"acceptIfFree")
@@ -288,7 +289,8 @@
self._flush()
record = yield self.directory.recordWithUID("836B1B66-2E9A-4F46-8B1C-3DD6772C20B2")
- self.assertEquals(record.fullNames[0],
+ self.assertEquals(
+ record.fullNames[0],
u"Created Location 01 %s %s" % (unichr(208), u"\ud83d\udca3"))
self.assertNotEquals(record, None)
Modified: CalendarServer/trunk/calendarserver/tools/test/test_purge.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_purge.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/test/test_purge.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -383,7 +383,8 @@
self.assertTrue(";UNTIL=" not in str(comp))
yield self.commit()
- count = (yield PurgePrincipalService.purgeUIDs(self.storeUnderTest(), self.directory,
+ count = (yield PurgePrincipalService.purgeUIDs(
+ self.storeUnderTest(), self.directory,
(self.uid,), verbose=False, proxies=False))
self.assertEquals(count, 2) # 2 events
@@ -480,7 +481,7 @@
self.assertTrue(home.purging())
yield self.commit()
- #print len(work1), len(work2), len(work3), len(work4)
+ # print len(work1), len(work2), len(work3), len(work4)
if len(work1) + len(work2) + len(work3) + len(work4) == 0:
break
d = Deferred()
Modified: CalendarServer/trunk/calendarserver/tools/test/test_purge_old_events.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_purge_old_events.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/tools/test/test_purge_old_events.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -455,7 +455,8 @@
# Query for all old events
results = (yield txn.eventsOlderThan(cutoff))
- self.assertEquals(sorted(results),
+ self.assertEquals(
+ sorted(results),
sorted([
['home1', 'calendar1', 'old.ics', '1901-01-01 01:00:00'],
['home1', 'calendar1', 'oldattachment1.ics', '1901-01-01 01:00:00'],
@@ -673,7 +674,8 @@
# Create an addressbook and one CardDAV resource
abHome = (yield txn.addressbookHomeWithUID("home1", create=True))
abColl = (yield abHome.addressbookWithName("addressbook"))
- (yield abColl.createAddressBookObjectWithName("card1",
+ (yield abColl.createAddressBookObjectWithName(
+ "card1",
VCardComponent.fromString(VCARD_1)))
self.assertEquals(len((yield abColl.addressbookObjects())), 1)
@@ -686,7 +688,8 @@
(yield txn.commit())
# Purge home1 completely
- total = yield PurgePrincipalService.purgeUIDs(self._sqlCalendarStore, self.directory,
+ total = yield PurgePrincipalService.purgeUIDs(
+ self._sqlCalendarStore, self.directory,
("home1",), verbose=False, proxies=False)
# Wait for queue to process
Modified: CalendarServer/trunk/calendarserver/webadmin/landing.py
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/landing.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/calendarserver/webadmin/landing.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -65,11 +65,11 @@
# self._root = root
# self._principalCollections = principalCollections
- #from .config import ConfigurationResource
- #self.putChild(u"config", ConfigurationResource(configuration, principalCollections))
+ # from .config import ConfigurationResource
+ # self.putChild(u"config", ConfigurationResource(configuration, principalCollections))
- #from .principals import PrincipalsResource
- #self.putChild(u"principals", PrincipalsResource(directory, store, principalCollections))
+ # from .principals import PrincipalsResource
+ # self.putChild(u"principals", PrincipalsResource(directory, store, principalCollections))
# from .logs import LogsResource
# self.putChild(u"logs", LogsResource())
Modified: CalendarServer/trunk/conf/auth/generate_test_accounts.py
===================================================================
--- CalendarServer/trunk/conf/auth/generate_test_accounts.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/conf/auth/generate_test_accounts.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -96,618 +96,618 @@
if EXTRA_GROUPS:
members.update({
- GROUPGUIDS % 8: (
- USERGUIDS % 1,
- USERGUIDS % 2,
- USERGUIDS % 3,
- USERGUIDS % 4,
- USERGUIDS % 5,
- ),
- GROUPGUIDS % 9: (
- USERGUIDS % 1,
- USERGUIDS % 2,
- USERGUIDS % 3,
- USERGUIDS % 4,
- USERGUIDS % 5,
- USERGUIDS % 6,
- USERGUIDS % 7,
- USERGUIDS % 8,
- USERGUIDS % 9,
- USERGUIDS % 10,
- USERGUIDS % 11,
- USERGUIDS % 12,
- USERGUIDS % 13,
- USERGUIDS % 14,
- USERGUIDS % 15,
- USERGUIDS % 16,
- USERGUIDS % 17,
- USERGUIDS % 18,
- USERGUIDS % 19,
- USERGUIDS % 20,
- USERGUIDS % 21,
- USERGUIDS % 22,
- USERGUIDS % 23,
- USERGUIDS % 24,
- USERGUIDS % 25,
- USERGUIDS % 26,
- USERGUIDS % 27,
- USERGUIDS % 28,
- USERGUIDS % 29,
- USERGUIDS % 30,
- USERGUIDS % 31,
- USERGUIDS % 32,
- USERGUIDS % 33,
- USERGUIDS % 34,
- USERGUIDS % 35,
- USERGUIDS % 36,
- USERGUIDS % 37,
- USERGUIDS % 38,
- USERGUIDS % 39,
- USERGUIDS % 40,
- USERGUIDS % 41,
- USERGUIDS % 42,
- USERGUIDS % 43,
- USERGUIDS % 44,
- USERGUIDS % 45,
- USERGUIDS % 46,
- USERGUIDS % 47,
- USERGUIDS % 48,
- USERGUIDS % 49,
- USERGUIDS % 50,
- USERGUIDS % 51,
- USERGUIDS % 52,
- USERGUIDS % 53,
- USERGUIDS % 54,
- USERGUIDS % 55,
- USERGUIDS % 56,
- USERGUIDS % 57,
- USERGUIDS % 58,
- USERGUIDS % 59,
- USERGUIDS % 60,
- USERGUIDS % 61,
- USERGUIDS % 62,
- USERGUIDS % 63,
- USERGUIDS % 64,
- USERGUIDS % 65,
- USERGUIDS % 66,
- USERGUIDS % 67,
- USERGUIDS % 68,
- USERGUIDS % 69,
- USERGUIDS % 70,
- USERGUIDS % 71,
- USERGUIDS % 72,
- USERGUIDS % 73,
- USERGUIDS % 74,
- USERGUIDS % 75,
- USERGUIDS % 76,
- USERGUIDS % 77,
- USERGUIDS % 78,
- USERGUIDS % 79,
- USERGUIDS % 80,
- USERGUIDS % 81,
- USERGUIDS % 82,
- USERGUIDS % 83,
- USERGUIDS % 84,
- USERGUIDS % 85,
- USERGUIDS % 86,
- USERGUIDS % 87,
- USERGUIDS % 88,
- USERGUIDS % 89,
- USERGUIDS % 90,
- USERGUIDS % 91,
- USERGUIDS % 92,
- USERGUIDS % 93,
- USERGUIDS % 94,
- USERGUIDS % 95,
- USERGUIDS % 96,
- USERGUIDS % 97,
- USERGUIDS % 98,
- USERGUIDS % 99,
- USERGUIDS % 100,
- ),
- GROUPGUIDS % 10: (
- USERGUIDS % 1,
- USERGUIDS % 2,
- USERGUIDS % 3,
- USERGUIDS % 4,
- USERGUIDS % 5,
- USERGUIDS % 6,
- USERGUIDS % 7,
- USERGUIDS % 8,
- USERGUIDS % 9,
- USERGUIDS % 10,
- USERGUIDS % 11,
- USERGUIDS % 12,
- USERGUIDS % 13,
- USERGUIDS % 14,
- USERGUIDS % 15,
- USERGUIDS % 16,
- USERGUIDS % 17,
- USERGUIDS % 18,
- USERGUIDS % 19,
- USERGUIDS % 20,
- USERGUIDS % 21,
- USERGUIDS % 22,
- USERGUIDS % 23,
- USERGUIDS % 24,
- USERGUIDS % 25,
- USERGUIDS % 26,
- USERGUIDS % 27,
- USERGUIDS % 28,
- USERGUIDS % 29,
- USERGUIDS % 30,
- USERGUIDS % 31,
- USERGUIDS % 32,
- USERGUIDS % 33,
- USERGUIDS % 34,
- USERGUIDS % 35,
- USERGUIDS % 36,
- USERGUIDS % 37,
- USERGUIDS % 38,
- USERGUIDS % 39,
- USERGUIDS % 40,
- USERGUIDS % 41,
- USERGUIDS % 42,
- USERGUIDS % 43,
- USERGUIDS % 44,
- USERGUIDS % 45,
- USERGUIDS % 46,
- USERGUIDS % 47,
- USERGUIDS % 48,
- USERGUIDS % 49,
- USERGUIDS % 50,
- USERGUIDS % 51,
- USERGUIDS % 52,
- USERGUIDS % 53,
- USERGUIDS % 54,
- USERGUIDS % 55,
- USERGUIDS % 56,
- USERGUIDS % 57,
- USERGUIDS % 58,
- USERGUIDS % 59,
- USERGUIDS % 60,
- USERGUIDS % 61,
- USERGUIDS % 62,
- USERGUIDS % 63,
- USERGUIDS % 64,
- USERGUIDS % 65,
- USERGUIDS % 66,
- USERGUIDS % 67,
- USERGUIDS % 68,
- USERGUIDS % 69,
- USERGUIDS % 70,
- USERGUIDS % 71,
- USERGUIDS % 72,
- USERGUIDS % 73,
- USERGUIDS % 74,
- USERGUIDS % 75,
- USERGUIDS % 76,
- USERGUIDS % 77,
- USERGUIDS % 78,
- USERGUIDS % 79,
- USERGUIDS % 80,
- USERGUIDS % 81,
- USERGUIDS % 82,
- USERGUIDS % 83,
- USERGUIDS % 84,
- USERGUIDS % 85,
- USERGUIDS % 86,
- USERGUIDS % 87,
- USERGUIDS % 88,
- USERGUIDS % 89,
- USERGUIDS % 90,
- USERGUIDS % 91,
- USERGUIDS % 92,
- USERGUIDS % 93,
- USERGUIDS % 94,
- USERGUIDS % 95,
- USERGUIDS % 96,
- USERGUIDS % 97,
- USERGUIDS % 98,
- USERGUIDS % 99,
- USERGUIDS % 100,
- USERGUIDS % 101,
- USERGUIDS % 102,
- USERGUIDS % 103,
- USERGUIDS % 104,
- USERGUIDS % 105,
- USERGUIDS % 106,
- USERGUIDS % 107,
- USERGUIDS % 108,
- USERGUIDS % 109,
- USERGUIDS % 110,
- USERGUIDS % 111,
- USERGUIDS % 112,
- USERGUIDS % 113,
- USERGUIDS % 114,
- USERGUIDS % 115,
- USERGUIDS % 116,
- USERGUIDS % 117,
- USERGUIDS % 118,
- USERGUIDS % 119,
- USERGUIDS % 120,
- USERGUIDS % 121,
- USERGUIDS % 122,
- USERGUIDS % 123,
- USERGUIDS % 124,
- USERGUIDS % 125,
- USERGUIDS % 126,
- USERGUIDS % 127,
- USERGUIDS % 128,
- USERGUIDS % 129,
- USERGUIDS % 130,
- USERGUIDS % 131,
- USERGUIDS % 132,
- USERGUIDS % 133,
- USERGUIDS % 134,
- USERGUIDS % 135,
- USERGUIDS % 136,
- USERGUIDS % 137,
- USERGUIDS % 138,
- USERGUIDS % 139,
- USERGUIDS % 140,
- USERGUIDS % 141,
- USERGUIDS % 142,
- USERGUIDS % 143,
- USERGUIDS % 144,
- USERGUIDS % 145,
- USERGUIDS % 146,
- USERGUIDS % 147,
- USERGUIDS % 148,
- USERGUIDS % 149,
- USERGUIDS % 150,
- USERGUIDS % 151,
- USERGUIDS % 152,
- USERGUIDS % 153,
- USERGUIDS % 154,
- USERGUIDS % 155,
- USERGUIDS % 156,
- USERGUIDS % 157,
- USERGUIDS % 158,
- USERGUIDS % 159,
- USERGUIDS % 160,
- USERGUIDS % 161,
- USERGUIDS % 162,
- USERGUIDS % 163,
- USERGUIDS % 164,
- USERGUIDS % 165,
- USERGUIDS % 166,
- USERGUIDS % 167,
- USERGUIDS % 168,
- USERGUIDS % 169,
- USERGUIDS % 170,
- USERGUIDS % 171,
- USERGUIDS % 172,
- USERGUIDS % 173,
- USERGUIDS % 174,
- USERGUIDS % 175,
- USERGUIDS % 176,
- USERGUIDS % 177,
- USERGUIDS % 178,
- USERGUIDS % 179,
- USERGUIDS % 180,
- USERGUIDS % 181,
- USERGUIDS % 182,
- USERGUIDS % 183,
- USERGUIDS % 184,
- USERGUIDS % 185,
- USERGUIDS % 186,
- USERGUIDS % 187,
- USERGUIDS % 188,
- USERGUIDS % 189,
- USERGUIDS % 190,
- USERGUIDS % 191,
- USERGUIDS % 192,
- USERGUIDS % 193,
- USERGUIDS % 194,
- USERGUIDS % 195,
- USERGUIDS % 196,
- USERGUIDS % 197,
- USERGUIDS % 198,
- USERGUIDS % 199,
- USERGUIDS % 200,
- USERGUIDS % 201,
- USERGUIDS % 202,
- USERGUIDS % 203,
- USERGUIDS % 204,
- USERGUIDS % 205,
- USERGUIDS % 206,
- USERGUIDS % 207,
- USERGUIDS % 208,
- USERGUIDS % 209,
- USERGUIDS % 210,
- USERGUIDS % 211,
- USERGUIDS % 212,
- USERGUIDS % 213,
- USERGUIDS % 214,
- USERGUIDS % 215,
- USERGUIDS % 216,
- USERGUIDS % 217,
- USERGUIDS % 218,
- USERGUIDS % 219,
- USERGUIDS % 220,
- USERGUIDS % 221,
- USERGUIDS % 222,
- USERGUIDS % 223,
- USERGUIDS % 224,
- USERGUIDS % 225,
- USERGUIDS % 226,
- USERGUIDS % 227,
- USERGUIDS % 228,
- USERGUIDS % 229,
- USERGUIDS % 230,
- USERGUIDS % 231,
- USERGUIDS % 232,
- USERGUIDS % 233,
- USERGUIDS % 234,
- USERGUIDS % 235,
- USERGUIDS % 236,
- USERGUIDS % 237,
- USERGUIDS % 238,
- USERGUIDS % 239,
- USERGUIDS % 240,
- USERGUIDS % 241,
- USERGUIDS % 242,
- USERGUIDS % 243,
- USERGUIDS % 244,
- USERGUIDS % 245,
- USERGUIDS % 246,
- USERGUIDS % 247,
- USERGUIDS % 248,
- USERGUIDS % 249,
- USERGUIDS % 250,
- USERGUIDS % 251,
- USERGUIDS % 252,
- USERGUIDS % 253,
- USERGUIDS % 254,
- USERGUIDS % 255,
- USERGUIDS % 256,
- USERGUIDS % 257,
- USERGUIDS % 258,
- USERGUIDS % 259,
- USERGUIDS % 260,
- USERGUIDS % 261,
- USERGUIDS % 262,
- USERGUIDS % 263,
- USERGUIDS % 264,
- USERGUIDS % 265,
- USERGUIDS % 266,
- USERGUIDS % 267,
- USERGUIDS % 268,
- USERGUIDS % 269,
- USERGUIDS % 270,
- USERGUIDS % 271,
- USERGUIDS % 272,
- USERGUIDS % 273,
- USERGUIDS % 274,
- USERGUIDS % 275,
- USERGUIDS % 276,
- USERGUIDS % 277,
- USERGUIDS % 278,
- USERGUIDS % 279,
- USERGUIDS % 280,
- USERGUIDS % 281,
- USERGUIDS % 282,
- USERGUIDS % 283,
- USERGUIDS % 284,
- USERGUIDS % 285,
- USERGUIDS % 286,
- USERGUIDS % 287,
- USERGUIDS % 288,
- USERGUIDS % 289,
- USERGUIDS % 290,
- USERGUIDS % 291,
- USERGUIDS % 292,
- USERGUIDS % 293,
- USERGUIDS % 294,
- USERGUIDS % 295,
- USERGUIDS % 296,
- USERGUIDS % 297,
- USERGUIDS % 298,
- USERGUIDS % 299,
- USERGUIDS % 300,
- USERGUIDS % 301,
- USERGUIDS % 302,
- USERGUIDS % 303,
- USERGUIDS % 304,
- USERGUIDS % 305,
- USERGUIDS % 306,
- USERGUIDS % 307,
- USERGUIDS % 308,
- USERGUIDS % 309,
- USERGUIDS % 310,
- USERGUIDS % 311,
- USERGUIDS % 312,
- USERGUIDS % 313,
- USERGUIDS % 314,
- USERGUIDS % 315,
- USERGUIDS % 316,
- USERGUIDS % 317,
- USERGUIDS % 318,
- USERGUIDS % 319,
- USERGUIDS % 320,
- USERGUIDS % 321,
- USERGUIDS % 322,
- USERGUIDS % 323,
- USERGUIDS % 324,
- USERGUIDS % 325,
- USERGUIDS % 326,
- USERGUIDS % 327,
- USERGUIDS % 328,
- USERGUIDS % 329,
- USERGUIDS % 330,
- USERGUIDS % 331,
- USERGUIDS % 332,
- USERGUIDS % 333,
- USERGUIDS % 334,
- USERGUIDS % 335,
- USERGUIDS % 336,
- USERGUIDS % 337,
- USERGUIDS % 338,
- USERGUIDS % 339,
- USERGUIDS % 340,
- USERGUIDS % 341,
- USERGUIDS % 342,
- USERGUIDS % 343,
- USERGUIDS % 344,
- USERGUIDS % 345,
- USERGUIDS % 346,
- USERGUIDS % 347,
- USERGUIDS % 348,
- USERGUIDS % 349,
- USERGUIDS % 350,
- USERGUIDS % 351,
- USERGUIDS % 352,
- USERGUIDS % 353,
- USERGUIDS % 354,
- USERGUIDS % 355,
- USERGUIDS % 356,
- USERGUIDS % 357,
- USERGUIDS % 358,
- USERGUIDS % 359,
- USERGUIDS % 360,
- USERGUIDS % 361,
- USERGUIDS % 362,
- USERGUIDS % 363,
- USERGUIDS % 364,
- USERGUIDS % 365,
- USERGUIDS % 366,
- USERGUIDS % 367,
- USERGUIDS % 368,
- USERGUIDS % 369,
- USERGUIDS % 370,
- USERGUIDS % 371,
- USERGUIDS % 372,
- USERGUIDS % 373,
- USERGUIDS % 374,
- USERGUIDS % 375,
- USERGUIDS % 376,
- USERGUIDS % 377,
- USERGUIDS % 378,
- USERGUIDS % 379,
- USERGUIDS % 380,
- USERGUIDS % 381,
- USERGUIDS % 382,
- USERGUIDS % 383,
- USERGUIDS % 384,
- USERGUIDS % 385,
- USERGUIDS % 386,
- USERGUIDS % 387,
- USERGUIDS % 388,
- USERGUIDS % 389,
- USERGUIDS % 390,
- USERGUIDS % 391,
- USERGUIDS % 392,
- USERGUIDS % 393,
- USERGUIDS % 394,
- USERGUIDS % 395,
- USERGUIDS % 396,
- USERGUIDS % 397,
- USERGUIDS % 398,
- USERGUIDS % 399,
- USERGUIDS % 400,
- USERGUIDS % 401,
- USERGUIDS % 402,
- USERGUIDS % 403,
- USERGUIDS % 404,
- USERGUIDS % 405,
- USERGUIDS % 406,
- USERGUIDS % 407,
- USERGUIDS % 408,
- USERGUIDS % 409,
- USERGUIDS % 410,
- USERGUIDS % 411,
- USERGUIDS % 412,
- USERGUIDS % 413,
- USERGUIDS % 414,
- USERGUIDS % 415,
- USERGUIDS % 416,
- USERGUIDS % 417,
- USERGUIDS % 418,
- USERGUIDS % 419,
- USERGUIDS % 420,
- USERGUIDS % 421,
- USERGUIDS % 422,
- USERGUIDS % 423,
- USERGUIDS % 424,
- USERGUIDS % 425,
- USERGUIDS % 426,
- USERGUIDS % 427,
- USERGUIDS % 428,
- USERGUIDS % 429,
- USERGUIDS % 430,
- USERGUIDS % 431,
- USERGUIDS % 432,
- USERGUIDS % 433,
- USERGUIDS % 434,
- USERGUIDS % 435,
- USERGUIDS % 436,
- USERGUIDS % 437,
- USERGUIDS % 438,
- USERGUIDS % 439,
- USERGUIDS % 440,
- USERGUIDS % 441,
- USERGUIDS % 442,
- USERGUIDS % 443,
- USERGUIDS % 444,
- USERGUIDS % 445,
- USERGUIDS % 446,
- USERGUIDS % 447,
- USERGUIDS % 448,
- USERGUIDS % 449,
- USERGUIDS % 450,
- USERGUIDS % 451,
- USERGUIDS % 452,
- USERGUIDS % 453,
- USERGUIDS % 454,
- USERGUIDS % 455,
- USERGUIDS % 456,
- USERGUIDS % 457,
- USERGUIDS % 458,
- USERGUIDS % 459,
- USERGUIDS % 460,
- USERGUIDS % 461,
- USERGUIDS % 462,
- USERGUIDS % 463,
- USERGUIDS % 464,
- USERGUIDS % 465,
- USERGUIDS % 466,
- USERGUIDS % 467,
- USERGUIDS % 468,
- USERGUIDS % 469,
- USERGUIDS % 470,
- USERGUIDS % 471,
- USERGUIDS % 472,
- USERGUIDS % 473,
- USERGUIDS % 474,
- USERGUIDS % 475,
- USERGUIDS % 476,
- USERGUIDS % 477,
- USERGUIDS % 478,
- USERGUIDS % 479,
- USERGUIDS % 480,
- USERGUIDS % 481,
- USERGUIDS % 482,
- USERGUIDS % 483,
- USERGUIDS % 484,
- USERGUIDS % 485,
- USERGUIDS % 486,
- USERGUIDS % 487,
- USERGUIDS % 488,
- USERGUIDS % 489,
- USERGUIDS % 490,
- USERGUIDS % 491,
- USERGUIDS % 492,
- USERGUIDS % 493,
- USERGUIDS % 494,
- USERGUIDS % 495,
- USERGUIDS % 496,
- USERGUIDS % 497,
- USERGUIDS % 498,
- USERGUIDS % 499,
- USERGUIDS % 500,
- ),
-})
+ GROUPGUIDS % 8: (
+ USERGUIDS % 1,
+ USERGUIDS % 2,
+ USERGUIDS % 3,
+ USERGUIDS % 4,
+ USERGUIDS % 5,
+ ),
+ GROUPGUIDS % 9: (
+ USERGUIDS % 1,
+ USERGUIDS % 2,
+ USERGUIDS % 3,
+ USERGUIDS % 4,
+ USERGUIDS % 5,
+ USERGUIDS % 6,
+ USERGUIDS % 7,
+ USERGUIDS % 8,
+ USERGUIDS % 9,
+ USERGUIDS % 10,
+ USERGUIDS % 11,
+ USERGUIDS % 12,
+ USERGUIDS % 13,
+ USERGUIDS % 14,
+ USERGUIDS % 15,
+ USERGUIDS % 16,
+ USERGUIDS % 17,
+ USERGUIDS % 18,
+ USERGUIDS % 19,
+ USERGUIDS % 20,
+ USERGUIDS % 21,
+ USERGUIDS % 22,
+ USERGUIDS % 23,
+ USERGUIDS % 24,
+ USERGUIDS % 25,
+ USERGUIDS % 26,
+ USERGUIDS % 27,
+ USERGUIDS % 28,
+ USERGUIDS % 29,
+ USERGUIDS % 30,
+ USERGUIDS % 31,
+ USERGUIDS % 32,
+ USERGUIDS % 33,
+ USERGUIDS % 34,
+ USERGUIDS % 35,
+ USERGUIDS % 36,
+ USERGUIDS % 37,
+ USERGUIDS % 38,
+ USERGUIDS % 39,
+ USERGUIDS % 40,
+ USERGUIDS % 41,
+ USERGUIDS % 42,
+ USERGUIDS % 43,
+ USERGUIDS % 44,
+ USERGUIDS % 45,
+ USERGUIDS % 46,
+ USERGUIDS % 47,
+ USERGUIDS % 48,
+ USERGUIDS % 49,
+ USERGUIDS % 50,
+ USERGUIDS % 51,
+ USERGUIDS % 52,
+ USERGUIDS % 53,
+ USERGUIDS % 54,
+ USERGUIDS % 55,
+ USERGUIDS % 56,
+ USERGUIDS % 57,
+ USERGUIDS % 58,
+ USERGUIDS % 59,
+ USERGUIDS % 60,
+ USERGUIDS % 61,
+ USERGUIDS % 62,
+ USERGUIDS % 63,
+ USERGUIDS % 64,
+ USERGUIDS % 65,
+ USERGUIDS % 66,
+ USERGUIDS % 67,
+ USERGUIDS % 68,
+ USERGUIDS % 69,
+ USERGUIDS % 70,
+ USERGUIDS % 71,
+ USERGUIDS % 72,
+ USERGUIDS % 73,
+ USERGUIDS % 74,
+ USERGUIDS % 75,
+ USERGUIDS % 76,
+ USERGUIDS % 77,
+ USERGUIDS % 78,
+ USERGUIDS % 79,
+ USERGUIDS % 80,
+ USERGUIDS % 81,
+ USERGUIDS % 82,
+ USERGUIDS % 83,
+ USERGUIDS % 84,
+ USERGUIDS % 85,
+ USERGUIDS % 86,
+ USERGUIDS % 87,
+ USERGUIDS % 88,
+ USERGUIDS % 89,
+ USERGUIDS % 90,
+ USERGUIDS % 91,
+ USERGUIDS % 92,
+ USERGUIDS % 93,
+ USERGUIDS % 94,
+ USERGUIDS % 95,
+ USERGUIDS % 96,
+ USERGUIDS % 97,
+ USERGUIDS % 98,
+ USERGUIDS % 99,
+ USERGUIDS % 100,
+ ),
+ GROUPGUIDS % 10: (
+ USERGUIDS % 1,
+ USERGUIDS % 2,
+ USERGUIDS % 3,
+ USERGUIDS % 4,
+ USERGUIDS % 5,
+ USERGUIDS % 6,
+ USERGUIDS % 7,
+ USERGUIDS % 8,
+ USERGUIDS % 9,
+ USERGUIDS % 10,
+ USERGUIDS % 11,
+ USERGUIDS % 12,
+ USERGUIDS % 13,
+ USERGUIDS % 14,
+ USERGUIDS % 15,
+ USERGUIDS % 16,
+ USERGUIDS % 17,
+ USERGUIDS % 18,
+ USERGUIDS % 19,
+ USERGUIDS % 20,
+ USERGUIDS % 21,
+ USERGUIDS % 22,
+ USERGUIDS % 23,
+ USERGUIDS % 24,
+ USERGUIDS % 25,
+ USERGUIDS % 26,
+ USERGUIDS % 27,
+ USERGUIDS % 28,
+ USERGUIDS % 29,
+ USERGUIDS % 30,
+ USERGUIDS % 31,
+ USERGUIDS % 32,
+ USERGUIDS % 33,
+ USERGUIDS % 34,
+ USERGUIDS % 35,
+ USERGUIDS % 36,
+ USERGUIDS % 37,
+ USERGUIDS % 38,
+ USERGUIDS % 39,
+ USERGUIDS % 40,
+ USERGUIDS % 41,
+ USERGUIDS % 42,
+ USERGUIDS % 43,
+ USERGUIDS % 44,
+ USERGUIDS % 45,
+ USERGUIDS % 46,
+ USERGUIDS % 47,
+ USERGUIDS % 48,
+ USERGUIDS % 49,
+ USERGUIDS % 50,
+ USERGUIDS % 51,
+ USERGUIDS % 52,
+ USERGUIDS % 53,
+ USERGUIDS % 54,
+ USERGUIDS % 55,
+ USERGUIDS % 56,
+ USERGUIDS % 57,
+ USERGUIDS % 58,
+ USERGUIDS % 59,
+ USERGUIDS % 60,
+ USERGUIDS % 61,
+ USERGUIDS % 62,
+ USERGUIDS % 63,
+ USERGUIDS % 64,
+ USERGUIDS % 65,
+ USERGUIDS % 66,
+ USERGUIDS % 67,
+ USERGUIDS % 68,
+ USERGUIDS % 69,
+ USERGUIDS % 70,
+ USERGUIDS % 71,
+ USERGUIDS % 72,
+ USERGUIDS % 73,
+ USERGUIDS % 74,
+ USERGUIDS % 75,
+ USERGUIDS % 76,
+ USERGUIDS % 77,
+ USERGUIDS % 78,
+ USERGUIDS % 79,
+ USERGUIDS % 80,
+ USERGUIDS % 81,
+ USERGUIDS % 82,
+ USERGUIDS % 83,
+ USERGUIDS % 84,
+ USERGUIDS % 85,
+ USERGUIDS % 86,
+ USERGUIDS % 87,
+ USERGUIDS % 88,
+ USERGUIDS % 89,
+ USERGUIDS % 90,
+ USERGUIDS % 91,
+ USERGUIDS % 92,
+ USERGUIDS % 93,
+ USERGUIDS % 94,
+ USERGUIDS % 95,
+ USERGUIDS % 96,
+ USERGUIDS % 97,
+ USERGUIDS % 98,
+ USERGUIDS % 99,
+ USERGUIDS % 100,
+ USERGUIDS % 101,
+ USERGUIDS % 102,
+ USERGUIDS % 103,
+ USERGUIDS % 104,
+ USERGUIDS % 105,
+ USERGUIDS % 106,
+ USERGUIDS % 107,
+ USERGUIDS % 108,
+ USERGUIDS % 109,
+ USERGUIDS % 110,
+ USERGUIDS % 111,
+ USERGUIDS % 112,
+ USERGUIDS % 113,
+ USERGUIDS % 114,
+ USERGUIDS % 115,
+ USERGUIDS % 116,
+ USERGUIDS % 117,
+ USERGUIDS % 118,
+ USERGUIDS % 119,
+ USERGUIDS % 120,
+ USERGUIDS % 121,
+ USERGUIDS % 122,
+ USERGUIDS % 123,
+ USERGUIDS % 124,
+ USERGUIDS % 125,
+ USERGUIDS % 126,
+ USERGUIDS % 127,
+ USERGUIDS % 128,
+ USERGUIDS % 129,
+ USERGUIDS % 130,
+ USERGUIDS % 131,
+ USERGUIDS % 132,
+ USERGUIDS % 133,
+ USERGUIDS % 134,
+ USERGUIDS % 135,
+ USERGUIDS % 136,
+ USERGUIDS % 137,
+ USERGUIDS % 138,
+ USERGUIDS % 139,
+ USERGUIDS % 140,
+ USERGUIDS % 141,
+ USERGUIDS % 142,
+ USERGUIDS % 143,
+ USERGUIDS % 144,
+ USERGUIDS % 145,
+ USERGUIDS % 146,
+ USERGUIDS % 147,
+ USERGUIDS % 148,
+ USERGUIDS % 149,
+ USERGUIDS % 150,
+ USERGUIDS % 151,
+ USERGUIDS % 152,
+ USERGUIDS % 153,
+ USERGUIDS % 154,
+ USERGUIDS % 155,
+ USERGUIDS % 156,
+ USERGUIDS % 157,
+ USERGUIDS % 158,
+ USERGUIDS % 159,
+ USERGUIDS % 160,
+ USERGUIDS % 161,
+ USERGUIDS % 162,
+ USERGUIDS % 163,
+ USERGUIDS % 164,
+ USERGUIDS % 165,
+ USERGUIDS % 166,
+ USERGUIDS % 167,
+ USERGUIDS % 168,
+ USERGUIDS % 169,
+ USERGUIDS % 170,
+ USERGUIDS % 171,
+ USERGUIDS % 172,
+ USERGUIDS % 173,
+ USERGUIDS % 174,
+ USERGUIDS % 175,
+ USERGUIDS % 176,
+ USERGUIDS % 177,
+ USERGUIDS % 178,
+ USERGUIDS % 179,
+ USERGUIDS % 180,
+ USERGUIDS % 181,
+ USERGUIDS % 182,
+ USERGUIDS % 183,
+ USERGUIDS % 184,
+ USERGUIDS % 185,
+ USERGUIDS % 186,
+ USERGUIDS % 187,
+ USERGUIDS % 188,
+ USERGUIDS % 189,
+ USERGUIDS % 190,
+ USERGUIDS % 191,
+ USERGUIDS % 192,
+ USERGUIDS % 193,
+ USERGUIDS % 194,
+ USERGUIDS % 195,
+ USERGUIDS % 196,
+ USERGUIDS % 197,
+ USERGUIDS % 198,
+ USERGUIDS % 199,
+ USERGUIDS % 200,
+ USERGUIDS % 201,
+ USERGUIDS % 202,
+ USERGUIDS % 203,
+ USERGUIDS % 204,
+ USERGUIDS % 205,
+ USERGUIDS % 206,
+ USERGUIDS % 207,
+ USERGUIDS % 208,
+ USERGUIDS % 209,
+ USERGUIDS % 210,
+ USERGUIDS % 211,
+ USERGUIDS % 212,
+ USERGUIDS % 213,
+ USERGUIDS % 214,
+ USERGUIDS % 215,
+ USERGUIDS % 216,
+ USERGUIDS % 217,
+ USERGUIDS % 218,
+ USERGUIDS % 219,
+ USERGUIDS % 220,
+ USERGUIDS % 221,
+ USERGUIDS % 222,
+ USERGUIDS % 223,
+ USERGUIDS % 224,
+ USERGUIDS % 225,
+ USERGUIDS % 226,
+ USERGUIDS % 227,
+ USERGUIDS % 228,
+ USERGUIDS % 229,
+ USERGUIDS % 230,
+ USERGUIDS % 231,
+ USERGUIDS % 232,
+ USERGUIDS % 233,
+ USERGUIDS % 234,
+ USERGUIDS % 235,
+ USERGUIDS % 236,
+ USERGUIDS % 237,
+ USERGUIDS % 238,
+ USERGUIDS % 239,
+ USERGUIDS % 240,
+ USERGUIDS % 241,
+ USERGUIDS % 242,
+ USERGUIDS % 243,
+ USERGUIDS % 244,
+ USERGUIDS % 245,
+ USERGUIDS % 246,
+ USERGUIDS % 247,
+ USERGUIDS % 248,
+ USERGUIDS % 249,
+ USERGUIDS % 250,
+ USERGUIDS % 251,
+ USERGUIDS % 252,
+ USERGUIDS % 253,
+ USERGUIDS % 254,
+ USERGUIDS % 255,
+ USERGUIDS % 256,
+ USERGUIDS % 257,
+ USERGUIDS % 258,
+ USERGUIDS % 259,
+ USERGUIDS % 260,
+ USERGUIDS % 261,
+ USERGUIDS % 262,
+ USERGUIDS % 263,
+ USERGUIDS % 264,
+ USERGUIDS % 265,
+ USERGUIDS % 266,
+ USERGUIDS % 267,
+ USERGUIDS % 268,
+ USERGUIDS % 269,
+ USERGUIDS % 270,
+ USERGUIDS % 271,
+ USERGUIDS % 272,
+ USERGUIDS % 273,
+ USERGUIDS % 274,
+ USERGUIDS % 275,
+ USERGUIDS % 276,
+ USERGUIDS % 277,
+ USERGUIDS % 278,
+ USERGUIDS % 279,
+ USERGUIDS % 280,
+ USERGUIDS % 281,
+ USERGUIDS % 282,
+ USERGUIDS % 283,
+ USERGUIDS % 284,
+ USERGUIDS % 285,
+ USERGUIDS % 286,
+ USERGUIDS % 287,
+ USERGUIDS % 288,
+ USERGUIDS % 289,
+ USERGUIDS % 290,
+ USERGUIDS % 291,
+ USERGUIDS % 292,
+ USERGUIDS % 293,
+ USERGUIDS % 294,
+ USERGUIDS % 295,
+ USERGUIDS % 296,
+ USERGUIDS % 297,
+ USERGUIDS % 298,
+ USERGUIDS % 299,
+ USERGUIDS % 300,
+ USERGUIDS % 301,
+ USERGUIDS % 302,
+ USERGUIDS % 303,
+ USERGUIDS % 304,
+ USERGUIDS % 305,
+ USERGUIDS % 306,
+ USERGUIDS % 307,
+ USERGUIDS % 308,
+ USERGUIDS % 309,
+ USERGUIDS % 310,
+ USERGUIDS % 311,
+ USERGUIDS % 312,
+ USERGUIDS % 313,
+ USERGUIDS % 314,
+ USERGUIDS % 315,
+ USERGUIDS % 316,
+ USERGUIDS % 317,
+ USERGUIDS % 318,
+ USERGUIDS % 319,
+ USERGUIDS % 320,
+ USERGUIDS % 321,
+ USERGUIDS % 322,
+ USERGUIDS % 323,
+ USERGUIDS % 324,
+ USERGUIDS % 325,
+ USERGUIDS % 326,
+ USERGUIDS % 327,
+ USERGUIDS % 328,
+ USERGUIDS % 329,
+ USERGUIDS % 330,
+ USERGUIDS % 331,
+ USERGUIDS % 332,
+ USERGUIDS % 333,
+ USERGUIDS % 334,
+ USERGUIDS % 335,
+ USERGUIDS % 336,
+ USERGUIDS % 337,
+ USERGUIDS % 338,
+ USERGUIDS % 339,
+ USERGUIDS % 340,
+ USERGUIDS % 341,
+ USERGUIDS % 342,
+ USERGUIDS % 343,
+ USERGUIDS % 344,
+ USERGUIDS % 345,
+ USERGUIDS % 346,
+ USERGUIDS % 347,
+ USERGUIDS % 348,
+ USERGUIDS % 349,
+ USERGUIDS % 350,
+ USERGUIDS % 351,
+ USERGUIDS % 352,
+ USERGUIDS % 353,
+ USERGUIDS % 354,
+ USERGUIDS % 355,
+ USERGUIDS % 356,
+ USERGUIDS % 357,
+ USERGUIDS % 358,
+ USERGUIDS % 359,
+ USERGUIDS % 360,
+ USERGUIDS % 361,
+ USERGUIDS % 362,
+ USERGUIDS % 363,
+ USERGUIDS % 364,
+ USERGUIDS % 365,
+ USERGUIDS % 366,
+ USERGUIDS % 367,
+ USERGUIDS % 368,
+ USERGUIDS % 369,
+ USERGUIDS % 370,
+ USERGUIDS % 371,
+ USERGUIDS % 372,
+ USERGUIDS % 373,
+ USERGUIDS % 374,
+ USERGUIDS % 375,
+ USERGUIDS % 376,
+ USERGUIDS % 377,
+ USERGUIDS % 378,
+ USERGUIDS % 379,
+ USERGUIDS % 380,
+ USERGUIDS % 381,
+ USERGUIDS % 382,
+ USERGUIDS % 383,
+ USERGUIDS % 384,
+ USERGUIDS % 385,
+ USERGUIDS % 386,
+ USERGUIDS % 387,
+ USERGUIDS % 388,
+ USERGUIDS % 389,
+ USERGUIDS % 390,
+ USERGUIDS % 391,
+ USERGUIDS % 392,
+ USERGUIDS % 393,
+ USERGUIDS % 394,
+ USERGUIDS % 395,
+ USERGUIDS % 396,
+ USERGUIDS % 397,
+ USERGUIDS % 398,
+ USERGUIDS % 399,
+ USERGUIDS % 400,
+ USERGUIDS % 401,
+ USERGUIDS % 402,
+ USERGUIDS % 403,
+ USERGUIDS % 404,
+ USERGUIDS % 405,
+ USERGUIDS % 406,
+ USERGUIDS % 407,
+ USERGUIDS % 408,
+ USERGUIDS % 409,
+ USERGUIDS % 410,
+ USERGUIDS % 411,
+ USERGUIDS % 412,
+ USERGUIDS % 413,
+ USERGUIDS % 414,
+ USERGUIDS % 415,
+ USERGUIDS % 416,
+ USERGUIDS % 417,
+ USERGUIDS % 418,
+ USERGUIDS % 419,
+ USERGUIDS % 420,
+ USERGUIDS % 421,
+ USERGUIDS % 422,
+ USERGUIDS % 423,
+ USERGUIDS % 424,
+ USERGUIDS % 425,
+ USERGUIDS % 426,
+ USERGUIDS % 427,
+ USERGUIDS % 428,
+ USERGUIDS % 429,
+ USERGUIDS % 430,
+ USERGUIDS % 431,
+ USERGUIDS % 432,
+ USERGUIDS % 433,
+ USERGUIDS % 434,
+ USERGUIDS % 435,
+ USERGUIDS % 436,
+ USERGUIDS % 437,
+ USERGUIDS % 438,
+ USERGUIDS % 439,
+ USERGUIDS % 440,
+ USERGUIDS % 441,
+ USERGUIDS % 442,
+ USERGUIDS % 443,
+ USERGUIDS % 444,
+ USERGUIDS % 445,
+ USERGUIDS % 446,
+ USERGUIDS % 447,
+ USERGUIDS % 448,
+ USERGUIDS % 449,
+ USERGUIDS % 450,
+ USERGUIDS % 451,
+ USERGUIDS % 452,
+ USERGUIDS % 453,
+ USERGUIDS % 454,
+ USERGUIDS % 455,
+ USERGUIDS % 456,
+ USERGUIDS % 457,
+ USERGUIDS % 458,
+ USERGUIDS % 459,
+ USERGUIDS % 460,
+ USERGUIDS % 461,
+ USERGUIDS % 462,
+ USERGUIDS % 463,
+ USERGUIDS % 464,
+ USERGUIDS % 465,
+ USERGUIDS % 466,
+ USERGUIDS % 467,
+ USERGUIDS % 468,
+ USERGUIDS % 469,
+ USERGUIDS % 470,
+ USERGUIDS % 471,
+ USERGUIDS % 472,
+ USERGUIDS % 473,
+ USERGUIDS % 474,
+ USERGUIDS % 475,
+ USERGUIDS % 476,
+ USERGUIDS % 477,
+ USERGUIDS % 478,
+ USERGUIDS % 479,
+ USERGUIDS % 480,
+ USERGUIDS % 481,
+ USERGUIDS % 482,
+ USERGUIDS % 483,
+ USERGUIDS % 484,
+ USERGUIDS % 485,
+ USERGUIDS % 486,
+ USERGUIDS % 487,
+ USERGUIDS % 488,
+ USERGUIDS % 489,
+ USERGUIDS % 490,
+ USERGUIDS % 491,
+ USERGUIDS % 492,
+ USERGUIDS % 493,
+ USERGUIDS % 494,
+ USERGUIDS % 495,
+ USERGUIDS % 496,
+ USERGUIDS % 497,
+ USERGUIDS % 498,
+ USERGUIDS % 499,
+ USERGUIDS % 500,
+ ),
+ })
for i in xrange(1, 101):
Modified: CalendarServer/trunk/contrib/od/dsattributes.py
===================================================================
--- CalendarServer/trunk/contrib/od/dsattributes.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/od/dsattributes.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -1,4 +1,4 @@
-##
+# #
# Copyright (c) 2006-2014 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,7 +12,7 @@
# 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.
-##
+# #
"""
Record types and attribute names from Directory Service.
@@ -21,22 +21,22 @@
# Specific match types
-eDSExact = 0x2001
-eDSStartsWith = 0x2002
-eDSEndsWith = 0x2003
-eDSContains = 0x2004
+eDSExact = 0x2001
+eDSStartsWith = 0x2002
+eDSEndsWith = 0x2003
+eDSContains = 0x2004
-eDSLessThan = 0x2005
-eDSGreaterThan = 0x2006
-eDSLessEqual = 0x2007
-eDSGreaterEqual = 0x2008
+eDSLessThan = 0x2005
+eDSGreaterThan = 0x2006
+eDSLessEqual = 0x2007
+eDSGreaterEqual = 0x2008
# Specific Record Type Constants
"""
DirectoryService Specific Record Type Constants
"""
-
+
"""
kDSStdRecordTypeAccessControls
Record type that contains directory access control directives.
@@ -129,7 +129,7 @@
"""
kDSStdRecordTypeFileMakerServers
- FileMaker servers record type. Describes available FileMaker servers,
+ FileMaker servers record type. Describes available FileMaker servers,
used for service discovery.
"""
kDSStdRecordTypeFileMakerServers = "dsRecTypeStandard:FileMakerServers"
@@ -392,15 +392,15 @@
eDSNxxxxxx Multi-Valued Attribute
- NOTE #1: Access controls may prevent any particular client from reading/writting
+ NOTE #1: Access controls may prevent any particular client from reading/writing
various attribute types. In addition some attribute types may not be stored at
all and could also represent "real-time" data generated by the directory node
plug-in.
NOTE #2: Attributes in the model are available for records and directory nodes.
"""
-
+
# Single Valued Specific Attribute Type Constants
@@ -458,7 +458,7 @@
"""
kDS1AttrBootFile
- Attribute type in host or machine records for the name of the
+ Attribute type in host or machine records for the name of the
kernel that this machine will use by default when NetBooting.
"""
kDS1AttrBootFile = "dsAttrTypeStandard:BootFile"
@@ -480,8 +480,8 @@
"""
kDS1AttrCapacity
- Attribute type for the capacity of a resource.
- found in resource records (kDSStdRecordTypeResources).
+ Attribute type for the capacity of a resource.
+ found in resource records (kDSStdRecordTypeResources).
Example: 50
"""
kDS1AttrCapacity = "dsAttrTypeStandard:Capacity"
@@ -514,14 +514,14 @@
"""
kDS1AttrContactGUID
- Attribute type for the contact GUID of a group.
- found in group records (kDSStdRecordTypeGroups).
+ Attribute type for the contact GUID of a group.
+ found in group records (kDSStdRecordTypeGroups).
"""
kDS1AttrContactGUID = "dsAttrTypeStandard:ContactGUID"
"""
kDS1AttrContactPerson
- Attribute type for the contact person of the machine.
+ Attribute type for the contact person of the machine.
Found in host or machine records.
"""
kDS1AttrContactPerson = "dsAttrTypeStandard:ContactPerson"
@@ -535,7 +535,7 @@
"""
kDS1AttrCrossCertificatePair
- Attribute containing the binary of a pair of certificates which
+ Attribute containing the binary of a pair of certificates which
verify each other. Both certificates have the same level of authority.
Usually found in kDSStdRecordTypeCertificateAuthority records.
"""
@@ -587,7 +587,7 @@
"""
kDS1AttrGeneratedUID
- Used for 36 character (128 bit) unique ID. Usually found in user,
+ Used for 36 character (128 bit) unique ID. Usually found in user,
group, and computer records. An example value is "A579E95E-CDFE-4EBC-B7E7-F2158562170F".
The standard format contains 32 hex characters and four hyphen characters.
"""
@@ -678,7 +678,7 @@
"""
kDS1AttrMetaAutomountMap
- Used to query for kDSStdRecordTypeAutomount entries associated with a specific
+ Used to query for kDSStdRecordTypeAutomount entries associated with a specific
kDSStdRecordTypeAutomountMap.
"""
kDS1AttrMetaAutomountMap = "dsAttrTypeStandard:MetaAutomountMap"
@@ -728,15 +728,15 @@
"""
kDS1AttrOwner
- Attribute type for the owner of a record.
+ Attribute type for the owner of a record.
Typically the value is a LDAP distinguished name.
"""
kDS1AttrOwner = "dsAttrTypeStandard:Owner"
"""
kDS1AttrOwnerGUID
- Attribute type for the owner GUID of a group.
- found in group records (kDSStdRecordTypeGroups).
+ Attribute type for the owner GUID of a group.
+ found in group records (kDSStdRecordTypeGroups).
"""
kDS1AttrOwnerGUID = "dsAttrTypeStandard:OwnerGUID"
@@ -796,7 +796,7 @@
"""
kDS1AttrPrimaryComputerGUID
- Single-valued attribute that defines a primary computer of the computer group.
+ Single-valued attribute that defines a primary computer of the computer group.
added via extensible object for computer group record type (kDSStdRecordTypeComputerGroups)
"""
kDS1AttrPrimaryComputerGUID = "dsAttrTypeStandard:PrimaryComputerGUID"
@@ -809,7 +809,7 @@
"""
kDS1AttrPrimaryGroupID
- This is the 32 bit unique ID that represents the primary group
+ This is the 32 bit unique ID that represents the primary group
a user is part of, or the ID of a group. Format is a signed 32 bit integer
represented as a string.
"""
@@ -860,7 +860,7 @@
"""
kDS1AttrPrinterXRISupported
Multi-valued attribute that defines additional URIs supported by a printer.
- This is used when configuring a printer. This attribute is based on the IPP
+ This is used when configuring a printer. This attribute is based on the IPP
Printing Specification RFC and IETF IPP-LDAP Printer Record.
"""
kDSNAttrPrinterXRISupported = "dsAttrTypeStandard:PrinterXRISupported"
@@ -912,14 +912,14 @@
"""
kDS1AttrSMBHome
-
+
UNC address of Windows homedirectory mount point (\\server\\sharepoint).
"""
kDS1AttrSMBHome = "dsAttrTypeStandard:SMBHome"
"""
kDS1AttrSMBHomeDrive
-
+
Drive letter for homedirectory mount point.
"""
kDS1AttrSMBHomeDrive = "dsAttrTypeStandard:SMBHomeDrive"
@@ -977,7 +977,7 @@
"""
kDS1AttrSMBSID
SMB Security ID, stored as a string attribute of up to 64 bytes.
- Found in user, group, and computer records (kDSStdRecordTypeUsers,
+ Found in user, group, and computer records (kDSStdRecordTypeUsers,
kDSStdRecordTypeGroups, kDSStdRecordTypeComputers).
"""
kDS1AttrSMBSID = "dsAttrTypeStandard:SMBSID"
@@ -991,7 +991,7 @@
"""
kDS1AttrServiceType
Represents the service type for the service. This is the raw service type of the
- service. For example a service record type of kDSStdRecordTypeWebServer
+ service. For example a service record type of kDSStdRecordTypeWebServer
might have a service type of "http" or "https".
"""
kDS1AttrServiceType = "dsAttrTypeStandard:ServiceType"
@@ -1023,7 +1023,7 @@
"""
kDS1AttrTimeToLive
Attribute recommending how long to cache the record's attribute values.
- Format is an unsigned 32 bit representing seconds. ie. 300 is 5 minutes.
+ Format is an unsigned 32 bit representing seconds. i.e. 300 is 5 minutes.
"""
kDS1AttrTimeToLive = "dsAttrTypeStandard:TimeToLive"
@@ -1038,14 +1038,14 @@
kDS1AttrUserCertificate
Attribute containing the binary of the user's certificate.
Usually found in user records. The certificate is data which identifies a user.
- This data is attested to by a known party, and can be independently verified
+ This data is attested to by a known party, and can be independently verified
by a third party.
"""
kDS1AttrUserCertificate = "dsAttrTypeStandard:UserCertificate"
"""
kDS1AttrUserPKCS12Data
- Attribute containing binary data in PKCS #12 format.
+ Attribute containing binary data in PKCS #12 format.
Usually found in user records. The value can contain keys, certificates,
and other related information and is encrypted with a passphrase.
"""
@@ -1061,7 +1061,7 @@
kDS1AttrUserSMIMECertificate
Attribute containing the binary of the user's SMIME certificate.
Usually found in user records. The certificate is data which identifies a user.
- This data is attested to by a known party, and can be independently verified
+ This data is attested to by a known party, and can be independently verified
by a third party. SMIME certificates are often used for signed or encrypted
emails.
"""
@@ -1094,7 +1094,7 @@
"""
kDS1AttrWeblogURI
Single-valued attribute that defines the URI of a user's weblog.
- Usually found in user records (kDSStdRecordTypeUsers).
+ Usually found in user records (kDSStdRecordTypeUsers).
Example: http://example.com/blog/jsmith
"""
kDS1AttrWeblogURI = "dsAttrTypeStandard:WeblogURI"
@@ -1193,7 +1193,7 @@
"""
kDSNAttrBuilding
Represents the building name for a user or person record.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrBuilding = "dsAttrTypeStandard:Building"
@@ -1207,7 +1207,7 @@
"""
kDSNAttrCity
Usually, city for a user or person record.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrCity = "dsAttrTypeStandard:City"
@@ -1235,7 +1235,7 @@
"""
kDSNAttrCountry
Represents country of a record entry.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrCountry = "dsAttrTypeStandard:Country"
@@ -1243,7 +1243,7 @@
"""
kDSNAttrDepartment
Represents the department name of a user or person.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrDepartment = "dsAttrTypeStandard:Department"
@@ -1263,7 +1263,7 @@
"""
kDSNAttrEMailContacts
multi-valued attribute that defines a record's custom email addresses .
- found in user records (kDSStdRecordTypeUsers).
+ found in user records (kDSStdRecordTypeUsers).
Example: home:johndoe at mymail.com
"""
kDSNAttrEMailContacts = "dsAttrTypeStandard:EMailContacts"
@@ -1271,7 +1271,7 @@
"""
kDSNAttrFaxNumber
Represents the FAX numbers of a user or person.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrFaxNumber = "dsAttrTypeStandard:FAXNumber"
@@ -1297,7 +1297,7 @@
"""
kDSNAttrGroupServices
xml-plist attribute that defines a group's services .
- found in group records (kDSStdRecordTypeGroups).
+ found in group records (kDSStdRecordTypeGroups).
"""
kDSNAttrGroupServices = "dsAttrTypeStandard:GroupServices"
@@ -1336,9 +1336,9 @@
"""
kDSNAttrIPAddressAndENetAddress
- A pairing of IPv4 or IPv6 addresses with Ethernet addresses
- (e.g., "10.1.1.1/00:16:cb:92:56:41"). Usually found on kDSStdRecordTypeComputers for use by
- services that need specific pairing of the two values. This should be in addition to
+ A pairing of IPv4 or IPv6 addresses with Ethernet addresses
+ (e.g., "10.1.1.1/00:16:cb:92:56:41"). Usually found on kDSStdRecordTypeComputers for use by
+ services that need specific pairing of the two values. This should be in addition to
kDSNAttrIPAddress, kDSNAttrIPv6Address and kDS1AttrENetAddress. This is necessary because not
all directories return attribute values in a guaranteed order.
"""
@@ -1347,15 +1347,15 @@
"""
kDSNAttrIPv6Address
IPv6 address expressed in the standard notation (e.g., "fe80::236:caff:fcc2:5641" )
- Usually found on kDSStdRecordTypeComputers, kDSStdRecordTypeHosts, and
+ Usually found on kDSStdRecordTypeComputers, kDSStdRecordTypeHosts, and
kDSStdRecordTypeMachines.
"""
kDSNAttrIPv6Address = "dsAttrTypeStandard:IPv6Address"
"""
kDSNAttrJPEGPhoto
- Used to store binary picture data in JPEG format.
- Usually found in user, people or group records (kDSStdRecordTypeUsers,
+ Used to store binary picture data in JPEG format.
+ Usually found in user, people or group records (kDSStdRecordTypeUsers,
kDSStdRecordTypePeople, kDSStdRecordTypeGroups).
"""
kDSNAttrJPEGPhoto = "dsAttrTypeStandard:JPEGPhoto"
@@ -1363,7 +1363,7 @@
"""
kDSNAttrJobTitle
Represents the job title of a user.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrJobTitle = "dsAttrTypeStandard:JobTitle"
@@ -1394,7 +1394,7 @@
"""
kDSNAttrMachineServes
- Attribute type in host or machine records for storing NetInfo
+ Attribute type in host or machine records for storing NetInfo
domains served.
"""
kDSNAttrMachineServes = "dsAttrTypeStandard:MachineServes"
@@ -1410,7 +1410,7 @@
"""
kDSNAttrMapURI
attribute that defines the URI of a user's location.
- Usually found in user records (kDSStdRecordTypeUsers).
+ Usually found in user records (kDSStdRecordTypeUsers).
Example: http://example.com/bldg1
"""
kDSNAttrMapURI = "dsAttrTypeStandard:MapURI"
@@ -1423,20 +1423,20 @@
"""
kDSNAttrMIME
- Data contained in this attribute type is a fully qualified MIME Type.
+ Data contained in this attribute type is a fully qualified MIME Type.
"""
kDSNAttrMIME = "dsAttrTypeStandard:MIME"
"""
kDSNAttrMember
- List of member records.
+ List of member records.
"""
kDSNAttrMember = "dsAttrTypeStandard:Member"
"""
kDSNAttrMobileNumber
Represents the mobile numbers of a user or person.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrMobileNumber = "dsAttrTypeStandard:MobileNumber"
@@ -1463,7 +1463,7 @@
"""
kDSNAttrNickName
Represents the nickname of a user or person.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrNickName = "dsAttrTypeStandard:NickName"
@@ -1490,7 +1490,7 @@
"""
kDSNAttrPagerNumber
Represents the pager numbers of a user or person.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrPagerNumber = "dsAttrTypeStandard:PagerNumber"
@@ -1498,7 +1498,7 @@
"""
kDSNAttrPhoneContacts
multi-valued attribute that defines a record's custom phone numbers .
- found in user records (kDSStdRecordTypeUsers).
+ found in user records (kDSStdRecordTypeUsers).
Example: home fax:408-555-4444
"""
kDSNAttrPhoneContacts = "dsAttrTypeStandard:PhoneContacts"
@@ -1539,7 +1539,7 @@
kDSNAttrNamePrefix
Represents the title prefix of a user or person.
ie. Mr., Ms., Mrs., Dr., etc.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrNamePrefix = "dsAttrTypeStandard:NamePrefix"
@@ -1559,7 +1559,7 @@
"""
kDSNAttrRelationships
multi-valued attribute that defines the relationship to the record type .
- found in user records (kDSStdRecordTypeUsers).
+ found in user records (kDSStdRecordTypeUsers).
Example: brother:John
"""
kDSNAttrRelationships = "dsAttrTypeStandard:Relationships"
@@ -1572,8 +1572,8 @@
"""
kDSNAttrResourceType
- Attribute type for the kind of resource.
- found in resource records (kDSStdRecordTypeResources).
+ Attribute type for the kind of resource.
+ found in resource records (kDSStdRecordTypeResources).
Example: ConferenceRoom
"""
kDSNAttrResourceType = "dsAttrTypeStandard:ResourceType"
@@ -1593,7 +1593,7 @@
"""
kDSNAttrStreet
Represents the street address of a user or person.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrStreet = "dsAttrTypeStandard:Street"
@@ -1602,7 +1602,7 @@
kDSNAttrNameSuffix
Represents the name suffix of a user or person.
ie. Jr., Sr., etc.
- Usually found in user or people records (kDSStdRecordTypeUsers or
+ Usually found in user or people records (kDSStdRecordTypeUsers or
kDSStdRecordTypePeople).
"""
kDSNAttrNameSuffix = "dsAttrTypeStandard:NameSuffix"
@@ -1837,7 +1837,7 @@
"""
Search Node attribute type Constants
"""
-
+
"""
kDS1AttrSearchPath
Search path used by the search node.
@@ -1891,4 +1891,3 @@
Retained only for backward compatibility.
"""
kDSNAttrCSPSearchPath = "dsAttrTypeStandard:CSPSearchPath"
-
Modified: CalendarServer/trunk/contrib/od/odframework.py
===================================================================
--- CalendarServer/trunk/contrib/od/odframework.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/od/odframework.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -1,8 +1,10 @@
import objc as _objc
-__bundle__ = _objc.initFrameworkWrapper("OpenDirectory",
+__bundle__ = _objc.initFrameworkWrapper(
+ "OpenDirectory",
frameworkIdentifier="com.apple.OpenDirectory",
frameworkPath=_objc.pathForFramework(
- "/System/Library/Frameworks/OpenDirectory.framework"),
- globals=globals())
-
+ "/System/Library/Frameworks/OpenDirectory.framework"
+ ),
+ globals=globals()
+)
Modified: CalendarServer/trunk/contrib/performance/_event_create.py
===================================================================
--- CalendarServer/trunk/contrib/performance/_event_create.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/_event_create.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -119,8 +119,8 @@
'ORGANIZER': makeOrganizer(organizerSequence),
'ATTENDEES': ''.join(attendees),
'RRULE': rrule,
- },
- }
+ },
+ }
return cal.replace("\n", "\r\n")
Modified: CalendarServer/trunk/contrib/performance/benchlib.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchlib.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/benchlib.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -88,8 +88,8 @@
root=root, principal=principal)
cal = "/calendars/users/%s/%s/" % (user, calendar)
d = _serial([
- (account.deleteResource, (cal,)),
- (account.makeCalendar, (cal,))])
+ (account.deleteResource, (cal,)),
+ (account.makeCalendar, (cal,))])
d.addCallback(lambda ignored: account)
return d
Modified: CalendarServer/trunk/contrib/performance/benchmark.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmark.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/benchmark.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -211,7 +211,7 @@
SQLDuration('execute'): self._execute, # Time spent in the execute phase of SQL execution
SQLDuration('iternext'): self._iternext, # Time spent fetching rows from the execute phase
SQLDuration('SQL'): self._execute + self._iternext, # Combination of the previous two
- }
+ }
self._init_stats()
return results
@@ -370,11 +370,11 @@
('label', 'l', 'data', 'A descriptive string to attach to the output filename.'),
('hosts-count', None, None, 'For distributed benchmark collection, the number of hosts participating in collection.', int),
('host-index', None, None, 'For distributed benchmark collection, the (zero-based) index of this host in the collection.', int),
- ]
+ ]
optFlags = [
('debug', None, 'Enable various debugging helpers'),
- ]
+ ]
def __init__(self):
Options.__init__(self)
Modified: CalendarServer/trunk/contrib/performance/benchmarks/find_events.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmarks/find_events.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/benchmarks/find_events.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -52,7 +52,7 @@
StringProducer(event))
worker = worker()
return gatherResults([
- cooperate(worker).whenDone() for _ignore_i in range(3)])
+ cooperate(worker).whenDone() for _ignore_i in range(3)])
Modified: CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -110,8 +110,8 @@
'START': formatDate(base + i * interval),
'END': formatDate(base + i * interval + duration),
'SEQUENCE': i,
- },
- }
+ },
+ }
return data.replace("\n", "\r\n")
@@ -149,17 +149,17 @@
method = 'POST'
uri = 'http://%s:%d/calendars/__uids__/%s/outbox/' % (host, port, user)
headers = Headers({
- "content-type": ["text/calendar"],
- "originator": ["mailto:%s at example.com" % (user,)],
- "recipient": ["urn:x-uid:%s, urn:x-uid:10000000-0000-0000-0000-000000000002" % (uid,)]})
+ "content-type": ["text/calendar"],
+ "originator": ["mailto:%s at example.com" % (user,)],
+ "recipient": ["urn:x-uid:%s, urn:x-uid:10000000-0000-0000-0000-000000000002" % (uid,)]})
vfb = VFREEBUSY % {
- "attendees": "".join([
- "ATTENDEE:urn:x-uid:%s\n" % (uid,),
- "ATTENDEE:urn:x-uid:10000000-0000-0000-0000-000000000002\n"]),
- "start": formatDate(baseTime.replace(hour=0, minute=0)) + 'Z',
- "end": formatDate(
- baseTime.replace(hour=0, minute=0) + timedelta(days=1)) + 'Z'}
+ "attendees": "".join([
+ "ATTENDEE:urn:x-uid:%s\n" % (uid,),
+ "ATTENDEE:urn:x-uid:10000000-0000-0000-0000-000000000002\n"]),
+ "start": formatDate(baseTime.replace(hour=0, minute=0)) + 'Z',
+ "end": formatDate(
+ baseTime.replace(hour=0, minute=0) + timedelta(days=1)) + 'Z'}
body = StringProducer(vfb.replace("\n", "\r\n"))
samples = yield sample(
Modified: CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy_vary_attendees.py
===================================================================
--- CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy_vary_attendees.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/benchmarks/vfreebusy_vary_attendees.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -78,16 +78,16 @@
method = 'POST'
uri = 'http://%s:%d/calendars/__uids__/10000000-0000-0000-0000-000000000001/outbox/' % (host, port)
headers = Headers({
- "content-type": ["text/calendar"],
- "originator": ["mailto:%s at example.com" % (user,)],
- "recipient": [", ".join(["urn:x-uid:10000000-0000-0000-0000-000000000%03d" % (i,) for i in [userNumber] + targets])]})
+ "content-type": ["text/calendar"],
+ "originator": ["mailto:%s at example.com" % (user,)],
+ "recipient": [", ".join(["urn:x-uid:10000000-0000-0000-0000-000000000%03d" % (i,) for i in [userNumber] + targets])]})
body = StringProducer(VFREEBUSY % {
- "attendees": "".join([
- "ATTENDEE:urn:x-uid:10000000-0000-0000-0000-000000000%03d\n" % (i,)
- for i in [userNumber] + targets]),
- "start": formatDate(baseTime.replace(hour=0, minute=0)) + 'Z',
- "end": formatDate(
- baseTime.replace(hour=0, minute=0) + timedelta(days=1)) + 'Z'})
+ "attendees": "".join([
+ "ATTENDEE:urn:x-uid:10000000-0000-0000-0000-000000000%03d\n" % (i,)
+ for i in [userNumber] + targets]),
+ "start": formatDate(baseTime.replace(hour=0, minute=0)) + 'Z',
+ "end": formatDate(
+ baseTime.replace(hour=0, minute=0) + timedelta(days=1)) + 'Z'})
samples = yield sample(
dtrace, samples,
Modified: CalendarServer/trunk/contrib/performance/eventkitframework.py
===================================================================
--- CalendarServer/trunk/contrib/performance/eventkitframework.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/eventkitframework.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -1,7 +1,10 @@
import objc as _objc
-__bundle__ = _objc.initFrameworkWrapper("EventKit",
+__bundle__ = _objc.initFrameworkWrapper(
+ "EventKit",
frameworkIdentifier="com.apple.EventKit",
frameworkPath=_objc.pathForFramework(
- "/System/Library/Frameworks/EventKit.framework"),
- globals=globals())
+ "/System/Library/Frameworks/EventKit.framework"
+ ),
+ globals=globals()
+)
Modified: CalendarServer/trunk/contrib/performance/httpauth.py
===================================================================
--- CalendarServer/trunk/contrib/performance/httpauth.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/httpauth.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -101,7 +101,7 @@
challengeType = {
'basic': BasicChallenge,
'digest': DigestChallenge,
- }.get(scheme.lower())
+ }.get(scheme.lower())
if challengeType is None:
return "", None
return scheme.lower(), challengeType(**args)
@@ -125,7 +125,7 @@
else:
authorization = headers.getRawHeaders('authorization')
msg("UNAUTHORIZED response to %s %s (Authorization=%r)" % (
- method, uri, authorization))
+ method, uri, authorization))
# Look for a challenge
authorization = response.headers.getRawHeaders('www-authenticate')
if authorization is None:
Modified: CalendarServer/trunk/contrib/performance/stats.py
===================================================================
--- CalendarServer/trunk/contrib/performance/stats.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/stats.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -96,11 +96,11 @@
def summarize(self, data):
return ''.join([
- self.name, ' mean ', str(mean(data)), '\n',
- self.name, ' median ', str(median(data)), '\n',
- self.name, ' stddev ', str(stddev(data)), '\n',
- self.name, ' median absolute deviation ', str(mad(data)), '\n',
- self.name, ' sum ', str(sum(data)), '\n'])
+ self.name, ' mean ', str(mean(data)), '\n',
+ self.name, ' median ', str(median(data)), '\n',
+ self.name, ' stddev ', str(stddev(data)), '\n',
+ self.name, ' median absolute deviation ', str(mad(data)), '\n',
+ self.name, ' sum ', str(sum(data)), '\n'])
def write(self, basename, data):
@@ -178,9 +178,9 @@
total += interval
times.append(total / NANO * 1000)
return ''.join([
- '%d: %s\n' % (count, statement)
- for (statement, count)
- in statements.iteritems()]) + _Statistic.summarize(self, times)
+ '%d: %s\n' % (count, statement)
+ for (statement, count)
+ in statements.iteritems()]) + _Statistic.summarize(self, times)
def statements(self, samples):
@@ -230,7 +230,7 @@
discrete buckets (eg, as would be suitable for constructing a
histogram of the values).
"""
- #buckets = {}
+ # buckets = {}
return []
Modified: CalendarServer/trunk/contrib/performance/test_benchmark.py
===================================================================
--- CalendarServer/trunk/contrib/performance/test_benchmark.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/test_benchmark.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -164,16 +164,16 @@
subset.
"""
self.options.parseOptions([
- "--hosts-count=3", "--host-index=0",
- "foo", "bar", "baz", "quux"])
+ "--hosts-count=3", "--host-index=0",
+ "foo", "bar", "baz", "quux"])
self.assertEquals(self.options['benchmarks'], ["foo", "quux"])
self.options.parseOptions([
- "--hosts-count=3", "--host-index=1",
- "foo", "bar", "baz", "quux"])
+ "--hosts-count=3", "--host-index=1",
+ "foo", "bar", "baz", "quux"])
self.assertEquals(self.options['benchmarks'], ["bar"])
self.options.parseOptions([
- "--hosts-count=3", "--host-index=2",
- "foo", "bar", "baz", "quux"])
+ "--hosts-count=3", "--host-index=2",
+ "foo", "bar", "baz", "quux"])
self.assertEquals(self.options['benchmarks'], ["baz"])
Modified: CalendarServer/trunk/contrib/performance/test_stats.py
===================================================================
--- CalendarServer/trunk/contrib/performance/test_stats.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/test_stats.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -109,7 +109,7 @@
# twisted.trial.unittest.FailTest: not equal:
# a = datetime.datetime(2011, 6, 4, 15, 30, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>)
# b = datetime.datetime(2011, 6, 4, 19, 30, tzinfo=<DstTzInfo 'US/Eastern' EDT-1 day, 20:00:00 DST>)
- #test_workdistribution.todo = "Somehow timezones mess this up"
+ # test_workdistribution.todo = "Somehow timezones mess this up"
def test_recurrencedistribution(self):
Modified: CalendarServer/trunk/contrib/performance/upload.py
===================================================================
--- CalendarServer/trunk/contrib/performance/upload.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/performance/upload.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -48,7 +48,7 @@
'Identifier for the file/benchmark/parameter'),
('backend', None, None,
'Which storage backend produced this data.'),
- ]
+ ]
def postOptions(self):
assert self['url']
@@ -71,7 +71,7 @@
'std_dev': str(std_dev),
'max': str(max_value),
'min': str(min_value),
- }
+ }
print('uploading', data)
agent = Agent(reactor)
d = agent.request('POST', url, None, StringProducer(urlencode(data)))
Modified: CalendarServer/trunk/contrib/tools/fakecalendardata.py
===================================================================
--- CalendarServer/trunk/contrib/tools/fakecalendardata.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/fakecalendardata.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -211,7 +211,7 @@
vevents = []
for count, (recurring, attendees, date, hour) in enumerate(eventTypes):
- #print(recurring, attendees, date, hour)
+ # print(recurring, attendees, date, hour)
vevents.append(makeVEVENT(recurring, attendees, date, hour, count + 1))
print(calendar_template % {"VEVENTS" : "".join(vevents)})
Modified: CalendarServer/trunk/contrib/tools/monitoranalysis.py
===================================================================
--- CalendarServer/trunk/contrib/tools/monitoranalysis.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/monitoranalysis.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -78,7 +78,7 @@
if reqs <= 80:
data.append((dtstamp, reqs, resp, lqnon, cpu))
- #print("%s %d %d %d %d" % (dtstamp, reqs, resp, lqnon, cpu))
+ # print("%s %d %d %d %d" % (dtstamp, reqs, resp, lqnon, cpu))
except StopIteration:
break
@@ -120,8 +120,10 @@
plt.plot(x1, y1, "b+", x2, y2, "g+", x3, y3, "y+")
if first:
- plt.legend(('ListenQ at zero', 'ListenQ < 50', 'ListenQ >= 50'),
- 'upper left', shadow=True, fancybox=True)
+ plt.legend(
+ ('ListenQ at zero', 'ListenQ < 50', 'ListenQ >= 50'),
+ 'upper left', shadow=True, fancybox=True
+ )
if last:
plt.xlabel("Requests/second")
plt.ylabel("Av. Response Time (ms)")
@@ -156,8 +158,10 @@
)
if first:
- plt.legend(('CPU < 1/4', 'CPU < 1/2', 'CPU < 3/4', "CPU High"),
- 'upper left', shadow=True, fancybox=True)
+ plt.legend(
+ ('CPU < 1/4', 'CPU < 1/2', 'CPU < 3/4', "CPU High"),
+ 'upper left', shadow=True, fancybox=True
+ )
if last:
plt.xlabel("Requests/second")
plt.ylabel("Av. Response Time (ms)")
Modified: CalendarServer/trunk/contrib/tools/pg_stats_analysis.py
===================================================================
--- CalendarServer/trunk/contrib/tools/pg_stats_analysis.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/pg_stats_analysis.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -185,8 +185,8 @@
entries.append(bits)
if verbose and divmod(len(entries), 1000)[1] == 0:
print("%d entries" % (len(entries),))
- #if float(bits[COLUMN_total_time]) > 1:
- # print(bits[COLUMN_total_time], bits[COLUMN_query])
+ # if float(bits[COLUMN_total_time]) > 1:
+ # print(bits[COLUMN_total_time], bits[COLUMN_query])
if verbose:
print("Read %d entries" % (len(entries,)))
Modified: CalendarServer/trunk/contrib/tools/protocolanalysis.py
===================================================================
--- CalendarServer/trunk/contrib/tools/protocolanalysis.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/protocolanalysis.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -1039,14 +1039,14 @@
print("URI Counts")
self.printURICounts(doTabs)
- #print("User Interaction Counts")
- #self.printUserInteractionCounts(doTabs)
+ # print("User Interaction Counts")
+ # self.printUserInteractionCounts(doTabs)
print("User Weights (top 100)")
self.printUserWeights(doTabs)
- #print("User Response times")
- #self.printUserResponseTimes(doTabs)
+ # print("User Response times")
+ # self.printUserResponseTimes(doTabs)
print("Sim values")
self.printSimStats(doTabs)
@@ -1555,10 +1555,10 @@
def printUserInteractionCounts(self, doTabs):
table = tables.Table()
table.setDefaultColumnFormats((
- tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- tables.Table.ColumnFormat("%0.2f", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- ))
+ tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ tables.Table.ColumnFormat("%0.2f", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ ))
table.addHeader(("# users accessed", "# of users", "% of users"))
summary = self.summarizeUserInteraction(METHOD_PROPFIND_CALENDAR_HOME)
total = sum(summary.values())
@@ -1574,11 +1574,11 @@
hours = self.timeCounts / self.resolutionMinutes / 60
table = tables.Table()
table.setDefaultColumnFormats((
- tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
- ))
+ tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
+ ))
table.addHeader(("Item", "Value", "Items, per User, per Day", "Interval (sec), per item, per user"))
table.addRow(("Unique Users", users, "", ""))
@@ -1673,7 +1673,7 @@
self.printInfo(doTabs)
print("Load Analysis Differences")
- #self.printLoadAnalysisDetails(doTabs)
+ # self.printLoadAnalysisDetails(doTabs)
self.printHourlyTotals(doTabs)
if not summary:
Modified: CalendarServer/trunk/contrib/tools/readStats.py
===================================================================
--- CalendarServer/trunk/contrib/tools/readStats.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/readStats.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -188,7 +188,7 @@
("", "", "per second", "(ms)", "no write(ms)", "(ms)", "Average", "Average", ""),
)
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.LEFT_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%.1f", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
@@ -235,7 +235,7 @@
)
max_column = 5
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.LEFT_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%.1f", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
@@ -295,7 +295,7 @@
("", "<10ms", "10ms<->100ms", "100ms<->1s", "1s<->10s", "10s<->30s", "30s<->60s", ">60s", "Over 1s", "Over 10s"),
)
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.LEFT_JUSTIFY),
tables.Table.ColumnFormat("%d (%.1f%%)", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%d (%.1f%%)", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
@@ -358,7 +358,7 @@
("", "", "", "(ms)", "", ""),
)
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.LEFT_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%.1f%%", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
@@ -453,7 +453,7 @@
("User-Agent", "Total", "Percentage"),
)
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.LEFT_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%.1f%%", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
Modified: CalendarServer/trunk/contrib/tools/request_monitor.py
===================================================================
--- CalendarServer/trunk/contrib/tools/request_monitor.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/request_monitor.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -511,7 +511,7 @@
("", "", "per second", "(ms)", "no write(ms)", "(ms)", "Average", "Time", "Time", ""),
)
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.CENTER_JUSTIFY),
tables.Table.ColumnFormat("%d", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%.1f", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
@@ -599,7 +599,7 @@
("", "<10ms", "10ms<->100ms", "100ms<->1s", "1s<->10s", "10s<->30s", "30s<->60s", ">60s", "Over 1s", "Over 10s"),
)
table.setDefaultColumnFormats(
- (
+ (
tables.Table.ColumnFormat("%s", tables.Table.ColumnFormat.CENTER_JUSTIFY),
tables.Table.ColumnFormat("%d (%.1f%%)", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
tables.Table.ColumnFormat("%d (%.1f%%)", tables.Table.ColumnFormat.RIGHT_JUSTIFY),
Modified: CalendarServer/trunk/contrib/tools/statsanalysis.py
===================================================================
--- CalendarServer/trunk/contrib/tools/statsanalysis.py 2014-07-25 18:08:32 UTC (rev 13792)
+++ CalendarServer/trunk/contrib/tools/statsanalysis.py 2014-07-25 19:29:30 UTC (rev 13793)
@@ -29,6 +29,8 @@
def safeDivision(value, total, factor=1):
return value * factor / total if total else 0
+
+
def analyze(fpath, title):
"""
Analyze a readStats data file.
@@ -63,6 +65,7 @@
print("Read %d data points\n" % (len(dataset[title]),))
+
def analyzeTableFormat(f, title):
"""
Analyze a "table" format output file. First line has already been tested.
@@ -78,6 +81,7 @@
analyzeTableRecord(f, title)
+
def analyzeTableRecord(liter, title):
"""
Analyze one entry from the readStats data file.
@@ -101,6 +105,7 @@
break
+
def parseOverall(line):
"""
Parse the "Overall:" stats summary line.
@@ -130,6 +135,7 @@
return overall
+
def parseMethods(liter):
"""
Parse the "Method Count" table from a data file entry.
@@ -160,6 +166,7 @@
return methods
+
def analyzeJSONFormat(f, first, title):
"""
Analyze a JSON format output file. First line has already been tested.
@@ -175,10 +182,11 @@
analyzeJSONRecord(line, title)
+
def analyzeJSONRecord(line, title):
"""
Analyze a JSON record.
-
+
@param line: line of JSON data to parse
@type line: L{str}
@param title: title to use for data set
@@ -197,6 +205,7 @@
analyzeJSONStatsMethods(allstats, title, seconds)
+
def analyzeJSONStatsSummary(allstats, title, seconds):
"""
Analyze all server JSON summary stats.
@@ -233,6 +242,7 @@
dataset[title][seconds]["Overall:Max. Response"] = max(results["Max. Response"])
+
def analyzeJSONStatsMethods(allstats, title, seconds):
"""
Analyze all server JSON method stats.
@@ -268,6 +278,7 @@
dataset[title][seconds]["Method:{}:Total Resp. %".format(method)] = safeDivision(method_times[method], total_response, 100.0)
+
def plotSeries(key, ymin=None, ymax=None):
"""
Plot the chosen dataset key for each scanned data file.
@@ -284,7 +295,7 @@
for title, data in sorted(dataset.items(), key=lambda x: x[0]):
titles.append(title)
x, y = zip(*[(k / 3600.0, v[key]) for k, v in sorted(data.items(), key=lambda x: x[0]) if key in v])
-
+
plt.plot(x, y)
plt.xlabel("Hours")
@@ -306,6 +317,7 @@
plt.show()
+
def usage(error_msg=None):
if error_msg:
print(error_msg)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140725/9bcba3c3/attachment-0001.html>
More information about the calendarserver-changes
mailing list