)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"41b8cafee1168563964839ecd2df8468d68dbdaf","unresolved":false,"context_lines":[{"line_number":17,"context_line":"to be only boolean."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I5fd13ef352fcbb4a1c96764a9e473cdaf7b128da"},{"line_number":20,"context_line":"Closes-Bug: #1251803"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F9ilw%3D","line":20,"updated":"2013-12-10 13:01:56.000000000","message":"Does this related to 1251803?","commit_id":"20e92d98cc7bab9b9dcd6b64cbed6dec03181154"}],"nova/tests/virt/libvirt/test_libvirt.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46e4201a71cc8f61720d81f8bbddef85bda64358","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            self.close_callback \u003d cb"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":718,"context_line":"        from nova.objects import service as service_obj"},{"line_number":719,"context_line":"        service_mock \u003d mock.MagicMock()"},{"line_number":720,"context_line":"        service_mock.disabled.return_value \u003d False"},{"line_number":721,"context_line":"        with contextlib.nested("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fh20%3D","line":718,"updated":"2014-01-12 14:17:34.000000000","message":"why is this import here and not at the beginning of the file?","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"5954007919617c925584cc2342c0d32aaf54a713","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            self.close_callback \u003d cb"},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":718,"context_line":"        from nova.objects import service as service_obj"},{"line_number":719,"context_line":"        service_mock \u003d mock.MagicMock()"},{"line_number":720,"context_line":"        service_mock.disabled.return_value \u003d False"},{"line_number":721,"context_line":"        with contextlib.nested("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FcMQ%3D","line":718,"in_reply_to":"AAAAUH%2F%2Fh20%3D","updated":"2014-01-13 21:26:05.000000000","message":"Done","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"a62831e4744bc273e5d40132f0b4d708d8932b72","unresolved":false,"context_lines":[{"line_number":730,"context_line":"            # verify that the driver registers for the close callback"},{"line_number":731,"context_line":"            # and re-connects after receiving the callback"},{"line_number":732,"context_line":"            conn._get_connection()"},{"line_number":733,"context_line":"            self.assertTrue(not service_mock.disabled)"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"            self.assertTrue(self.close_callback)"},{"line_number":736,"context_line":"            self.close_callback(self.conn, 1, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fh7E%3D","line":733,"updated":"2014-01-12 13:19:46.000000000","message":"Why not use \"self.assertFalse(service_mock.disabled)\"","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"5954007919617c925584cc2342c0d32aaf54a713","unresolved":false,"context_lines":[{"line_number":730,"context_line":"            # verify that the driver registers for the close callback"},{"line_number":731,"context_line":"            # and re-connects after receiving the callback"},{"line_number":732,"context_line":"            conn._get_connection()"},{"line_number":733,"context_line":"            self.assertTrue(not service_mock.disabled)"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"            self.assertTrue(self.close_callback)"},{"line_number":736,"context_line":"            self.close_callback(self.conn, 1, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FcMI%3D","line":733,"in_reply_to":"AAAAUH%2F%2Fh2w%3D","updated":"2014-01-13 21:26:05.000000000","message":"Done","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46e4201a71cc8f61720d81f8bbddef85bda64358","unresolved":false,"context_lines":[{"line_number":730,"context_line":"            # verify that the driver registers for the close callback"},{"line_number":731,"context_line":"            # and re-connects after receiving the callback"},{"line_number":732,"context_line":"            conn._get_connection()"},{"line_number":733,"context_line":"            self.assertTrue(not service_mock.disabled)"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"            self.assertTrue(self.close_callback)"},{"line_number":736,"context_line":"            self.close_callback(self.conn, 1, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fh2w%3D","line":733,"in_reply_to":"AAAAUH%2F%2Fh7E%3D","updated":"2014-01-12 14:17:34.000000000","message":"agree","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"a62831e4744bc273e5d40132f0b4d708d8932b72","unresolved":false,"context_lines":[{"line_number":731,"context_line":"            # and re-connects after receiving the callback"},{"line_number":732,"context_line":"            conn._get_connection()"},{"line_number":733,"context_line":"            self.assertTrue(not service_mock.disabled)"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"            self.assertTrue(self.close_callback)"},{"line_number":736,"context_line":"            self.close_callback(self.conn, 1, None)"},{"line_number":737,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fh7A%3D","line":734,"updated":"2014-01-12 13:19:46.000000000","message":"This line can be removed","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"}],"nova/tests/virt/test_virt_drivers.py":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"a62831e4744bc273e5d40132f0b4d708d8932b72","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        service_mock \u003d mock.MagicMock()"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"        # Previous status of the service: disabled: False"},{"line_number":753,"context_line":"        service_mock.configure_mock(disabled_reason\u003d\u0027\u0027,"},{"line_number":754,"context_line":"                                    disabled\u003dFalse)"},{"line_number":755,"context_line":"        from nova.objects import service as service_obj"},{"line_number":756,"context_line":"        with mock.patch.object(service_obj.Service, \"get_by_compute_host\","}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fh6g%3D","line":753,"updated":"2014-01-12 13:19:46.000000000","message":"It is better use \u0027None\u0027 here.\n\nservice_mock.configure_mock(disabled_reason\u003d\u0027None\u0027, disabled\u003dFalse)\n\nAlso the parameter \"disabled\" can be put to above line.","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"5954007919617c925584cc2342c0d32aaf54a713","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        service_mock \u003d mock.MagicMock()"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"        # Previous status of the service: disabled: False"},{"line_number":753,"context_line":"        service_mock.configure_mock(disabled_reason\u003d\u0027\u0027,"},{"line_number":754,"context_line":"                                    disabled\u003dFalse)"},{"line_number":755,"context_line":"        from nova.objects import service as service_obj"},{"line_number":756,"context_line":"        with mock.patch.object(service_obj.Service, \"get_by_compute_host\","}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FcME%3D","line":753,"in_reply_to":"AAAAUH%2F%2Fh6g%3D","updated":"2014-01-13 21:26:05.000000000","message":"Done","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":9046,"name":"Maithem","email":"munshedm@vmware.com","username":"Maithem"},"change_message_id":"85f002be3af3872b5e35e6aa8e8245190c152273","unresolved":false,"context_lines":[{"line_number":757,"context_line":"                               return_value\u003dservice_mock):"},{"line_number":758,"context_line":"            self.connection._set_host_enabled(True)"},{"line_number":759,"context_line":"            self.assertFalse(service_mock.disabled)"},{"line_number":760,"context_line":"            self.assertEqual(service_mock.disabled_reason, \u0027None\u0027)"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def test_set_host_enabled_when_manually_disabled(self):"},{"line_number":763,"context_line":"        self.mox.UnsetStubs()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Bzyc%3D","line":760,"updated":"2014-01-21 21:29:22.000000000","message":"arguments should be ordered as follows (expected, observed)","commit_id":"1106709a3ceaf5bcb2ac559fa139b8824112552b"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"e305b8f0d13966af8b9ce16cf1b0ecec55ffd8bf","unresolved":false,"context_lines":[{"line_number":757,"context_line":"                               return_value\u003dservice_mock):"},{"line_number":758,"context_line":"            self.connection._set_host_enabled(True)"},{"line_number":759,"context_line":"            self.assertFalse(service_mock.disabled)"},{"line_number":760,"context_line":"            self.assertEqual(service_mock.disabled_reason, \u0027None\u0027)"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def test_set_host_enabled_when_manually_disabled(self):"},{"line_number":763,"context_line":"        self.mox.UnsetStubs()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Bh34%3D","line":760,"in_reply_to":"AAAAUH%2F%2Bzyc%3D","updated":"2014-01-24 17:50:53.000000000","message":"All assertEqual in this file arranged in opposite to your comment.\nEven if that\u0027s correct, I prefer not to do it in this patch.","commit_id":"1106709a3ceaf5bcb2ac559fa139b8824112552b"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"41b8cafee1168563964839ecd2df8468d68dbdaf","unresolved":false,"context_lines":[{"line_number":2676,"context_line":"                      % {\u0027dev\u0027: pci_devs, \u0027dom\u0027: dom.ID()})"},{"line_number":2677,"context_line":"            raise"},{"line_number":2678,"context_line":""},{"line_number":2679,"context_line":"    def _set_host_enabled(self, enabled, disable_reason\u003d\u0027\u0027):"},{"line_number":2680,"context_line":"        \"\"\"Sets the specified host\u0027s ability to accept new instances."},{"line_number":2681,"context_line":""},{"line_number":2682,"context_line":"           This doesn\u0027t override non-automatic disablement with an automatic"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9il0%3D","line":2679,"updated":"2013-12-10 13:01:56.000000000","message":"The command \"nova host-update\" will not work if set this as a internal method.\n\nPlease refer to https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3364","commit_id":"20e92d98cc7bab9b9dcd6b64cbed6dec03181154"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"ee33e1219cac14cff948e757e1cedd27b4d57bed","unresolved":false,"context_lines":[{"line_number":2676,"context_line":"                      % {\u0027dev\u0027: pci_devs, \u0027dom\u0027: dom.ID()})"},{"line_number":2677,"context_line":"            raise"},{"line_number":2678,"context_line":""},{"line_number":2679,"context_line":"    def _set_host_enabled(self, enabled, disable_reason\u003d\u0027\u0027):"},{"line_number":2680,"context_line":"        \"\"\"Sets the specified host\u0027s ability to accept new instances."},{"line_number":2681,"context_line":""},{"line_number":2682,"context_line":"           This doesn\u0027t override non-automatic disablement with an automatic"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9h8w%3D","line":2679,"in_reply_to":"AAAATn%2F9il0%3D","updated":"2013-12-10 14:56:04.000000000","message":"Jay,\n\nPlease read my comments on the bug (#5 and #8):\nhttps://bugs.launchpad.net/nova/+bug/1251803/comments/8","commit_id":"20e92d98cc7bab9b9dcd6b64cbed6dec03181154"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"af9d15904817bad56b53128332217170bf47be0d","unresolved":false,"context_lines":[{"line_number":2682,"context_line":"                      % {\u0027dev\u0027: pci_devs, \u0027dom\u0027: dom.ID()})"},{"line_number":2683,"context_line":"            raise"},{"line_number":2684,"context_line":""},{"line_number":2685,"context_line":"    def set_host_enabled(self, context, host, enabled):"},{"line_number":2686,"context_line":"        \"\"\"Sets the specified host\u0027s ability to accept new instances."},{"line_number":2687,"context_line":"        \"\"\""},{"line_number":2688,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8%2B48%3D","line":2685,"updated":"2013-12-18 04:28:06.000000000","message":"The interface in virt/driver.py does not include context as an paramter","commit_id":"a4bccc5e4274bdab52736fbe204927c35b3db197"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8a0fe3c047e49828a0cacb09a002907417cb16ca","unresolved":false,"context_lines":[{"line_number":2682,"context_line":"                      % {\u0027dev\u0027: pci_devs, \u0027dom\u0027: dom.ID()})"},{"line_number":2683,"context_line":"            raise"},{"line_number":2684,"context_line":""},{"line_number":2685,"context_line":"    def set_host_enabled(self, context, host, enabled):"},{"line_number":2686,"context_line":"        \"\"\"Sets the specified host\u0027s ability to accept new instances."},{"line_number":2687,"context_line":"        \"\"\""},{"line_number":2688,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F89C8%3D","line":2685,"in_reply_to":"AAAATn%2F8%2B48%3D","updated":"2013-12-18 15:52:01.000000000","message":"True. Got confused because it does in the manager:\n3349     def set_host_enabled(self, context, enabled):","commit_id":"a4bccc5e4274bdab52736fbe204927c35b3db197"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"af9d15904817bad56b53128332217170bf47be0d","unresolved":false,"context_lines":[{"line_number":2686,"context_line":"        \"\"\"Sets the specified host\u0027s ability to accept new instances."},{"line_number":2687,"context_line":"        \"\"\""},{"line_number":2688,"context_line":""},{"line_number":2689,"context_line":"        reason \u003d \u0027\u0027"},{"line_number":2690,"context_line":"        if not enabled:"},{"line_number":2691,"context_line":"            reason \u003d \u0027Disabled by user\u0027"},{"line_number":2692,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8%2B4w%3D","line":2689,"updated":"2013-12-18 04:28:06.000000000","message":"Its not good to set default reason as \u0027\u0027, we should use None instead. This patch might have some dependency on https://review.openstack.org/#/c/59998/","commit_id":"a4bccc5e4274bdab52736fbe204927c35b3db197"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"af9d15904817bad56b53128332217170bf47be0d","unresolved":false,"context_lines":[{"line_number":2688,"context_line":""},{"line_number":2689,"context_line":"        reason \u003d \u0027\u0027"},{"line_number":2690,"context_line":"        if not enabled:"},{"line_number":2691,"context_line":"            reason \u003d \u0027Disabled by user\u0027"},{"line_number":2692,"context_line":""},{"line_number":2693,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, CONF.host)"},{"line_number":2694,"context_line":"        service.disabled \u003d not enabled"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8%2B4k%3D","line":2691,"updated":"2013-12-18 04:28:06.000000000","message":"How to handle the case of reason is not null?\n\nI mean that if admin disable a already disabled service and there are already some disabled reason for this service. The code here will overwrite the original reason.","commit_id":"a4bccc5e4274bdab52736fbe204927c35b3db197"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8a0fe3c047e49828a0cacb09a002907417cb16ca","unresolved":false,"context_lines":[{"line_number":2688,"context_line":""},{"line_number":2689,"context_line":"        reason \u003d \u0027\u0027"},{"line_number":2690,"context_line":"        if not enabled:"},{"line_number":2691,"context_line":"            reason \u003d \u0027Disabled by user\u0027"},{"line_number":2692,"context_line":""},{"line_number":2693,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, CONF.host)"},{"line_number":2694,"context_line":"        service.disabled \u003d not enabled"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F89BI%3D","line":2691,"in_reply_to":"AAAATn%2F8%2B4k%3D","updated":"2013-12-18 15:52:01.000000000","message":"As I explained before, \"nova host-update\" which maps to set_host_update doesn\u0027t take \"reason\" as an argument.\n\nIn addition, this is a public method, which is being used only by a user. If a user wants to override its \"disable reason\", I don\u0027t see a reason to stop him.","commit_id":"a4bccc5e4274bdab52736fbe204927c35b3db197"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8656fb4f961b8639224f43bc200d9af618331ce8","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        finally:"},{"line_number":628,"context_line":"            # Enabling the compute service, in case it was disabled"},{"line_number":629,"context_line":"            # since the connection was successful."},{"line_number":630,"context_line":"            disable_reason \u003d None"},{"line_number":631,"context_line":"            if not wrapped_conn:"},{"line_number":632,"context_line":"                disable_reason \u003d \u0027Failed to connect to libvirt\u0027"},{"line_number":633,"context_line":"            self._set_host_enabled(bool(wrapped_conn), disable_reason)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F877I%3D","line":630,"updated":"2013-12-18 16:00:29.000000000","message":"You should probably rebase on change Ief1f21ba450812a240d30104624bcec92e3f989e so you can re-use the constant defined there.","commit_id":"692afd46b3d59651118e6b75d6f412b89dcea6f6"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"b4ccd470e49db2ef72c6bb64ad1668976bb16946","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        finally:"},{"line_number":628,"context_line":"            # Enabling the compute service, in case it was disabled"},{"line_number":629,"context_line":"            # since the connection was successful."},{"line_number":630,"context_line":"            disable_reason \u003d None"},{"line_number":631,"context_line":"            if not wrapped_conn:"},{"line_number":632,"context_line":"                disable_reason \u003d \u0027Failed to connect to libvirt\u0027"},{"line_number":633,"context_line":"            self._set_host_enabled(bool(wrapped_conn), disable_reason)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F87lk%3D","line":630,"in_reply_to":"AAAATn%2F877I%3D","updated":"2013-12-18 16:51:19.000000000","message":"Done","commit_id":"692afd46b3d59651118e6b75d6f412b89dcea6f6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8656fb4f961b8639224f43bc200d9af618331ce8","unresolved":false,"context_lines":[{"line_number":2696,"context_line":"        service.disabled_reason \u003d reason"},{"line_number":2697,"context_line":"        service.save()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"    def _set_host_enabled(self, enabled, disable_reason\u003d\u0027\u0027):"},{"line_number":2700,"context_line":"        \"\"\"Enables / Disables the compute service on this host."},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"           This doesn\u0027t override non-automatic disablement with an automatic"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F876w%3D","line":2699,"updated":"2013-12-18 16:00:29.000000000","message":"Shouldn\u0027t disable_reason default to None?  See change Ief1f21ba450812a240d30104624bcec92e3f989e.","commit_id":"692afd46b3d59651118e6b75d6f412b89dcea6f6"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"b4ccd470e49db2ef72c6bb64ad1668976bb16946","unresolved":false,"context_lines":[{"line_number":2696,"context_line":"        service.disabled_reason \u003d reason"},{"line_number":2697,"context_line":"        service.save()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"    def _set_host_enabled(self, enabled, disable_reason\u003d\u0027\u0027):"},{"line_number":2700,"context_line":"        \"\"\"Enables / Disables the compute service on this host."},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"           This doesn\u0027t override non-automatic disablement with an automatic"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F87lo%3D","line":2699,"in_reply_to":"AAAATn%2F876w%3D","updated":"2013-12-18 16:51:19.000000000","message":"Done","commit_id":"692afd46b3d59651118e6b75d6f412b89dcea6f6"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"44186c221afa32555cf20d17f02e15aff4e77c33","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        finally:"},{"line_number":631,"context_line":"            # Enabling the compute service, in case it was disabled"},{"line_number":632,"context_line":"            # since the connection was successful."},{"line_number":633,"context_line":"            disable_reason \u003d None"},{"line_number":634,"context_line":"            if not wrapped_conn:"},{"line_number":635,"context_line":"                disable_reason \u003d \u0027Failed to connect to libvirt\u0027"},{"line_number":636,"context_line":"            self._set_host_enabled(bool(wrapped_conn), disable_reason)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F83MA%3D","line":633,"updated":"2013-12-19 13:29:20.000000000","message":"Why not use DISABLE_REASON_UNDEFINED?","commit_id":"95512144038926b82ab280cfa32dc99c0f8b1f2e"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"63f35700c347695eeb46518def41178123b44555","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        finally:"},{"line_number":631,"context_line":"            # Enabling the compute service, in case it was disabled"},{"line_number":632,"context_line":"            # since the connection was successful."},{"line_number":633,"context_line":"            disable_reason \u003d None"},{"line_number":634,"context_line":"            if not wrapped_conn:"},{"line_number":635,"context_line":"                disable_reason \u003d \u0027Failed to connect to libvirt\u0027"},{"line_number":636,"context_line":"            self._set_host_enabled(bool(wrapped_conn), disable_reason)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8vn0%3D","line":633,"in_reply_to":"AAAATn%2F83MA%3D","updated":"2013-12-20 19:05:57.000000000","message":"Done","commit_id":"95512144038926b82ab280cfa32dc99c0f8b1f2e"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"44186c221afa32555cf20d17f02e15aff4e77c33","unresolved":false,"context_lines":[{"line_number":681,"context_line":"                self._wrapped_conn \u003d None"},{"line_number":682,"context_line":"                # Disable compute service to avoid"},{"line_number":683,"context_line":"                # new instances of being scheduled on this host."},{"line_number":684,"context_line":"                self._set_host_enabled(False, disable_reason\u003d_error)"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    @staticmethod"},{"line_number":687,"context_line":"    def _test_connection(conn):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F83KY%3D","line":684,"updated":"2013-12-19 13:29:20.000000000","message":"It is better use key word for Boolean variables to let others easy to understand.","commit_id":"95512144038926b82ab280cfa32dc99c0f8b1f2e"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"63f35700c347695eeb46518def41178123b44555","unresolved":false,"context_lines":[{"line_number":681,"context_line":"                self._wrapped_conn \u003d None"},{"line_number":682,"context_line":"                # Disable compute service to avoid"},{"line_number":683,"context_line":"                # new instances of being scheduled on this host."},{"line_number":684,"context_line":"                self._set_host_enabled(False, disable_reason\u003d_error)"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    @staticmethod"},{"line_number":687,"context_line":"    def _test_connection(conn):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8voU%3D","line":684,"in_reply_to":"AAAATn%2F83KY%3D","updated":"2013-12-20 19:05:57.000000000","message":"I think it\u0027s pretty straight forward, considering the name of the function.","commit_id":"95512144038926b82ab280cfa32dc99c0f8b1f2e"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"44186c221afa32555cf20d17f02e15aff4e77c33","unresolved":false,"context_lines":[{"line_number":2700,"context_line":"        service.save()"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _set_host_enabled(self, enabled,"},{"line_number":2703,"context_line":"                                disable_reason\u003dDISABLE_REASON_UNDEFINED):"},{"line_number":2704,"context_line":"        \"\"\"Enables / Disables the compute service on this host."},{"line_number":2705,"context_line":""},{"line_number":2706,"context_line":"           This doesn\u0027t override non-automatic disablement with an automatic"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F83LQ%3D","line":2703,"updated":"2013-12-19 13:29:20.000000000","message":"Suggest keep align with \"self\"","commit_id":"95512144038926b82ab280cfa32dc99c0f8b1f2e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46e4201a71cc8f61720d81f8bbddef85bda64358","unresolved":false,"context_lines":[{"line_number":2695,"context_line":"        if not enabled:"},{"line_number":2696,"context_line":"            reason \u003d \u0027Disabled by user\u0027"},{"line_number":2697,"context_line":""},{"line_number":2698,"context_line":"        context \u003d nova_context.get_admin_context()"},{"line_number":2699,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, CONF.host)"},{"line_number":2700,"context_line":"        service.disabled \u003d not enabled"},{"line_number":2701,"context_line":"        service.disabled_reason \u003d reason"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2Fh2o%3D","line":2698,"updated":"2014-01-12 14:17:34.000000000","message":"can you please clarify why we need to update the database from the virt driver. this would be better if it was done from the common virt driver code and not at the virt driver level.","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"5954007919617c925584cc2342c0d32aaf54a713","unresolved":false,"context_lines":[{"line_number":2695,"context_line":"        if not enabled:"},{"line_number":2696,"context_line":"            reason \u003d \u0027Disabled by user\u0027"},{"line_number":2697,"context_line":""},{"line_number":2698,"context_line":"        context \u003d nova_context.get_admin_context()"},{"line_number":2699,"context_line":"        service \u003d service_obj.Service.get_by_compute_host(context, CONF.host)"},{"line_number":2700,"context_line":"        service.disabled \u003d not enabled"},{"line_number":2701,"context_line":"        service.disabled_reason \u003d reason"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FcMY%3D","line":2698,"in_reply_to":"AAAAUH%2F%2Fh2o%3D","updated":"2014-01-13 21:26:05.000000000","message":"I agree that this isn\u0027t perfect, however, I would have to modify the xenapi behaviour as well, as it implements this method and I think this is out of the scope of this patch.\nThis is in addition to the fact that I doubt that libvirt driver even needs to implement this method as there is another way to disable the service (with nova service_disable)\n\nI\u0027ll remove  set_host_enabled from this and leave only the private _set_host_enabled.\nwill work on set_host_enabled in another patch, and make it accept a reason in the api.","commit_id":"b5e48d06872aaf1dde3d9bdfae80897046c91995"}]}
