)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":27345,"context_line":"    def test_event_not_received(self):"},{"line_number":27346,"context_line":"        waiter \u003d self.handler.create_waiter(uuids.instance, \u0027virtio-1\u0027)"},{"line_number":27347,"context_line":""},{"line_number":27348,"context_line":"        received_event \u003d self.handler.wait(waiter, timeout\u003d1)"},{"line_number":27349,"context_line":""},{"line_number":27350,"context_line":"        self.assertIsNone(received_event)"},{"line_number":27351,"context_line":"        self.assert_handler_clean()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3b4695ae_99840a34","line":27348,"range":{"start_line":27348,"start_character":59,"end_line":27348,"end_character":60},"updated":"2021-02-09 15:06:14.000000000","message":"Can we make this smaller? Save us the time. We\u0027d have to accept floats though","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":27345,"context_line":"    def test_event_not_received(self):"},{"line_number":27346,"context_line":"        waiter \u003d self.handler.create_waiter(uuids.instance, \u0027virtio-1\u0027)"},{"line_number":27347,"context_line":""},{"line_number":27348,"context_line":"        received_event \u003d self.handler.wait(waiter, timeout\u003d1)"},{"line_number":27349,"context_line":""},{"line_number":27350,"context_line":"        self.assertIsNone(received_event)"},{"line_number":27351,"context_line":"        self.assert_handler_clean()"}],"source_content_type":"text/x-python","patch_set":5,"id":"0f8dc757_74d334cb","line":27348,"range":{"start_line":27348,"start_character":59,"end_line":27348,"end_character":60},"in_reply_to":"3b4695ae_99840a34","updated":"2021-02-22 15:11:35.000000000","message":"made it smaller, I hope that slow nodes will not trick us into intermittently failing test case","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":27389,"context_line":"        waiter \u003d self.handler.create_waiter(uuids.instance1, \u0027virtio-1\u0027)"},{"line_number":27390,"context_line":"        self.handler.remove_waiter(waiter)"},{"line_number":27391,"context_line":""},{"line_number":27392,"context_line":"        self.assertRaises(ValueError, self.handler.wait, waiter, timeout\u003d1)"},{"line_number":27393,"context_line":"        self.assert_handler_clean()"}],"source_content_type":"text/x-python","patch_set":5,"id":"01557b01_df6f4e80","line":27392,"updated":"2021-02-09 15:06:14.000000000","message":"A comment about why this fails would be helpful. In fact, context comments through the tests would be useful. The names give a lot away but the extra dash of colour is helpful for older us, heh","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":27389,"context_line":"        waiter \u003d self.handler.create_waiter(uuids.instance1, \u0027virtio-1\u0027)"},{"line_number":27390,"context_line":"        self.handler.remove_waiter(waiter)"},{"line_number":27391,"context_line":""},{"line_number":27392,"context_line":"        self.assertRaises(ValueError, self.handler.wait, waiter, timeout\u003d1)"},{"line_number":27393,"context_line":"        self.assert_handler_clean()"}],"source_content_type":"text/x-python","patch_set":5,"id":"e4c5f5a0_1f91cdb2","line":27392,"in_reply_to":"01557b01_df6f4e80","updated":"2021-02-22 15:11:35.000000000","message":"factored out","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":254,"context_line":"        # \u003cinstance.uuid\u003e-\u003cdevice-name\u003e key"},{"line_number":255,"context_line":"        self._results: ty.Dict["},{"line_number":256,"context_line":"            str, ty.Union["},{"line_number":257,"context_line":"                libvirtevent.DeviceRemovedEvent,"},{"line_number":258,"context_line":"                libvirtevent.DeviceRemovalFailedEvent]] \u003d {}"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def create_waiter(self, instance_uuid: str, device_name: str) -\u003e str:"}],"source_content_type":"text/x-python","patch_set":5,"id":"d8fdba67_74fbb26e","line":257,"updated":"2021-02-09 15:06:14.000000000","message":"I\u0027d be wary that this list could grow without bound. We should be able to just use \u0027libvirtevent.LibvirtEvent\u0027 here as the types you\u0027ve listed subclass that","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        # \u003cinstance.uuid\u003e-\u003cdevice-name\u003e key"},{"line_number":255,"context_line":"        self._results: ty.Dict["},{"line_number":256,"context_line":"            str, ty.Union["},{"line_number":257,"context_line":"                libvirtevent.DeviceRemovedEvent,"},{"line_number":258,"context_line":"                libvirtevent.DeviceRemovalFailedEvent]] \u003d {}"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def create_waiter(self, instance_uuid: str, device_name: str) -\u003e str:"}],"source_content_type":"text/x-python","patch_set":5,"id":"90d6374d_dc20f3bb","line":257,"in_reply_to":"00fe34ec_6435616b","updated":"2021-02-22 15:11:35.000000000","message":"So I made it generic for all the device related events. To accommodate future device related event I need to extend the interface so that the client can specify which event type(s) it is waiting for.","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d15e1009599df17ad81ea88af292135c789cd5d9","unresolved":true,"context_lines":[{"line_number":254,"context_line":"        # \u003cinstance.uuid\u003e-\u003cdevice-name\u003e key"},{"line_number":255,"context_line":"        self._results: ty.Dict["},{"line_number":256,"context_line":"            str, ty.Union["},{"line_number":257,"context_line":"                libvirtevent.DeviceRemovedEvent,"},{"line_number":258,"context_line":"                libvirtevent.DeviceRemovalFailedEvent]] \u003d {}"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def create_waiter(self, instance_uuid: str, device_name: str) -\u003e str:"}],"source_content_type":"text/x-python","patch_set":5,"id":"00fe34ec_6435616b","line":257,"in_reply_to":"cc2f17c1_691322f4","updated":"2021-02-19 18:13:37.000000000","message":"@Stephen: so you basically suggest to create the generic event handler instead of having a specific handler for the Detach events. I see the temptation to do that but for that I would have to see if the other events are also working similarly. E.g. if libvirt always sends the device alias in every event so this code can rely on that. I guess there could be events that is not connected to a specific device so the whole device alias as identity does not work in the generic case. I can define an event sublcass, e.g. DeviceRelatedLibvirtEvent, and generalize this event handler based on the contract that DeviceRelatedLibvirtEvent subclasses always have a device alias in them.","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"474e5d32ca0173880572180a99663f727a12e904","unresolved":true,"context_lines":[{"line_number":254,"context_line":"        # \u003cinstance.uuid\u003e-\u003cdevice-name\u003e key"},{"line_number":255,"context_line":"        self._results: ty.Dict["},{"line_number":256,"context_line":"            str, ty.Union["},{"line_number":257,"context_line":"                libvirtevent.DeviceRemovedEvent,"},{"line_number":258,"context_line":"                libvirtevent.DeviceRemovalFailedEvent]] \u003d {}"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def create_waiter(self, instance_uuid: str, device_name: str) -\u003e str:"}],"source_content_type":"text/x-python","patch_set":5,"id":"cc2f17c1_691322f4","line":257,"in_reply_to":"d8fdba67_74fbb26e","updated":"2021-02-16 14:42:31.000000000","message":"I think this is fine tbh, the handler is specifically for the detach flow and I can\u0027t imagine there being a slew of new events for this in libvirt anytime soon.","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":262,"context_line":"        wait for the libvirt event"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        :param instance_uuid: The UUID of the instance."},{"line_number":265,"context_line":"        :param device-name: The device name alias used by libvirt for this"},{"line_number":266,"context_line":"            device."},{"line_number":267,"context_line":"        :returns: an opque token to be used with wait_for_event()."},{"line_number":268,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"ea3d5e03_e788791c","line":265,"range":{"start_line":265,"start_character":21,"end_line":265,"end_character":22},"updated":"2021-02-09 15:06:14.000000000","message":"_","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        wait for the libvirt event"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        :param instance_uuid: The UUID of the instance."},{"line_number":265,"context_line":"        :param device-name: The device name alias used by libvirt for this"},{"line_number":266,"context_line":"            device."},{"line_number":267,"context_line":"        :returns: an opque token to be used with wait_for_event()."},{"line_number":268,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"0ee9a1be_dfa64060","line":265,"range":{"start_line":265,"start_character":21,"end_line":265,"end_character":22},"in_reply_to":"ea3d5e03_e788791c","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        wait for the libvirt event"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        :param instance_uuid: The UUID of the instance."},{"line_number":265,"context_line":"        :param device-name: The device name alias used by libvirt for this"},{"line_number":266,"context_line":"            device."},{"line_number":267,"context_line":"        :returns: an opque token to be used with wait_for_event()."},{"line_number":268,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3063d240_c41d6561","line":265,"range":{"start_line":265,"start_character":21,"end_line":265,"end_character":22},"in_reply_to":"ea3d5e03_e788791c","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":264,"context_line":"        :param instance_uuid: The UUID of the instance."},{"line_number":265,"context_line":"        :param device-name: The device name alias used by libvirt for this"},{"line_number":266,"context_line":"            device."},{"line_number":267,"context_line":"        :returns: an opque token to be used with wait_for_event()."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        event_name \u003d f\"{instance_uuid}-{device_name}\""},{"line_number":270,"context_line":"        with self._lock:"}],"source_content_type":"text/x-python","patch_set":5,"id":"a8377772_7c24273e","line":267,"range":{"start_line":267,"start_character":21,"end_line":267,"end_character":26},"updated":"2021-02-09 15:06:14.000000000","message":"opaque?","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        :param instance_uuid: The UUID of the instance."},{"line_number":265,"context_line":"        :param device-name: The device name alias used by libvirt for this"},{"line_number":266,"context_line":"            device."},{"line_number":267,"context_line":"        :returns: an opque token to be used with wait_for_event()."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        event_name \u003d f\"{instance_uuid}-{device_name}\""},{"line_number":270,"context_line":"        with self._lock:"}],"source_content_type":"text/x-python","patch_set":5,"id":"509def77_e2b466d7","line":267,"range":{"start_line":267,"start_character":21,"end_line":267,"end_character":26},"in_reply_to":"a8377772_7c24273e","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        :param instance_uuid: The UUID of the instance."},{"line_number":265,"context_line":"        :param device-name: The device name alias used by libvirt for this"},{"line_number":266,"context_line":"            device."},{"line_number":267,"context_line":"        :returns: an opque token to be used with wait_for_event()."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        event_name \u003d f\"{instance_uuid}-{device_name}\""},{"line_number":270,"context_line":"        with self._lock:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ad7e909e_612c5ead","line":267,"range":{"start_line":267,"start_character":21,"end_line":267,"end_character":26},"in_reply_to":"a8377772_7c24273e","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        return event_name"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def remove_waiter(self, token: str):"},{"line_number":293,"context_line":"        \"\"\"Deletes the waiter"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        :param token: the opaque token returned by create_waiter() to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"ce9efca4_9890369d","line":292,"range":{"start_line":292,"start_character":8,"end_line":292,"end_character":14},"updated":"2021-02-09 15:06:14.000000000","message":"delete, or use \u0027add_waiter\u0027 above (the opposite of create is delete, and the opposite of remove is add)","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        return event_name"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def remove_waiter(self, token: str):"},{"line_number":293,"context_line":"        \"\"\"Deletes the waiter"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        :param token: the opaque token returned by create_waiter() to be"}],"source_content_type":"text/x-python","patch_set":5,"id":"7b433448_a540c7eb","line":292,"range":{"start_line":292,"start_character":8,"end_line":292,"end_character":14},"in_reply_to":"ce9efca4_9890369d","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":299,"context_line":"            self._waiters.pop(token, None)"},{"line_number":300,"context_line":"            self._results.pop(token, None)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def wait(self, token: str, timeout: int,"},{"line_number":303,"context_line":"    ) -\u003e ty.Union["},{"line_number":304,"context_line":"        None,"},{"line_number":305,"context_line":"        libvirtevent.DeviceRemovedEvent,"}],"source_content_type":"text/x-python","patch_set":5,"id":"6c60ad9a_7e61725e","line":302,"range":{"start_line":302,"start_character":40,"end_line":302,"end_character":43},"updated":"2021-02-09 15:06:14.000000000","message":"fyi, the \u0027wait\u0027 method you\u0027re calling expects floats [1]. int works of course but floats might be useful for unit testing purposes?\n\n[1] https://docs.python.org/3/library/threading.html#threading.Event.wait","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            self._waiters.pop(token, None)"},{"line_number":300,"context_line":"            self._results.pop(token, None)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def wait(self, token: str, timeout: int,"},{"line_number":303,"context_line":"    ) -\u003e ty.Union["},{"line_number":304,"context_line":"        None,"},{"line_number":305,"context_line":"        libvirtevent.DeviceRemovedEvent,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7c4f4d0a_6f892f11","line":302,"range":{"start_line":302,"start_character":40,"end_line":302,"end_character":43},"in_reply_to":"6c60ad9a_7e61725e","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":304,"context_line":"        None,"},{"line_number":305,"context_line":"        libvirtevent.DeviceRemovedEvent,"},{"line_number":306,"context_line":"        libvirtevent.DeviceRemovalFailedEvent,"},{"line_number":307,"context_line":"    ]:"},{"line_number":308,"context_line":"        \"\"\"Blocks waiting for the libvirt event represented by the opaque token"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        :param token: A token created by calling create_waiter()"}],"source_content_type":"text/x-python","patch_set":5,"id":"34cfaf41_2d01844c","line":307,"updated":"2021-02-09 15:06:14.000000000","message":"untested but\n\n  ty.Optional[libvirtevent.LibvirtEvent]\n\nshould work?","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        None,"},{"line_number":305,"context_line":"        libvirtevent.DeviceRemovedEvent,"},{"line_number":306,"context_line":"        libvirtevent.DeviceRemovalFailedEvent,"},{"line_number":307,"context_line":"    ]:"},{"line_number":308,"context_line":"        \"\"\"Blocks waiting for the libvirt event represented by the opaque token"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        :param token: A token created by calling create_waiter()"}],"source_content_type":"text/x-python","patch_set":5,"id":"4f42d13c_c9dfb153","line":307,"in_reply_to":"34cfaf41_2d01844c","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":310,"context_line":"        :param token: A token created by calling create_waiter()"},{"line_number":311,"context_line":"        :param timeout: Maximum number of seconds this call blocks waiting for"},{"line_number":312,"context_line":"            the event to be received"},{"line_number":313,"context_line":"        :returns: The received libvirt event, or None in case of timeout"},{"line_number":314,"context_line":"        \"\"\""},{"line_number":315,"context_line":"        with self._lock:"},{"line_number":316,"context_line":"            threading_event \u003d self._waiters.get(token)"}],"source_content_type":"text/x-python","patch_set":5,"id":"8d869675_d88740af","line":313,"updated":"2021-02-09 15:06:14.000000000","message":"raises","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        :param token: A token created by calling create_waiter()"},{"line_number":311,"context_line":"        :param timeout: Maximum number of seconds this call blocks waiting for"},{"line_number":312,"context_line":"            the event to be received"},{"line_number":313,"context_line":"        :returns: The received libvirt event, or None in case of timeout"},{"line_number":314,"context_line":"        \"\"\""},{"line_number":315,"context_line":"        with self._lock:"},{"line_number":316,"context_line":"            threading_event \u003d self._waiters.get(token)"}],"source_content_type":"text/x-python","patch_set":5,"id":"95705a4a_36fff4d6","line":313,"in_reply_to":"8d869675_d88740af","updated":"2021-02-22 15:11:35.000000000","message":"I factored this out","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if not received:"},{"line_number":328,"context_line":"            return None"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return result"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def notify_waiters("}],"source_content_type":"text/x-python","patch_set":5,"id":"0f99a005_e1a844a4","line":329,"range":{"start_line":329,"start_character":8,"end_line":329,"end_character":13},"updated":"2021-02-09 15:06:14.000000000","message":"nit: not necessary (early return above)","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if not received:"},{"line_number":328,"context_line":"            return None"},{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return result"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def notify_waiters("}],"source_content_type":"text/x-python","patch_set":5,"id":"f88732db_864f7980","line":329,"range":{"start_line":329,"start_character":8,"end_line":329,"end_character":13},"in_reply_to":"0f99a005_e1a844a4","updated":"2021-02-22 15:11:35.000000000","message":"factored it out","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":333,"context_line":"        self,"},{"line_number":334,"context_line":"        event: ty.Union["},{"line_number":335,"context_line":"            libvirtevent.DeviceRemovedEvent,"},{"line_number":336,"context_line":"            libvirtevent.DeviceRemovalFailedEvent],"},{"line_number":337,"context_line":"    ) -\u003e bool:"},{"line_number":338,"context_line":"        \"\"\"Unblocks the client waiting for this event."},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"f4950a0f_379ecebf","line":336,"updated":"2021-02-09 15:06:14.000000000","message":"use \u0027libvirtevent.LibvirtEvent\u0027 instead?","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        self,"},{"line_number":334,"context_line":"        event: ty.Union["},{"line_number":335,"context_line":"            libvirtevent.DeviceRemovedEvent,"},{"line_number":336,"context_line":"            libvirtevent.DeviceRemovalFailedEvent],"},{"line_number":337,"context_line":"    ) -\u003e bool:"},{"line_number":338,"context_line":"        \"\"\"Unblocks the client waiting for this event."},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"64dfe6ee_2332d5fb","line":336,"in_reply_to":"f4950a0f_379ecebf","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":345,"context_line":"            threading_event \u003d self._waiters.get(event_name)"},{"line_number":346,"context_line":"            if threading_event is None:"},{"line_number":347,"context_line":"                return False"},{"line_number":348,"context_line":"            else:"},{"line_number":349,"context_line":"                self._results[event_name] \u003d event"},{"line_number":350,"context_line":"                threading_event.set()"},{"line_number":351,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"2ad6426d_b4ff2506","line":348,"updated":"2021-02-09 15:06:14.000000000","message":"nit: not necessary (early return)","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            threading_event \u003d self._waiters.get(event_name)"},{"line_number":346,"context_line":"            if threading_event is None:"},{"line_number":347,"context_line":"                return False"},{"line_number":348,"context_line":"            else:"},{"line_number":349,"context_line":"                self._results[event_name] \u003d event"},{"line_number":350,"context_line":"                threading_event.set()"},{"line_number":351,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ea4cb20_986185d0","line":348,"in_reply_to":"2ad6426d_b4ff2506","updated":"2021-02-22 15:11:35.000000000","message":"factored it out","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":350,"context_line":"                threading_event.set()"},{"line_number":351,"context_line":"                return True"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def cleanup_waiters(self, instance_uuid):"},{"line_number":354,"context_line":"        # clean up all waiters and results related to the instance"},{"line_number":355,"context_line":"        with self._lock:"},{"line_number":356,"context_line":"            waiters \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"38bc11af_fedb9b45","line":353,"range":{"start_line":353,"start_character":30,"end_line":353,"end_character":43},"updated":"2021-02-09 15:06:14.000000000","message":"type info, including return type?","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                threading_event.set()"},{"line_number":351,"context_line":"                return True"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def cleanup_waiters(self, instance_uuid):"},{"line_number":354,"context_line":"        # clean up all waiters and results related to the instance"},{"line_number":355,"context_line":"        with self._lock:"},{"line_number":356,"context_line":"            waiters \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"7de3b432_c1e0a31c","line":353,"range":{"start_line":353,"start_character":30,"end_line":353,"end_character":43},"in_reply_to":"38bc11af_fedb9b45","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bb05c2a1a6ae9b5952782b1642a50895eabf50b","unresolved":true,"context_lines":[{"line_number":351,"context_line":"                return True"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def cleanup_waiters(self, instance_uuid):"},{"line_number":354,"context_line":"        # clean up all waiters and results related to the instance"},{"line_number":355,"context_line":"        with self._lock:"},{"line_number":356,"context_line":"            waiters \u003d {"},{"line_number":357,"context_line":"                event_name: waiter"}],"source_content_type":"text/x-python","patch_set":5,"id":"1079ceb2_8f407f8d","line":354,"updated":"2021-02-09 15:06:14.000000000","message":"could be a docstring?","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"69be3a3d7bd541caca258674cc773ada8896b244","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                return True"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def cleanup_waiters(self, instance_uuid):"},{"line_number":354,"context_line":"        # clean up all waiters and results related to the instance"},{"line_number":355,"context_line":"        with self._lock:"},{"line_number":356,"context_line":"            waiters \u003d {"},{"line_number":357,"context_line":"                event_name: waiter"}],"source_content_type":"text/x-python","patch_set":5,"id":"7573baf5_9b404f22","line":354,"in_reply_to":"1079ceb2_8f407f8d","updated":"2021-02-22 15:11:35.000000000","message":"Done","commit_id":"b1178f264c6bafe63da2da04dee6bf4186744794"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"58b73af5f50afbf17a8b6f0abd98d9c9b18873b7","unresolved":true,"context_lines":[{"line_number":260,"context_line":"            self,"},{"line_number":261,"context_line":"            instance_uuid: str,"},{"line_number":262,"context_line":"            device_name: str,"},{"line_number":263,"context_line":"            event_types: ty.Set[ty.Type[libvirtevent.DeviceEvent]]"},{"line_number":264,"context_line":"        ):"},{"line_number":265,"context_line":"            self.instance_uuid \u003d instance_uuid"},{"line_number":266,"context_line":"            self.device_name \u003d device_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"01abdbc3_84adba9d","line":263,"range":{"start_line":263,"start_character":32,"end_line":263,"end_character":40},"updated":"2021-02-23 11:44:17.000000000","message":"nit: Is this necessary? I wouldn\u0027t have thought so","commit_id":"f5cd6e2deae6209505b1b2d1a55d0f9fe6a444d0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"158ad1c93e1ef78b76f3b94b7dc3f81c6a022df5","unresolved":true,"context_lines":[{"line_number":260,"context_line":"            self,"},{"line_number":261,"context_line":"            instance_uuid: str,"},{"line_number":262,"context_line":"            device_name: str,"},{"line_number":263,"context_line":"            event_types: ty.Set[ty.Type[libvirtevent.DeviceEvent]]"},{"line_number":264,"context_line":"        ):"},{"line_number":265,"context_line":"            self.instance_uuid \u003d instance_uuid"},{"line_number":266,"context_line":"            self.device_name \u003d device_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"214476b7_9d3b0e61","line":263,"range":{"start_line":263,"start_character":32,"end_line":263,"end_character":40},"in_reply_to":"01abdbc3_84adba9d","updated":"2021-02-23 15:20:00.000000000","message":"I think ty.Set[libvirtevent.DeviceEvent] means a set of DeviceEvent objects. What we store here is a set of DeviceEvent classes.\n\nIf I remove the ty.Type here and below then on the top patch when the driver starts using the this class I get\n\nnova/virt/libvirt/driver.py: note: In member \"_detach_from_live_and_wait_for_event\" of class \"LibvirtDriver\":\nnova/virt/libvirt/driver.py:2341:14: error: Argument 1 to \u003cset\u003e has incompatible type \"Type[DeviceEvent]\"; expected \"DeviceEvent\"\nnova/virt/libvirt/driver.py:2342:14: error: Argument 2 to \u003cset\u003e has incompatible type \"Type[DeviceEvent]\"; expected \"DeviceEvent\"","commit_id":"f5cd6e2deae6209505b1b2d1a55d0f9fe6a444d0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3ca5f39a10d7104826458028df95575e12e6e15f","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            self,"},{"line_number":261,"context_line":"            instance_uuid: str,"},{"line_number":262,"context_line":"            device_name: str,"},{"line_number":263,"context_line":"            event_types: ty.Set[ty.Type[libvirtevent.DeviceEvent]]"},{"line_number":264,"context_line":"        ):"},{"line_number":265,"context_line":"            self.instance_uuid \u003d instance_uuid"},{"line_number":266,"context_line":"            self.device_name \u003d device_name"}],"source_content_type":"text/x-python","patch_set":6,"id":"d2a7e36b_a51a022b","line":263,"range":{"start_line":263,"start_character":32,"end_line":263,"end_character":40},"in_reply_to":"214476b7_9d3b0e61","updated":"2021-02-23 15:25:13.000000000","message":"Aha, so we do. I read this as being an instance rather than the class itself","commit_id":"f5cd6e2deae6209505b1b2d1a55d0f9fe6a444d0"}]}
