)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66b619501633015b69d603b4246dabe800db9e6d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jay Lau \u003cliugya@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-04 10:13:19 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set \"Disabled Reason\" to None when enable nova compute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When use \"nova host-update\" to enable nova compute, the colume of"},{"line_number":10,"context_line":"\"Disabled Reason\" will be set as empty, this will make the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F96Xo%3D","line":7,"updated":"2013-12-04 17:14:23.000000000","message":"This appears to be a libvirt only change, so you should have libvirt in the commit message title.  See bullet 7 here:\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages\n\n\"As well as summarizing the change itself, it should take care to detail what part of the code is affected. eg if it affects the libvirt driver, mention \u0027libvirt\u0027 somewhere in the first line.\"","commit_id":"24e04267d0dcba959c751eb7fb325a6fd14a716c"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"3ffa2470084ff971759e53127f50091636e36c6c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jay Lau \u003cliugya@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-04 10:13:19 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set \"Disabled Reason\" to None when enable nova compute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When use \"nova host-update\" to enable nova compute, the colume of"},{"line_number":10,"context_line":"\"Disabled Reason\" will be set as empty, this will make the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F94Hc%3D","line":7,"in_reply_to":"AAAATn%2F96Xo%3D","updated":"2013-12-04 23:27:43.000000000","message":"Done","commit_id":"24e04267d0dcba959c751eb7fb325a6fd14a716c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66b619501633015b69d603b4246dabe800db9e6d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set \"Disabled Reason\" to None when enable nova compute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When use \"nova host-update\" to enable nova compute, the colume of"},{"line_number":10,"context_line":"\"Disabled Reason\" will be set as empty, this will make the"},{"line_number":11,"context_line":"\"Disabled Reason\" is not consistent with other services."},{"line_number":12,"context_line":"+------------------+------+----------+---------+-----------------+"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F96Xk%3D","line":9,"updated":"2013-12-04 17:14:23.000000000","message":"s/colume/column/","commit_id":"24e04267d0dcba959c751eb7fb325a6fd14a716c"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"3ffa2470084ff971759e53127f50091636e36c6c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set \"Disabled Reason\" to None when enable nova compute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When use \"nova host-update\" to enable nova compute, the colume of"},{"line_number":10,"context_line":"\"Disabled Reason\" will be set as empty, this will make the"},{"line_number":11,"context_line":"\"Disabled Reason\" is not consistent with other services."},{"line_number":12,"context_line":"+------------------+------+----------+---------+-----------------+"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F94Hg%3D","line":9,"in_reply_to":"AAAATn%2F96Xk%3D","updated":"2013-12-04 23:27:43.000000000","message":"Done","commit_id":"24e04267d0dcba959c751eb7fb325a6fd14a716c"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"fdf67cff3d92bc227e6650a008df0824d045ee19","unresolved":false,"context_lines":[{"line_number":24,"context_line":"compute."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ief1f21ba450812a240d30104624bcec92e3f989e"},{"line_number":27,"context_line":"Closes-Bug: #1251803"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F871I%3D","line":27,"updated":"2013-12-18 16:12:13.000000000","message":"This patch doesn\u0027t solve this bug.\nThis bug is happening because set_host_enabled is a public method and when a user is using the \"nova host_update\" command (which doesn\u0027t accept any reason as a parameter) he will get a default (\"AUTO: \") reason and will unset original reason, if it was set by _close_callback()\n\nThis is the fix for this bug: I5fd13ef352fcbb4a1c96764a9e473cdaf7b128da","commit_id":"ad201382e9645a8b730a2133f21c4310197a7f48"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"bb753b764ef067c0619a9a82820f859f6631e51b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"compute."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ief1f21ba450812a240d30104624bcec92e3f989e"},{"line_number":27,"context_line":"Closes-Bug: #1251803"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F8oP4%3D","line":27,"updated":"2013-12-24 03:13:27.000000000","message":"Please remove this line.\nThis patch doesn\u0027t solve this bug. This bug is happening because set_host_enabled is a public method and when a user is using the \"nova host_update\" command (which doesn\u0027t accept any reason as a parameter) he will get a default (\"AUTO: \") reason and will unset original reason, if it was set by _close_callback()\nThis is the fix for this bug: I5fd13ef352fcbb4a1c96764a9e473cdaf7b128da","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"eb4a36699ba6d98e6772c8ef34cdf0e16e56d133","unresolved":false,"context_lines":[{"line_number":24,"context_line":"compute."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: Ief1f21ba450812a240d30104624bcec92e3f989e"},{"line_number":27,"context_line":"Closes-Bug: #1251803"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F8oLY%3D","line":27,"in_reply_to":"AAAATn%2F8oP4%3D","updated":"2013-12-24 04:05:12.000000000","message":"I will change it to Partial-Bug: #1251803","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"}],"nova/tests/virt/test_virt_drivers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"99c27ee86baf8ff0753f29a345b92497339a3bc8","unresolved":false,"context_lines":[{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        # Previous status of the service: disabled: False"},{"line_number":739,"context_line":"        # service_mock.__getitem__.return_value \u003d False"},{"line_number":740,"context_line":"        service_mock.configure_mock(disabled_reason\u003dNone,"},{"line_number":741,"context_line":"                                    disabled\u003dFalse)"},{"line_number":742,"context_line":"        from nova.objects import service as service_obj"},{"line_number":743,"context_line":"        self.mox.StubOutWithMock(service_obj.Service,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9EiQ%3D","line":740,"updated":"2013-12-17 03:25:01.000000000","message":"Use your new constant here?","commit_id":"ad201382e9645a8b730a2133f21c4310197a7f48"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dd81b3ab9da7e186e3fb045c0d615ab27eee033c","unresolved":false,"context_lines":[{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        # Previous status of the service: disabled: False"},{"line_number":739,"context_line":"        # service_mock.__getitem__.return_value \u003d False"},{"line_number":740,"context_line":"        service_mock.configure_mock(disabled_reason\u003dNone,"},{"line_number":741,"context_line":"                                    disabled\u003dFalse)"},{"line_number":742,"context_line":"        from nova.objects import service as service_obj"},{"line_number":743,"context_line":"        self.mox.StubOutWithMock(service_obj.Service,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8%2FD8%3D","line":740,"in_reply_to":"AAAATn%2F9D6s%3D","updated":"2013-12-18 02:44:11.000000000","message":"I thought this was a libvirt specific driver test, as in nova.tests.virt.libvirt.test_libvirt.  Since it\u0027s not, I\u0027m fine with not importing the libvirt driver code to get at the constants.","commit_id":"ad201382e9645a8b730a2133f21c4310197a7f48"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"80535a84d91034b51e3fed6468e64dbc77d84c7d","unresolved":false,"context_lines":[{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        # Previous status of the service: disabled: False"},{"line_number":739,"context_line":"        # service_mock.__getitem__.return_value \u003d False"},{"line_number":740,"context_line":"        service_mock.configure_mock(disabled_reason\u003dNone,"},{"line_number":741,"context_line":"                                    disabled\u003dFalse)"},{"line_number":742,"context_line":"        from nova.objects import service as service_obj"},{"line_number":743,"context_line":"        self.mox.StubOutWithMock(service_obj.Service,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9D6s%3D","line":740,"in_reply_to":"AAAATn%2F9EiQ%3D","updated":"2013-12-17 06:45:29.000000000","message":"I think that it is better use None here as I do not want to import the new constant here.\n\nAlso you may notice that are are also using \"AUTO:\" here which is DISABLE_PREFIX","commit_id":"ad201382e9645a8b730a2133f21c4310197a7f48"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"99c27ee86baf8ff0753f29a345b92497339a3bc8","unresolved":false,"context_lines":[{"line_number":764,"context_line":"        self.mox.ReplayAll()"},{"line_number":765,"context_line":"        self.connection.set_host_enabled(\u0027my_test_host\u0027, True)"},{"line_number":766,"context_line":"        self.assertFalse(service_mock.disabled)"},{"line_number":767,"context_line":"        self.assertEqual(service_mock.disabled_reason, None)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def test_set_host_enabled_when_manually_disabled(self):"},{"line_number":770,"context_line":"        self.mox.UnsetStubs()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9EiM%3D","line":767,"updated":"2013-12-17 03:25:01.000000000","message":"Use your new constant here?","commit_id":"ad201382e9645a8b730a2133f21c4310197a7f48"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"80535a84d91034b51e3fed6468e64dbc77d84c7d","unresolved":false,"context_lines":[{"line_number":764,"context_line":"        self.mox.ReplayAll()"},{"line_number":765,"context_line":"        self.connection.set_host_enabled(\u0027my_test_host\u0027, True)"},{"line_number":766,"context_line":"        self.assertFalse(service_mock.disabled)"},{"line_number":767,"context_line":"        self.assertEqual(service_mock.disabled_reason, None)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def test_set_host_enabled_when_manually_disabled(self):"},{"line_number":770,"context_line":"        self.mox.UnsetStubs()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F9D6o%3D","line":767,"in_reply_to":"AAAATn%2F9EiM%3D","updated":"2013-12-17 06:45:29.000000000","message":"ditto","commit_id":"ad201382e9645a8b730a2133f21c4310197a7f48"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5cf1d6637087137dbe63fe1d87e7619c57c97f37","unresolved":false,"context_lines":[{"line_number":2709,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2710,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2711,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2712,"context_line":"                       DISABLE_PREFIX + str(disable_reason)"},{"line_number":2713,"context_line":"                       if disable_service else None)"},{"line_number":2714,"context_line":"                    service.save()"},{"line_number":2715,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9Pac%3D","line":2712,"updated":"2013-12-13 16:09:58.000000000","message":"I think this is supposed to be six.text_type() instead of str() in case the reason is unicode.","commit_id":"a5e6f57ee264c7a378e89de15a93e36d81144ac9"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"7c3f4ce22c13b19a139aed29b3e9741a2e43cad0","unresolved":false,"context_lines":[{"line_number":2709,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2710,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2711,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2712,"context_line":"                       DISABLE_PREFIX + str(disable_reason)"},{"line_number":2713,"context_line":"                       if disable_service else None)"},{"line_number":2714,"context_line":"                    service.save()"},{"line_number":2715,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9NZs%3D","line":2712,"in_reply_to":"AAAATn%2F9Pac%3D","updated":"2013-12-14 02:03:30.000000000","message":"Done","commit_id":"a5e6f57ee264c7a378e89de15a93e36d81144ac9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5eb2a3eb3be162fb19738ab8885193f6950dd28b","unresolved":false,"context_lines":[{"line_number":2694,"context_line":""},{"line_number":2695,"context_line":"        if isinstance(enabled, bool):"},{"line_number":2696,"context_line":"            disable_service \u003d not enabled"},{"line_number":2697,"context_line":"            disable_reason \u003d None"},{"line_number":2698,"context_line":"        else:"},{"line_number":2699,"context_line":"            disable_service \u003d bool(enabled)"},{"line_number":2700,"context_line":"            disable_reason \u003d enabled"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9IaY%3D","line":2697,"updated":"2013-12-16 14:28:54.000000000","message":"Why do you think about to use a global constant like:\nDISABLE_REASON_UNDEFINED \u003d None (or something better)\n\nto be sure to keep a consistence in the code.","commit_id":"8831d00734c1f91cbf74ef816c02bdf222401913"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"5657e1b62cc24428173038559ca28e49575bf23f","unresolved":false,"context_lines":[{"line_number":2694,"context_line":""},{"line_number":2695,"context_line":"        if isinstance(enabled, bool):"},{"line_number":2696,"context_line":"            disable_service \u003d not enabled"},{"line_number":2697,"context_line":"            disable_reason \u003d None"},{"line_number":2698,"context_line":"        else:"},{"line_number":2699,"context_line":"            disable_service \u003d bool(enabled)"},{"line_number":2700,"context_line":"            disable_reason \u003d enabled"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9IJ8%3D","line":2697,"in_reply_to":"AAAATn%2F9IQQ%3D","updated":"2013-12-16 15:09:35.000000000","message":"Done","commit_id":"8831d00734c1f91cbf74ef816c02bdf222401913"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5790b045ea7e259bb5461549d0ce68366dd7216b","unresolved":false,"context_lines":[{"line_number":2694,"context_line":""},{"line_number":2695,"context_line":"        if isinstance(enabled, bool):"},{"line_number":2696,"context_line":"            disable_service \u003d not enabled"},{"line_number":2697,"context_line":"            disable_reason \u003d None"},{"line_number":2698,"context_line":"        else:"},{"line_number":2699,"context_line":"            disable_service \u003d bool(enabled)"},{"line_number":2700,"context_line":"            disable_reason \u003d enabled"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9IQQ%3D","line":2697,"in_reply_to":"AAAATn%2F9IaY%3D","updated":"2013-12-16 14:51:56.000000000","message":"I could see that being useful. Precedent would be the DISABLE_PREFIX constant.","commit_id":"8831d00734c1f91cbf74ef816c02bdf222401913"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5eb2a3eb3be162fb19738ab8885193f6950dd28b","unresolved":false,"context_lines":[{"line_number":2716,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2717,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2718,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2719,"context_line":"                       if disable_service else None)"},{"line_number":2720,"context_line":"                    service.save()"},{"line_number":2721,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"},{"line_number":2722,"context_line":"                                 status_name[disable_service])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9IaA%3D","line":2719,"updated":"2013-12-16 14:28:54.000000000","message":"check my first comment :)","commit_id":"8831d00734c1f91cbf74ef816c02bdf222401913"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"5657e1b62cc24428173038559ca28e49575bf23f","unresolved":false,"context_lines":[{"line_number":2716,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2717,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2718,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2719,"context_line":"                       if disable_service else None)"},{"line_number":2720,"context_line":"                    service.save()"},{"line_number":2721,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"},{"line_number":2722,"context_line":"                                 status_name[disable_service])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9IJ4%3D","line":2719,"in_reply_to":"AAAATn%2F9IaA%3D","updated":"2013-12-16 15:09:35.000000000","message":"Done","commit_id":"8831d00734c1f91cbf74ef816c02bdf222401913"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e332196a061aa03cb6052b028de3bd41b0121044","unresolved":false,"context_lines":[{"line_number":2717,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8ok0%3D","line":2720,"updated":"2013-12-23 23:42:17.000000000","message":"Why are we calling text_type here? Just because we assigned None to it on line 2699? Why not just assign \"None\" instead?","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a1d152c03c126589162cf6635a08d596ee7952ac","unresolved":false,"context_lines":[{"line_number":2717,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAT3%2F%2F378%3D","line":2720,"in_reply_to":"AAAATn%2F8oLU%3D","updated":"2013-12-28 21:36:14.000000000","message":"FWIW - this is exactly what I was saying. Sorry for being unclear","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"eb4a36699ba6d98e6772c8ef34cdf0e16e56d133","unresolved":false,"context_lines":[{"line_number":2717,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8oLU%3D","line":2720,"in_reply_to":"AAAATn%2F8oPE%3D","updated":"2013-12-24 04:05:12.000000000","message":"Thanks Vladik, I will use DISABLE_REASON_UNDEFINED \u003d \"None\"","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"bb753b764ef067c0619a9a82820f859f6631e51b","unresolved":false,"context_lines":[{"line_number":2717,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8oPE%3D","line":2720,"in_reply_to":"AAAATn%2F8oSE%3D","updated":"2013-12-24 03:13:27.000000000","message":"You can just set DISABLE_REASON_UNDEFINED \u003d \"None\" on line 276 and avoid calling text_type at all.\n\nAlso with this change: I5fd13ef352fcbb4a1c96764a9e473cdaf7b128da\nThere is no way that the service will be disabled with no an empty reason.\n\nOn the other hand, when the service is enabled, it doesn\u0027t matter what is written in the disable_reason field IMHO.\nHence, I don\u0027t see why this constant is needed at all, but this is just MHO.","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"0b4ce66621c695dd2e70d5985814fdc742a4dbdd","unresolved":false,"context_lines":[{"line_number":2717,"context_line":"                        service.disabled_reason.startswith(DISABLE_PREFIX)):"},{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8oSE%3D","line":2720,"in_reply_to":"AAAATn%2F8ok0%3D","updated":"2013-12-24 02:46:57.000000000","message":"Because we cannot connect a string and None, so I need to make None a text_type. If a service was disabled because of libvirt error, then the disabled reason is \"AUTO: None\"\n\nThe \"AUTO:\" reason was introduced by patch Ia7544a357d1385db5fa92e500cb691f49436cfc9","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e332196a061aa03cb6052b028de3bd41b0121044","unresolved":false,"context_lines":[{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"},{"line_number":2724,"context_line":"                                 status_name[disable_service])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8okk%3D","line":2721,"updated":"2013-12-23 23:42:17.000000000","message":"IMHO this whole assignment lost a lot on readabilty with this change, especially since now we have something that can be either a string or a None (that gets converted to string later iiuc). \n\nAgain - why not just call it a \"None\"?","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"0b4ce66621c695dd2e70d5985814fdc742a4dbdd","unresolved":false,"context_lines":[{"line_number":2718,"context_line":"                    service.disabled \u003d disable_service"},{"line_number":2719,"context_line":"                    service.disabled_reason \u003d ("},{"line_number":2720,"context_line":"                       DISABLE_PREFIX + six.text_type(disable_reason)"},{"line_number":2721,"context_line":"                       if disable_service else DISABLE_REASON_UNDEFINED)"},{"line_number":2722,"context_line":"                    service.save()"},{"line_number":2723,"context_line":"                    LOG.debug(_(\u0027Updating compute service status to %s\u0027),"},{"line_number":2724,"context_line":"                                 status_name[disable_service])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F8oRI%3D","line":2721,"in_reply_to":"AAAATn%2F8okk%3D","updated":"2013-12-24 02:46:57.000000000","message":"Because we want to distinguish automatic enable/disable and manually enable/disable, so we add \"AUTO:\" as prefix for the disable reason.","commit_id":"825db1c114d21974f5615cc5c9c7fd1d7c9a7df7"}]}
