)]}'
{"nova/compute/utils.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"6a1dcc421079e9cf28a47b304c38c50ca74ef9b5","unresolved":false,"context_lines":[{"line_number":935,"context_line":"    notification \u003d libvirt_notification.LibvirtErrorNotification("},{"line_number":936,"context_line":"        priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":937,"context_line":"        publisher\u003dnotification_base.NotificationPublisher("},{"line_number":938,"context_line":"            host\u003dCONF.host, binary\u003d\"nova-compute\"),"},{"line_number":939,"context_line":"        event_type\u003dnotification_base.EventType("},{"line_number":940,"context_line":"            object\u003d\u0027libvirt\u0027,"},{"line_number":941,"context_line":"            action\u003dfields.NotificationAction.LIBVIRT_ERROR),"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_32c2905a","line":938,"range":{"start_line":938,"start_character":28,"end_line":938,"end_character":34},"updated":"2017-09-29 04:29:28.000000000","message":"It should be \u0027source\u0027.","commit_id":"59a8cdbf455513e8902e827b1dcc46db50bfa6f0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f3a0990a8cc5188901f062019803712cf73e0240","unresolved":false,"context_lines":[{"line_number":761,"context_line":""},{"line_number":762,"context_line":""},{"line_number":763,"context_line":"@rpc.if_notifications_enabled"},{"line_number":764,"context_line":"def notify_about_libvirt_error(context, ip, exception, tb):"},{"line_number":765,"context_line":"    \"\"\"Send a versioned notification about libvirt error."},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    :param context: the request context"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_d18127fc","line":764,"range":{"start_line":764,"start_character":4,"end_line":764,"end_character":30},"updated":"2018-07-17 08:22:18.000000000","message":"as it is now sends libvirt.connect.error notification and not a generic libvirt.error I would call this out in the name of the function as well. like notify_about_libvirt_connect_error()","commit_id":"6db85ce96455db8c319519616ded0195803a838b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e5831c9d170df3c549569366dec5839c4fb151e2","unresolved":false,"context_lines":[{"line_number":761,"context_line":""},{"line_number":762,"context_line":""},{"line_number":763,"context_line":"@rpc.if_notifications_enabled"},{"line_number":764,"context_line":"def notify_about_libvirt_error(context, ip, exception, tb):"},{"line_number":765,"context_line":"    \"\"\"Send a versioned notification about libvirt error."},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    :param context: the request context"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_7dba4b71","line":764,"range":{"start_line":764,"start_character":4,"end_line":764,"end_character":30},"in_reply_to":"5f7c97a3_d18127fc","updated":"2018-07-18 04:17:44.000000000","message":"Done","commit_id":"6db85ce96455db8c319519616ded0195803a838b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f3a0990a8cc5188901f062019803712cf73e0240","unresolved":false,"context_lines":[{"line_number":762,"context_line":""},{"line_number":763,"context_line":"@rpc.if_notifications_enabled"},{"line_number":764,"context_line":"def notify_about_libvirt_error(context, ip, exception, tb):"},{"line_number":765,"context_line":"    \"\"\"Send a versioned notification about libvirt error."},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    :param context: the request context"},{"line_number":768,"context_line":"    :param ip: the IP address of the host"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_717a9325","line":765,"range":{"start_line":765,"start_character":43,"end_line":765,"end_character":57},"updated":"2018-07-17 08:22:18.000000000","message":"libvirt connect error","commit_id":"6db85ce96455db8c319519616ded0195803a838b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e5831c9d170df3c549569366dec5839c4fb151e2","unresolved":false,"context_lines":[{"line_number":762,"context_line":""},{"line_number":763,"context_line":"@rpc.if_notifications_enabled"},{"line_number":764,"context_line":"def notify_about_libvirt_error(context, ip, exception, tb):"},{"line_number":765,"context_line":"    \"\"\"Send a versioned notification about libvirt error."},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    :param context: the request context"},{"line_number":768,"context_line":"    :param ip: the IP address of the host"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_3db0538d","line":765,"range":{"start_line":765,"start_character":43,"end_line":765,"end_character":57},"in_reply_to":"5f7c97a3_717a9325","updated":"2018-07-18 04:17:44.000000000","message":"Done","commit_id":"6db85ce96455db8c319519616ded0195803a838b"}],"nova/notifications/objects/libvirt.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f3a0990a8cc5188901f062019803712cf73e0240","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"@nova_base.NovaObjectRegistry.register_notification"},{"line_number":19,"context_line":"class LibvirtErrorPayload(base.NotificationPayloadBase):"},{"line_number":20,"context_line":"    # Version 1.0: Initial version"},{"line_number":21,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":22,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_f191c3f8","line":19,"range":{"start_line":19,"start_character":6,"end_line":19,"end_character":25},"updated":"2018-07-17 08:22:18.000000000","message":"The payload is not specific for the libvirt.connect.error (the only notification using it so far) therefore I agree to give it the generic LibvirtErrorPayload name.","commit_id":"6db85ce96455db8c319519616ded0195803a838b"}],"nova/tests/functional/notification_sample_tests/test_libvirt.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f3a0990a8cc5188901f062019803712cf73e0240","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        notification_sample_base.NotificationSampleTestBase):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        # By default, this test is skipped"},{"line_number":35,"context_line":"        # because the libvirt module cannot be imported."},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            self.libvirt \u003d importutils.import_module(\u0027libvirt\u0027)"},{"line_number":38,"context_line":"        except ImportError:"},{"line_number":39,"context_line":"            self.skipTest(\"Skip functional tests for versioned notifications \""},{"line_number":40,"context_line":"                          \"about libvirt because the libvirt module cannot be \""},{"line_number":41,"context_line":"                          \"imported.\")"},{"line_number":42,"context_line":"        self.flags(compute_driver\u003d\u0027libvirt.LibvirtDriver\u0027)"},{"line_number":43,"context_line":"        self.useFixture(fixtures.MockPatchObject(host.Host, \u0027initialize\u0027))"},{"line_number":44,"context_line":"        super(TestLibvirtErrorNotificationSample, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_e4cfbf88","line":41,"range":{"start_line":34,"start_character":0,"end_line":41,"end_character":38},"updated":"2018-07-17 08:22:18.000000000","message":"This is now always skipped. But I think I found a way to make it run:\n\n-- a/nova/tests/functional/notification_sample_tests/test_libvirt.py\n+++ b/nova/tests/functional/notification_sample_tests/test_libvirt.py\n@@ -21,6 +21,7 @@ from nova import exception\n from nova.tests.functional.notification_sample_tests \\\n     import notification_sample_base\n from nova.tests.unit import fake_notifier\n+from nova.tests.unit.virt.libvirt import fakelibvirt\n from nova.virt.libvirt import host\n \n \n@@ -31,21 +32,14 @@ class TestLibvirtErrorNotificationSample(\n         notification_sample_base.NotificationSampleTestBase):\n \n     def setUp(self):\n-        # By default, this test is skipped\n-        # because the libvirt module cannot be imported.\n-        try:\n-            self.libvirt \u003d importutils.import_module(\u0027libvirt\u0027)\n-        except ImportError:\n-            self.skipTest(\"Skip functional tests for versioned notifications \"\n-                          \"about libvirt because the libvirt module cannot be \"\n-                          \"imported.\")\n+        self.useFixture(fakelibvirt.FakeLibvirtFixture())\n         self.flags(compute_driver\u003d\u0027libvirt.LibvirtDriver\u0027)\n         self.useFixture(fixtures.MockPatchObject(host.Host, \u0027initialize\u0027))\n         super(TestLibvirtErrorNotificationSample, self).setUp()\n \n     @mock.patch(\u0027nova.virt.libvirt.host.Host._get_connection\u0027)\n     def test_libvirt_connect_error(self, mock_get_conn):\n-        mock_get_conn.side_effect \u003d self.libvirt.libvirtError(\n+        mock_get_conn.side_effect \u003d fakelibvirt.libvirtError(\n             \u0027Sample exception for versioned notification test.\u0027)\n         # restart the compute service\n         self.assertRaises(exception.HypervisorUnavailable,","commit_id":"6db85ce96455db8c319519616ded0195803a838b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e5831c9d170df3c549569366dec5839c4fb151e2","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        notification_sample_base.NotificationSampleTestBase):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        # By default, this test is skipped"},{"line_number":35,"context_line":"        # because the libvirt module cannot be imported."},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            self.libvirt \u003d importutils.import_module(\u0027libvirt\u0027)"},{"line_number":38,"context_line":"        except ImportError:"},{"line_number":39,"context_line":"            self.skipTest(\"Skip functional tests for versioned notifications \""},{"line_number":40,"context_line":"                          \"about libvirt because the libvirt module cannot be \""},{"line_number":41,"context_line":"                          \"imported.\")"},{"line_number":42,"context_line":"        self.flags(compute_driver\u003d\u0027libvirt.LibvirtDriver\u0027)"},{"line_number":43,"context_line":"        self.useFixture(fixtures.MockPatchObject(host.Host, \u0027initialize\u0027))"},{"line_number":44,"context_line":"        super(TestLibvirtErrorNotificationSample, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_bda30344","line":41,"range":{"start_line":34,"start_character":0,"end_line":41,"end_character":38},"in_reply_to":"5f7c97a3_e4cfbf88","updated":"2018-07-18 04:17:44.000000000","message":"Nice advice! Thanks.\nDone.","commit_id":"6db85ce96455db8c319519616ded0195803a838b"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"6a1dcc421079e9cf28a47b304c38c50ca74ef9b5","unresolved":false,"context_lines":[{"line_number":7443,"context_line":"                \u0027this function is not supported by the connection driver:\u0027"},{"line_number":7444,"context_line":"                \u0027 virCompareCPU\u0027,"},{"line_number":7445,"context_line":"                error_code\u003dfakelibvirt.VIR_ERR_NO_SUPPORT)"},{"line_number":7446,"context_line":""},{"line_number":7447,"context_line":"        mock_compare.side_effect \u003d not_supported_exc"},{"line_number":7448,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":7449,"context_line":"        ret \u003d conn._compare_cpu(None, jsonutils.dumps(_fake_cpu_info),"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_72c36858","line":7446,"updated":"2017-09-29 04:29:28.000000000","message":"Unnecessary change.","commit_id":"59a8cdbf455513e8902e827b1dcc46db50bfa6f0"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d526425cceb6d10b0fde0e815e70c6cd33460416","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                           method\u003d\u0027_connect\u0027,"},{"line_number":467,"context_line":"                           reason\u003dex)"},{"line_number":468,"context_line":"            ctxt \u003d nova_context.get_admin_context()"},{"line_number":469,"context_line":"            rpc.get_notifier(\u0027compute\u0027).error(ctxt,"},{"line_number":470,"context_line":"                                              \u0027compute.libvirt.error\u0027,"},{"line_number":471,"context_line":"                                              payload)"},{"line_number":472,"context_line":"            compute_utils.notify_about_libvirt_connect_error("}],"source_content_type":"text/x-python","patch_set":19,"id":"3f79a3b5_ac15a94e","line":469,"updated":"2018-09-24 10:40:12.000000000","message":"Nit: Part of me thinks we should move this into compute utils near the other notifications, although it feels like it would want to be separate change, maybe as a follow on.","commit_id":"c0e4e162ce732086c64134ce31c3d5faa06c10d7"}]}
