)]}'
{"nova/tests/unit/virt/libvirt/test_host.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d5932db49ed6405dc9f11e50213020aebd7f3a22","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    def test_event_lifecycle_callback_suspended_migrated_job_failed("},{"line_number":239,"context_line":"            self, find_job_type, get_job_info):"},{"line_number":240,"context_line":"        \"\"\"Tests the suspended lifecycle event with libvirt with migrated\"\"\""},{"line_number":241,"context_line":"        hostimpl \u003d mock.MagicMock()"},{"line_number":242,"context_line":"        conn \u003d mock.MagicMock()"},{"line_number":243,"context_line":"        fake_dom_xml \u003d \"\"\""},{"line_number":244,"context_line":"                \u003cdomain type\u003d\u0027kvm\u0027\u003e"},{"line_number":245,"context_line":"                  \u003cuuid\u003ecef19ce0-0ca2-11df-855d-b19fbce37686\u003c/uuid\u003e"},{"line_number":246,"context_line":"                \u003c/domain\u003e"},{"line_number":247,"context_line":"            \"\"\""},{"line_number":248,"context_line":"        dom \u003d fakelibvirt.Domain(conn, fake_dom_xml, running\u003dTrue)"},{"line_number":249,"context_line":"        jobinfo \u003d libvirt_guest.JobInfo(type\u003dfakelibvirt.VIR_DOMAIN_JOB_NONE)"},{"line_number":250,"context_line":"        get_job_info.return_value \u003d jobinfo"},{"line_number":251,"context_line":"        # If the job type is VIR_DOMAIN_JOB_NONE we\u0027ll attempt to figure out"},{"line_number":252,"context_line":"        # the actual job status, so in this case we mock it to be a failure."},{"line_number":253,"context_line":"        find_job_type.return_value \u003d fakelibvirt.VIR_DOMAIN_JOB_FAILED"},{"line_number":254,"context_line":"        host.Host._event_lifecycle_callback("},{"line_number":255,"context_line":"            conn, dom, fakelibvirt.VIR_DOMAIN_EVENT_SUSPENDED,"},{"line_number":256,"context_line":"            detail\u003dfakelibvirt.VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED,"},{"line_number":257,"context_line":"            opaque\u003dhostimpl)"},{"line_number":258,"context_line":"        expected_event \u003d hostimpl._queue_event.call_args[0][0]"},{"line_number":259,"context_line":"        self.assertEqual(event.EVENT_LIFECYCLE_PAUSED,"},{"line_number":260,"context_line":"                         expected_event.transition)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_ad28d733","line":257,"range":{"start_line":241,"start_character":0,"end_line":257,"end_character":28},"updated":"2019-05-23 16:30:52.000000000","message":"Most of this is very similar to above and could probably have gone into a \u0027_test_event_lifecycle_suspcted_migrated\u0027 helper function that just took a \u0027jobinfo\u0027 param","commit_id":"61b67c2fd1d07390fb45eb70f37fef20c8c6abb4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d5932db49ed6405dc9f11e50213020aebd7f3a22","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.assertEqual(event.EVENT_LIFECYCLE_PAUSED,"},{"line_number":260,"context_line":"                         expected_event.transition)"},{"line_number":261,"context_line":"        get_job_info.assert_called_once_with()"},{"line_number":262,"context_line":"        find_job_type.assert_called_once_with("},{"line_number":263,"context_line":"            test.MatchType(libvirt_guest.Guest), instance\u003dNone,"},{"line_number":264,"context_line":"            logging_ok\u003dFalse)"},{"line_number":265,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_edd32f37","line":262,"range":{"start_line":262,"start_character":0,"end_line":262,"end_character":46},"updated":"2019-05-23 16:30:52.000000000","message":"Worth asserting this _wasn\u0027t_ called above?","commit_id":"61b67c2fd1d07390fb45eb70f37fef20c8c6abb4"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6b28e91ae11d2a1a356561c914f9e44470a79e1","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def _event_lifecycle_callback(conn, dom, event, detail, opaque):"},{"line_number":157,"context_line":"        \"\"\"Receives lifecycle events from libvirt."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        NB: this method is executing in a native thread, not"},{"line_number":160,"context_line":"        an eventlet coroutine. It can only invoke other libvirt"},{"line_number":161,"context_line":"        APIs, or use self._queue_event(). Any use of logging APIs"},{"line_number":162,"context_line":"        in particular is forbidden."},{"line_number":163,"context_line":"        \"\"\""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        self \u003d opaque"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_3fc2a035","line":162,"range":{"start_line":159,"start_character":8,"end_line":162,"end_character":35},"updated":"2018-08-22 19:16:19.000000000","message":"note","commit_id":"2d51ae291330e560213a13e3fb117ee86776f699"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9354c78d9043e01e9929d5b88db9c96fe09e1d5a","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                    # Either still running, or failed or completed,"},{"line_number":195,"context_line":"                    # lets untangle the mess."},{"line_number":196,"context_line":"                    info.type \u003d libvirt_migrate.find_job_type("},{"line_number":197,"context_line":"                        guest, instance\u003dNone, logging_ok\u003dFalse)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"                if info.type \u003d\u003d libvirt.VIR_DOMAIN_JOB_COMPLETED:"},{"line_number":200,"context_line":"                    transition \u003d virtevent.EVENT_LIFECYCLE_MIGRATION_COMPLETED"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_27014407","line":197,"range":{"start_line":197,"start_character":46,"end_line":197,"end_character":62},"updated":"2018-08-22 13:42:08.000000000","message":"so for my own knoladge. bassed on the comment in the find_job_type fucntion we are setting this to false as this is on a real os thread instead of a green tread. as a result we dont want to logs because that would block?","commit_id":"2d51ae291330e560213a13e3fb117ee86776f699"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6b28e91ae11d2a1a356561c914f9e44470a79e1","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                    # Either still running, or failed or completed,"},{"line_number":195,"context_line":"                    # lets untangle the mess."},{"line_number":196,"context_line":"                    info.type \u003d libvirt_migrate.find_job_type("},{"line_number":197,"context_line":"                        guest, instance\u003dNone, logging_ok\u003dFalse)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"                if info.type \u003d\u003d libvirt.VIR_DOMAIN_JOB_COMPLETED:"},{"line_number":200,"context_line":"                    transition \u003d virtevent.EVENT_LIFECYCLE_MIGRATION_COMPLETED"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_5fbf5ca9","line":197,"range":{"start_line":197,"start_character":46,"end_line":197,"end_character":62},"in_reply_to":"3f79a3b5_27014407","updated":"2018-08-22 19:16:19.000000000","message":"Yes, see the note above in the method docstring.","commit_id":"2d51ae291330e560213a13e3fb117ee86776f699"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9565b52ced0f3096b1a1553e8649f04026cb2f6d","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                guest \u003d libvirt_guest.Guest(dom)"},{"line_number":189,"context_line":"                info \u003d guest.get_job_info()"},{"line_number":190,"context_line":"                if info.type \u003d\u003d libvirt.VIR_DOMAIN_JOB_NONE:"},{"line_number":191,"context_line":"                    # Either still running, or failed or completed,"},{"line_number":192,"context_line":"                    # lets untangle the mess."},{"line_number":193,"context_line":"                    info.type \u003d libvirt_migrate.find_job_type("},{"line_number":194,"context_line":"                        guest, instance\u003dNone, logging_ok\u003dFalse)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"                if info.type \u003d\u003d libvirt.VIR_DOMAIN_JOB_COMPLETED:"},{"line_number":197,"context_line":"                    transition \u003d virtevent.EVENT_LIFECYCLE_MIGRATION_COMPLETED"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_b50b277b","line":194,"range":{"start_line":191,"start_character":0,"end_line":194,"end_character":63},"updated":"2019-05-24 15:42:38.000000000","message":"A solution to try determining the migration status when we get a VIR_DOMAIN_JOB_NONE is perhaps to look at the result of the migration API. I proposed some time ago a couple of patches here [0], if that can help.\n\n[0] https://review.opendev.org/#/q/status:abandoned+topic:bug/1653718","commit_id":"61b67c2fd1d07390fb45eb70f37fef20c8c6abb4"}],"nova/virt/libvirt/migration.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9565b52ced0f3096b1a1553e8649f04026cb2f6d","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    :returns: a libvirt job type constant"},{"line_number":358,"context_line":"    \"\"\""},{"line_number":359,"context_line":"    def _log(func, msg, *args, **kwargs):"},{"line_number":360,"context_line":"        if logging_ok:"},{"line_number":361,"context_line":"            func(msg, *args, **kwargs)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    try:"},{"line_number":364,"context_line":"        if guest.is_active():"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_1569d31f","line":361,"range":{"start_line":359,"start_character":0,"end_line":361,"end_character":38},"updated":"2019-05-24 15:42:38.000000000","message":"I would have mentioned something in the commit message about this change.","commit_id":"61b67c2fd1d07390fb45eb70f37fef20c8c6abb4"}]}
