blob: 77b0f7cd5fec5d6e2b7c42eab46eb5b609b969c4 [file] [log] [blame]
Brad Bishop732c6db2015-10-19 14:49:21 -04001#!/usr/bin/env python
2
Brad Bishopb3385602016-03-04 15:32:01 -05003# Contributors Listed Below - COPYRIGHT 2016
Brad Bishop732c6db2015-10-19 14:49:21 -04004# [+] International Business Machines Corp.
5#
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16# implied. See the License for the specific language governing
17# permissions and limitations under the License.
18
Brad Bishop732c6db2015-10-19 14:49:21 -040019import dbus
20import dbus.service
Brad Bishopae0c0af2015-11-09 18:41:28 -050021import dbus.exceptions
Brad Bishop732c6db2015-10-19 14:49:21 -040022import dbus.mainloop.glib
23import gobject
Brad Bishopfb1f58e2016-03-04 15:19:13 -050024from obmc.dbuslib.introspection import IntrospectionParser
25import obmc.utils.pathtree
26import obmc.utils.misc
27import obmc.mapper
Brad Bishopfed968e2016-03-18 10:47:26 -040028import obmc.dbuslib.bindings
Brad Bishopd9fc21c2016-03-18 12:24:42 -040029import obmc.dbuslib.enums
Brad Bishop732c6db2015-10-19 14:49:21 -040030
Brad Bishop4b849412016-02-04 15:40:26 -050031
Brad Bishopae0c0af2015-11-09 18:41:28 -050032class MapperNotFoundException(dbus.exceptions.DBusException):
Brad Bishopfb1f58e2016-03-04 15:19:13 -050033 _dbus_error_name = obmc.mapper.MAPPER_NOT_FOUND
Brad Bishop4b849412016-02-04 15:40:26 -050034
35 def __init__(self, path):
36 super(MapperNotFoundException, self).__init__(
Brad Bishop9cff26b2016-03-18 11:16:47 -040037 "path or object not found: %s" % path)
Brad Bishop4b849412016-02-04 15:40:26 -050038
Brad Bishopae0c0af2015-11-09 18:41:28 -050039
Brad Bishopd9fc21c2016-03-18 12:24:42 -040040class Association(dbus.service.Object):
41 def __init__(self, bus, path, endpoints):
42 super(Association, self).__init__(bus, path)
43 self.endpoints = endpoints
44
45 def __getattr__(self, name):
46 if name == 'properties':
47 return {
48 obmc.dbuslib.enums.OBMC_ASSOC_IFACE: {
49 'endpoints': self.endpoints}}
50 return super(Association, self).__getattr__(name)
51
52 def emit_signal(self, old):
53 if old != self.endpoints:
54 self.PropertiesChanged(
55 obmc.dbuslib.enums.OBMC_ASSOC_IFACE,
56 {'endpoints': self.endpoints}, ['endpoints'])
57
58 def append(self, endpoints):
59 old = self.endpoints
60 self.endpoints = list(set(endpoints).union(self.endpoints))
61 self.emit_signal(old)
62
63 def remove(self, endpoints):
64 old = self.endpoints
65 self.endpoints = list(set(self.endpoints).difference(endpoints))
66 self.emit_signal(old)
67
68 @dbus.service.method(dbus.PROPERTIES_IFACE, 'ss', 'as')
69 def Get(self, interface_name, property_name):
70 if property_name != 'endpoints':
71 raise dbus.exceptions.DBusException(name=DBUS_UNKNOWN_PROPERTY)
72 return self.GetAll(interface_name)[property_name]
73
74 @dbus.service.method(dbus.PROPERTIES_IFACE, 's', 'a{sas}')
75 def GetAll(self, interface_name):
76 if interface_name != obmc.dbuslib.enums.OBMC_ASSOC_IFACE:
77 raise dbus.exceptions.DBusException(DBUS_UNKNOWN_INTERFACE)
78 return {'endpoints': self.endpoints}
79
80 @dbus.service.signal(
81 dbus.PROPERTIES_IFACE, signature='sa{sas}as')
82 def PropertiesChanged(
83 self, interface_name, changed_properties, invalidated_properties):
84 pass
85
86
87class Manager(obmc.dbuslib.bindings.DbusObjectManager):
88 def __init__(self, bus, path):
89 obmc.dbuslib.bindings.DbusObjectManager.__init__(self)
90 dbus.service.Object.__init__(self, bus.dbus, path)
91
92
Brad Bishop732c6db2015-10-19 14:49:21 -040093class ObjectMapper(dbus.service.Object):
Brad Bishop4b849412016-02-04 15:40:26 -050094 def __init__(self, bus, path,
Brad Bishopfb1f58e2016-03-04 15:19:13 -050095 name_match=obmc.utils.misc.org_dot_openbmc_match,
96 intf_match=obmc.utils.misc.org_dot_openbmc_match):
Brad Bishop4b849412016-02-04 15:40:26 -050097 super(ObjectMapper, self).__init__(bus.dbus, path)
Brad Bishopfb1f58e2016-03-04 15:19:13 -050098 self.cache = obmc.utils.pathtree.PathTree()
Brad Bishop4b849412016-02-04 15:40:26 -050099 self.bus = bus
100 self.name_match = name_match
101 self.intf_match = intf_match
Brad Bishopfb1f58e2016-03-04 15:19:13 -0500102 self.tag_match = obmc.utils.misc.ListMatch(['children', 'interface'])
Brad Bishop4b849412016-02-04 15:40:26 -0500103 self.service = None
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400104 self.index = {}
105 self.manager = Manager(bus, obmc.dbuslib.bindings.OBJ_PREFIX)
106 self.unique = bus.dbus.get_unique_name()
Brad Bishop732c6db2015-10-19 14:49:21 -0400107
Brad Bishop4b849412016-02-04 15:40:26 -0500108 gobject.idle_add(self.discover)
109 self.bus.dbus.add_signal_receiver(
110 self.bus_handler,
111 dbus_interface=
112 dbus.BUS_DAEMON_IFACE,
113 signal_name='NameOwnerChanged')
114 self.bus.dbus.add_signal_receiver(
115 self.interfaces_added_handler,
116 dbus_interface=
117 dbus.BUS_DAEMON_IFACE + '.ObjectManager',
118 signal_name='InterfacesAdded',
119 sender_keyword='sender')
120 self.bus.dbus.add_signal_receiver(
121 self.interfaces_removed_handler,
122 dbus_interface=dbus.BUS_DAEMON_IFACE + '.ObjectManager',
123 signal_name='InterfacesRemoved',
124 sender_keyword='sender')
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400125 self.bus.dbus.add_signal_receiver(
126 self.properties_changed_handler,
127 dbus_interface=dbus.PROPERTIES_IFACE,
128 signal_name='PropertiesChanged',
129 path_keyword='path',
130 sender_keyword='sender')
Brad Bishop732c6db2015-10-19 14:49:21 -0400131
Brad Bishop9cff26b2016-03-18 11:16:47 -0400132 def bus_match(self, owner):
133 # Ignore my own signals
134 return owner != obmc.mapper.MAPPER_NAME and \
135 self.name_match(owner)
Brad Bishop65b7ceb2015-11-04 23:05:56 -0500136
Brad Bishop4b849412016-02-04 15:40:26 -0500137 def discovery_pending(self):
138 return not bool(self.service)
Brad Bishopcb7aa602015-11-03 10:40:17 -0500139
Brad Bishop4b849412016-02-04 15:40:26 -0500140 def interfaces_added_handler(self, path, iprops, **kw):
Brad Bishopfed968e2016-03-18 10:47:26 -0400141 path = str(path)
142 owner = str(kw['sender'])
143 interfaces = self.get_signal_interfaces(owner, iprops.iterkeys())
144 cache_entry = self.cache.get(path, {})
145 old = self.interfaces_get(cache_entry, owner)
146 new = list(set(interfaces).union(old))
147 self.update_interfaces(path, owner, old, new)
Brad Bishop732c6db2015-10-19 14:49:21 -0400148
Brad Bishop4b849412016-02-04 15:40:26 -0500149 def interfaces_removed_handler(self, path, interfaces, **kw):
Brad Bishopfed968e2016-03-18 10:47:26 -0400150 path = str(path)
151 owner = str(kw['sender'])
152 interfaces = self.get_signal_interfaces(owner, interfaces)
153 cache_entry = self.cache.get(path, {})
154 old = self.interfaces_get(cache_entry, owner)
155 new = list(set(old).difference(interfaces))
156 self.update_interfaces(path, owner, old, new)
Brad Bishop732c6db2015-10-19 14:49:21 -0400157
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400158 def properties_changed_handler(self, interface, new, old, **kw):
159 owner = str(kw['sender'])
160 path = str(kw['path'])
161 interfaces = self.get_signal_interfaces(owner, [interface])
162 if not self.is_association(interfaces):
163 return
164 associations = new.get('associations', None)
165 if associations is None:
166 return
167
168 associations = [
169 (str(x), str(y), str(z)) for x, y, z in associations]
170 self.update_associations(
171 path, owner,
172 self.index_get_associations(path, [owner]),
173 associations)
174
Brad Bishop9cff26b2016-03-18 11:16:47 -0400175 def process_new_owner(self, owner):
Brad Bishop4b849412016-02-04 15:40:26 -0500176 # unique name
Brad Bishop9cff26b2016-03-18 11:16:47 -0400177 return self.discover([IntrospectionParser(owner,
Brad Bishop4b849412016-02-04 15:40:26 -0500178 self.bus.dbus,
179 self.tag_match,
180 self.intf_match)])
Brad Bishop732c6db2015-10-19 14:49:21 -0400181
Brad Bishop9cff26b2016-03-18 11:16:47 -0400182 def process_old_owner(self, owner):
Brad Bishopfed968e2016-03-18 10:47:26 -0400183 for path, item in self.cache.dataitems():
Brad Bishop9cff26b2016-03-18 11:16:47 -0400184 old = self.interfaces_get(item, owner)
Brad Bishopfed968e2016-03-18 10:47:26 -0400185 # remove all interfaces for this service
186 self.update_interfaces(
Brad Bishop9cff26b2016-03-18 11:16:47 -0400187 path, owner, old=old, new=[])
Brad Bishop732c6db2015-10-19 14:49:21 -0400188
Brad Bishopfed968e2016-03-18 10:47:26 -0400189 def bus_handler(self, owner, old, new):
190 valid = False
191 if not obmc.dbuslib.bindings.is_unique(owner):
192 valid = self.valid_signal(owner)
Brad Bishop732c6db2015-10-19 14:49:21 -0400193
Brad Bishopfed968e2016-03-18 10:47:26 -0400194 if valid and new:
Brad Bishop4b849412016-02-04 15:40:26 -0500195 self.process_new_owner(new)
Brad Bishopfed968e2016-03-18 10:47:26 -0400196 if valid and old:
Brad Bishop4b849412016-02-04 15:40:26 -0500197 self.process_old_owner(old)
Brad Bishop732c6db2015-10-19 14:49:21 -0400198
Brad Bishopfed968e2016-03-18 10:47:26 -0400199 def update_interfaces(self, path, owner, old, new):
200 cache_entry = self.cache.setdefault(path, {})
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400201 created = [] if self.has_interfaces(cache_entry) else [path]
Brad Bishopfed968e2016-03-18 10:47:26 -0400202 added = list(set(new).difference(old))
203 removed = list(set(old).difference(new))
204 self.interfaces_append(cache_entry, owner, added)
205 self.interfaces_remove(cache_entry, owner, removed, path)
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400206 destroyed = [] if self.has_interfaces(cache_entry) else [path]
207
208 # react to anything that requires association updates
209 new_assoc = []
210 old_assoc = []
211 if self.is_association(added):
212 new_assoc = self.dbus_get_associations(path, owner)
213 if self.is_association(removed):
214 old_assoc = self.index_get_associations(path, [owner])
215 self.update_associations(
216 path, owner, old_assoc, new_assoc, created, destroyed)
Brad Bishop86398d22015-10-28 21:58:31 -0400217
Brad Bishop4b849412016-02-04 15:40:26 -0500218 def add_items(self, owner, bus_items):
Brad Bishopfed968e2016-03-18 10:47:26 -0400219 for path, items in bus_items.iteritems():
220 # convert dbus types to native.
221 interfaces = [str(i) for i in items.get('interfaces', [])]
222 self.update_interfaces(path, str(owner), old=[], new=interfaces)
Brad Bishop86398d22015-10-28 21:58:31 -0400223
Brad Bishop9cff26b2016-03-18 11:16:47 -0400224 def discover(self, owners=[]):
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400225 def match(iface):
226 return iface == dbus.BUS_DAEMON_IFACE + '.ObjectManager' or \
227 self.intf_match(iface)
Brad Bishop4b849412016-02-04 15:40:26 -0500228 if not owners:
Brad Bishop9cff26b2016-03-18 11:16:47 -0400229 owners = [
230 IntrospectionParser(
231 x, self.bus.dbus,
232 self.tag_match,
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400233 match)
Brad Bishop9cff26b2016-03-18 11:16:47 -0400234 for x in self.bus.get_owner_names(self.bus_match)]
Brad Bishop4b849412016-02-04 15:40:26 -0500235 for o in owners:
236 self.add_items(o.name, o.introspect())
Brad Bishop732c6db2015-10-19 14:49:21 -0400237
Brad Bishop4b849412016-02-04 15:40:26 -0500238 if self.discovery_pending():
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400239 # add my object mananger instance
240 self.add_items(
241 self.unique,
242 {obmc.dbuslib.bindings.OBJ_PREFIX:
243 {'interfaces':
244 [dbus.BUS_DAEMON_IFACE + '.ObjectManager']}})
245
Brad Bishop4b849412016-02-04 15:40:26 -0500246 print "ObjectMapper discovery complete..."
247 self.service = dbus.service.BusName(
Brad Bishopfb1f58e2016-03-04 15:19:13 -0500248 obmc.mapper.MAPPER_NAME, self.bus.dbus)
Brad Bishop732c6db2015-10-19 14:49:21 -0400249
Brad Bishopfed968e2016-03-18 10:47:26 -0400250 def valid_signal(self, owner):
251 if obmc.dbuslib.bindings.is_unique(owner):
252 owner = self.bus.get_owned_name(self.bus_match, owner)
253
254 return owner is not None and not self.discovery_pending() and \
255 self.bus_match(owner)
256
257 def get_signal_interfaces(self, owner, interfaces):
258 filtered = []
259 if self.valid_signal(owner):
260 filtered = [str(x) for x in interfaces if self.intf_match(x)]
261
262 return filtered
263
264 @staticmethod
265 def interfaces_get(item, owner, default=[]):
266 return item.get(owner, default)
267
268 @staticmethod
269 def interfaces_append(item, owner, append):
270 interfaces = item.setdefault(owner, [])
271 item[owner] = list(set(append).union(interfaces))
272
273 def interfaces_remove(self, item, owner, remove, path):
274 interfaces = item.get(owner, [])
275 item[owner] = list(set(interfaces).difference(remove))
276
277 if not item[owner]:
278 # remove the owner if there aren't any interfaces left
279 del item[owner]
280
281 if item:
282 # other owners remain
283 return
284
285 if self.cache.get_children(path):
286 # there are still references to this path
287 # from objects further down the tree.
288 # mark it for removal if that changes
289 self.cache.demote(path)
290 else:
291 # delete the entire path if everything is gone
292 del self.cache[path]
293
Brad Bishopfb1f58e2016-03-04 15:19:13 -0500294 @dbus.service.method(obmc.mapper.MAPPER_IFACE, 's', 'a{sas}')
Brad Bishop4b849412016-02-04 15:40:26 -0500295 def GetObject(self, path):
296 o = self.cache.get(path)
297 if not o:
298 raise MapperNotFoundException(path)
299 return o
Brad Bishop732c6db2015-10-19 14:49:21 -0400300
Brad Bishopfb1f58e2016-03-04 15:19:13 -0500301 @dbus.service.method(obmc.mapper.MAPPER_IFACE, 'si', 'as')
Brad Bishop4b849412016-02-04 15:40:26 -0500302 def GetSubTreePaths(self, path, depth):
303 try:
304 return self.cache.iterkeys(path, depth)
305 except KeyError:
306 raise MapperNotFoundException(path)
Brad Bishop732c6db2015-10-19 14:49:21 -0400307
Brad Bishopfb1f58e2016-03-04 15:19:13 -0500308 @dbus.service.method(obmc.mapper.MAPPER_IFACE, 'si', 'a{sa{sas}}')
Brad Bishop4b849412016-02-04 15:40:26 -0500309 def GetSubTree(self, path, depth):
310 try:
311 return {x: y for x, y in self.cache.dataitems(path, depth)}
312 except KeyError:
313 raise MapperNotFoundException(path)
314
Brad Bishopd9fc21c2016-03-18 12:24:42 -0400315 @staticmethod
316 def has_interfaces(item):
317 for owner in item.iterkeys():
318 if ObjectMapper.interfaces_get(item, owner):
319 return True
320 return False
321
322 @staticmethod
323 def is_association(interfaces):
324 return obmc.dbuslib.enums.OBMC_ASSOCIATIONS_IFACE in interfaces
325
326 def index_get(self, index, path, owners):
327 items = []
328 item = self.index.get(index, {})
329 item = item.get(path, {})
330 for o in owners:
331 items.extend(item.get(o, []))
332 return items
333
334 def index_append(self, index, path, owner, assoc):
335 item = self.index.setdefault(index, {})
336 item = item.setdefault(path, {})
337 item = item.setdefault(owner, [])
338 item.append(assoc)
339
340 def index_remove(self, index, path, owner, assoc):
341 index = self.index.get(index, {})
342 owners = index.get(path, {})
343 items = owners.get(owner, [])
344 if assoc in items:
345 items.remove(assoc)
346 if not items:
347 del owners[owner]
348 if not owners:
349 del index[path]
350
351 def dbus_get_associations(self, path, owner):
352 obj = self.bus.dbus.get_object(owner, path, introspect=False)
353 iface = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
354 return [(str(f), str(r), str(e)) for f, r, e in iface.Get(
355 obmc.dbuslib.enums.OBMC_ASSOCIATIONS_IFACE,
356 'associations')]
357
358 def index_get_associations(self, path, owners=[], direction='forward'):
359 forward = 'forward' if direction == 'forward' else 'reverse'
360 reverse = 'reverse' if direction == 'forward' else 'forward'
361
362 associations = []
363 if not owners:
364 index = self.index.get(forward, {})
365 owners = index.get(path, {}).keys()
366
367 # f: forward
368 # r: reverse
369 for rassoc in self.index_get(forward, path, owners):
370 elements = rassoc.split('/')
371 rtype = ''.join(elements[-1:])
372 fendpoint = '/'.join(elements[:-1])
373 for fassoc in self.index_get(reverse, fendpoint, owners):
374 elements = fassoc.split('/')
375 ftype = ''.join(elements[-1:])
376 rendpoint = '/'.join(elements[:-1])
377 if rendpoint != path:
378 continue
379 associations.append((ftype, rtype, fendpoint))
380
381 return associations
382
383 def update_association(self, path, removed, added):
384 iface = obmc.dbuslib.enums.OBMC_ASSOC_IFACE
385 create = [] if self.manager.get(path, False) else [iface]
386
387 if added and create:
388 self.manager.add(
389 path, Association(self.bus.dbus, path, added))
390 elif added:
391 self.manager.get(path).append(added)
392
393 obj = self.manager.get(path, None)
394 if obj and removed:
395 obj.remove(removed)
396
397 if obj and not obj.endpoints:
398 self.manager.remove(path)
399
400 delete = [] if self.manager.get(path, False) else [iface]
401
402 if create != delete:
403 self.update_interfaces(
404 path, self.unique, delete, create)
405
406 def update_associations(
407 self, path, owner, old, new, created=[], destroyed=[]):
408 added = list(set(new).difference(old))
409 removed = list(set(old).difference(new))
410 for forward, reverse, endpoint in added:
411 # update the index
412 forward_path = str(path + '/' + forward)
413 reverse_path = str(endpoint + '/' + reverse)
414 self.index_append(
415 'forward', path, owner, reverse_path)
416 self.index_append(
417 'reverse', endpoint, owner, forward_path)
418
419 # create the association if the endpoint exists
420 if self.cache.get(endpoint, None) is None:
421 continue
422
423 self.update_association(forward_path, [], [endpoint])
424 self.update_association(reverse_path, [], [path])
425
426 for forward, reverse, endpoint in removed:
427 # update the index
428 forward_path = str(path + '/' + forward)
429 reverse_path = str(endpoint + '/' + reverse)
430 self.index_remove(
431 'forward', path, owner, reverse_path)
432 self.index_remove(
433 'reverse', endpoint, owner, forward_path)
434
435 # destroy the association if it exists
436 self.update_association(forward_path, [endpoint], [])
437 self.update_association(reverse_path, [path], [])
438
439 # If the associations interface endpoint comes
440 # or goes create or destroy the appropriate
441 # associations
442 for path in created:
443 for forward, reverse, endpoint in \
444 self.index_get_associations(path, direction='reverse'):
445 forward_path = str(path + '/' + forward)
446 reverse_path = str(endpoint + '/' + reverse)
447 self.update_association(forward_path, [], [endpoint])
448 self.update_association(reverse_path, [], [path])
449
450 for path in destroyed:
451 for forward, reverse, endpoint in \
452 self.index_get_associations(path, direction='reverse'):
453 forward_path = str(path + '/' + forward)
454 reverse_path = str(endpoint + '/' + reverse)
455 self.update_association(forward_path, [endpoint], [])
456 self.update_association(reverse_path, [path], [])
457
458 @dbus.service.method(obmc.mapper.MAPPER_IFACE, 's', 'a{sa{sas}}')
459 def GetAncestors(self, path):
460 elements = filter(bool, path.split('/'))
461 paths = []
462 objs = {}
463 while elements:
464 elements.pop()
465 paths.append('/' + '/'.join(elements))
466 if path != '/':
467 paths.append('/')
468
469 for path in paths:
470 obj = self.cache.get(path, None)
471 if obj is None:
472 continue
473 objs[path] = obj
474
475 return objs
476
Brad Bishop732c6db2015-10-19 14:49:21 -0400477
Brad Bishop732c6db2015-10-19 14:49:21 -0400478class BusWrapper:
Brad Bishop4b849412016-02-04 15:40:26 -0500479 def __init__(self, bus):
480 self.dbus = bus
Brad Bishop732c6db2015-10-19 14:49:21 -0400481
Brad Bishop4b849412016-02-04 15:40:26 -0500482 def get_owned_name(self, match, bus):
483 for x in self.get_service_names(match):
484 if self.dbus.get_name_owner(x) == bus:
485 return x
Brad Bishop5ffc2a32015-11-25 08:46:01 -0500486
Brad Bishop4b849412016-02-04 15:40:26 -0500487 def get_service_names(self, match):
488 # these are well known names
489 return [x for x in self.dbus.list_names()
490 if match(x)]
Brad Bishop732c6db2015-10-19 14:49:21 -0400491
Brad Bishop4b849412016-02-04 15:40:26 -0500492 def get_owner_names(self, match):
493 # these are unique connection names
494 return list(set(
495 [self.dbus.get_name_owner(x)
496 for x in self.get_service_names(match)]))
Brad Bishop732c6db2015-10-19 14:49:21 -0400497
Brad Bishop732c6db2015-10-19 14:49:21 -0400498if __name__ == '__main__':
Brad Bishop4b849412016-02-04 15:40:26 -0500499 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
500 bus = dbus.SystemBus()
Brad Bishopfb1f58e2016-03-04 15:19:13 -0500501 o = ObjectMapper(BusWrapper(bus), obmc.mapper.MAPPER_PATH)
Brad Bishop4b849412016-02-04 15:40:26 -0500502 loop = gobject.MainLoop()
Brad Bishop732c6db2015-10-19 14:49:21 -0400503
Brad Bishop4b849412016-02-04 15:40:26 -0500504 loop.run()