Dan Kenigsberg has posted comments on this change. Change subject: netlink: event monitor ......................................................................
Patch Set 23: Code-Review-1 (4 comments) http://gerrit.ovirt.org/#/c/36197/23/lib/vdsm/netlink/monitor.py File lib/vdsm/netlink/monitor.py: Line 75: ipv4-route ipv6-ifaddr, ipv6-mroute, ipv6-route, ipv6-ifinfo, Line 76: decnet-ifaddr, decnet-route, ipv6-prefix Line 77: """ Line 78: def __init__(self, groups=frozenset()): Line 79: self.stopped = False this should better be private now. Line 80: if groups: Line 81: self._groups = groups Line 82: else: Line 83: self._groups = _GROUPS.keys() http://gerrit.ovirt.org/#/c/36197/23/tests/netlinkTests.py File tests/netlinkTests.py: Line 26: @ValidateRunningAsRoot Line 27: def test_iterate_while_events(self): Line 28: """Tests if monitor is able to catch event while iterating. Before the Line 29: iteration we start _add_device, which waits for iteration_ready event. Line 30: """ place dummy_name = 'yet to be defined' here, so the name can be used by the iteration Line 31: def _add_device(): Line 32: time.sleep(.2) Line 33: dummy_name = dummy.create(prefix='dummy_mon_') Line 34: dummy.remove(dummy_name) Line 48: dummy.remove(dummy_name) Line 49: Line 50: found = any('dummy_mon_' in event.get('name', frozenset()) Line 51: for event in mon) Line 52: self.assertTrue(found, 'Expected event was not catched.') caught Line 53: Line 54: @ValidateRunningAsRoot Line 55: def test_event_groups(self): Line 56: with _timed_monitor(1, groups=('ipv4-ifaddr',)) as mon_a: Line 85: with self.assertRaises(StopIteration): Line 86: while True: Line 87: iterator.next() Line 88: Line 89: # TODO: sync version drop this one? Line 90: @ValidateRunningAsRoot Line 91: def test_events_keys(self): Line 92: def _expected_events(nic, address, cidr): Line 93: return deque([ -- To view, visit http://gerrit.ovirt.org/36197 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f4fcfde87ad51eb832f54862371b4da1281826e Gerrit-PatchSet: 23 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Petr Horáček <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
