)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"ef2193d98a2a04f41c87793bbc3ed42e7daa3ae8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[POC] Allow user defined stop"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Expose \u0027force-shutdown\u0027 for users when performing os-stop."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: If92ec92f64dddda5a9f9e510e44f72eedafaabb7"},{"line_number":12,"context_line":"Implements: blueprint allow-user-defined-shutdown-for-stop"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5a18252c_c35534c7","line":9,"range":{"start_line":9,"start_character":8,"end_line":9,"end_character":22},"updated":"2016-04-12 08:40:29.000000000","message":"type","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"ddb7e73990a21a8a80d3c302eba6584388f3af43","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[POC] Allow user defined stop"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Expose \u0027force-shutdown\u0027 for users when performing os-stop."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: If92ec92f64dddda5a9f9e510e44f72eedafaabb7"},{"line_number":12,"context_line":"Implements: blueprint allow-user-defined-shutdown-for-stop"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5a18252c_06829a52","line":9,"range":{"start_line":9,"start_character":8,"end_line":9,"end_character":22},"in_reply_to":"5a18252c_c35534c7","updated":"2016-04-12 08:58:11.000000000","message":"Done","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"ef2193d98a2a04f41c87793bbc3ed42e7daa3ae8","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":1191,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":1192,"context_line":"        authorize(context, instance, \u0027stop\u0027)"},{"line_number":1193,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.27\u0027):"},{"line_number":1194,"context_line":"            try:"},{"line_number":1195,"context_line":"                stop_type \u003d body[\u0027os-stop\u0027][\u0027type\u0027].upper()"},{"line_number":1196,"context_line":"            except KeyError:"},{"line_number":1197,"context_line":"                stop_type \u003d \u0027SOFT\u0027"},{"line_number":1198,"context_line":"        else:"},{"line_number":1199,"context_line":"            stop_type \u003d \u0027SOFT\u0027"},{"line_number":1200,"context_line":"        LOG.debug(\u0027stop instance\u0027, instance\u003dinstance)"},{"line_number":1201,"context_line":"        try:"},{"line_number":1202,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a18252c_23e8697c","line":1199,"range":{"start_line":1193,"start_character":8,"end_line":1199,"end_character":30},"updated":"2016-04-12 08:40:29.000000000","message":"we can initialize stop_type to \u0027SOFT\u0027 before the if\n\nThat way we do not need else and the except can be a simple pass.","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"ddb7e73990a21a8a80d3c302eba6584388f3af43","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":1191,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":1192,"context_line":"        authorize(context, instance, \u0027stop\u0027)"},{"line_number":1193,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.27\u0027):"},{"line_number":1194,"context_line":"            try:"},{"line_number":1195,"context_line":"                stop_type \u003d body[\u0027os-stop\u0027][\u0027type\u0027].upper()"},{"line_number":1196,"context_line":"            except KeyError:"},{"line_number":1197,"context_line":"                stop_type \u003d \u0027SOFT\u0027"},{"line_number":1198,"context_line":"        else:"},{"line_number":1199,"context_line":"            stop_type \u003d \u0027SOFT\u0027"},{"line_number":1200,"context_line":"        LOG.debug(\u0027stop instance\u0027, instance\u003dinstance)"},{"line_number":1201,"context_line":"        try:"},{"line_number":1202,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a18252c_66654ee0","line":1199,"range":{"start_line":1193,"start_character":8,"end_line":1199,"end_character":30},"in_reply_to":"5a18252c_23e8697c","updated":"2016-04-12 08:58:11.000000000","message":"Done","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"ef2193d98a2a04f41c87793bbc3ed42e7daa3ae8","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            stop_type \u003d \u0027SOFT\u0027"},{"line_number":1200,"context_line":"        LOG.debug(\u0027stop instance\u0027, instance\u003dinstance)"},{"line_number":1201,"context_line":"        try:"},{"line_number":1202,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1203,"context_line":"                self.compute_api.force_stop(context, instance,"},{"line_number":1204,"context_line":"                                            clean_shutdown\u003dFalse)"},{"line_number":1205,"context_line":"            else:"},{"line_number":1206,"context_line":"                self.compute_api.stop(context, instance)"},{"line_number":1207,"context_line":"        except (exception.InstanceNotReady, exception.InstanceIsLocked) as e:"},{"line_number":1208,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":1209,"context_line":"        except exception.InstanceUnknownCell as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a18252c_233b49ed","line":1206,"range":{"start_line":1202,"start_character":12,"end_line":1206,"end_character":56},"updated":"2016-04-12 08:40:29.000000000","message":"I think we can compact these lines into one statetement:\n\nself.compute_api.force_stop(context, instance, clean_shutdown\u003d(stop_type \u003d\u003d \u0027SOFT\u0027))\n\nor if it\u0027s nicer, we can extract stop_type \u003d\u003d \u0027SOFT\u0027 to a variable.","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"ddb7e73990a21a8a80d3c302eba6584388f3af43","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            stop_type \u003d \u0027SOFT\u0027"},{"line_number":1200,"context_line":"        LOG.debug(\u0027stop instance\u0027, instance\u003dinstance)"},{"line_number":1201,"context_line":"        try:"},{"line_number":1202,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1203,"context_line":"                self.compute_api.force_stop(context, instance,"},{"line_number":1204,"context_line":"                                            clean_shutdown\u003dFalse)"},{"line_number":1205,"context_line":"            else:"},{"line_number":1206,"context_line":"                self.compute_api.stop(context, instance)"},{"line_number":1207,"context_line":"        except (exception.InstanceNotReady, exception.InstanceIsLocked) as e:"},{"line_number":1208,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":1209,"context_line":"        except exception.InstanceUnknownCell as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a18252c_265cf624","line":1206,"range":{"start_line":1202,"start_character":12,"end_line":1206,"end_character":56},"in_reply_to":"5a18252c_233b49ed","updated":"2016-04-12 08:58:11.000000000","message":"Actually, I\u0027m doing this intentionally, as force stop and stop can be perforemed in different vm_state and task_state, it will be easier to use the existing decorator function this way, or do you have any suggestions?","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"02d428bb0a191c89d458ae7b5804394ad7666321","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            stop_type \u003d \u0027SOFT\u0027"},{"line_number":1200,"context_line":"        LOG.debug(\u0027stop instance\u0027, instance\u003dinstance)"},{"line_number":1201,"context_line":"        try:"},{"line_number":1202,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1203,"context_line":"                self.compute_api.force_stop(context, instance,"},{"line_number":1204,"context_line":"                                            clean_shutdown\u003dFalse)"},{"line_number":1205,"context_line":"            else:"},{"line_number":1206,"context_line":"                self.compute_api.stop(context, instance)"},{"line_number":1207,"context_line":"        except (exception.InstanceNotReady, exception.InstanceIsLocked) as e:"},{"line_number":1208,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":1209,"context_line":"        except exception.InstanceUnknownCell as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a18252c_cc739c4c","line":1206,"range":{"start_line":1202,"start_character":12,"end_line":1206,"end_character":56},"in_reply_to":"5a18252c_265cf624","updated":"2016-04-12 11:20:12.000000000","message":"Sorry, my bad.\nI did not notice that the called methods are different. Then this separation should stay like this.","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"70353165cb2119d30a98f051685f9cc2e8c7b592","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"            try:"},{"line_number":1196,"context_line":"                stop_type \u003d body[\u0027os-stop\u0027][\u0027type\u0027].upper()"},{"line_number":1197,"context_line":"            except KeyError:"},{"line_number":1198,"context_line":"                pass"},{"line_number":1199,"context_line":"        try:"},{"line_number":1200,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1201,"context_line":"                self.compute_api.force_stop(context, instance,"},{"line_number":1202,"context_line":"                                            clean_shutdown\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a122d0e_a8a45fb9","line":1199,"range":{"start_line":1198,"start_character":20,"end_line":1199,"end_character":8},"updated":"2016-04-21 14:03:19.000000000","message":"Did you intentionally remove LOG.debug(\u0027stop instance\u0027, instance\u003dinstance) from here?","commit_id":"fca0cbe61866bba07a5887ef427a2359a5b5f198"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"9f22866dd2d9e1229b06be370f57cd87e4e15a57","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"            try:"},{"line_number":1196,"context_line":"                stop_type \u003d body[\u0027os-stop\u0027][\u0027type\u0027].upper()"},{"line_number":1197,"context_line":"            except KeyError:"},{"line_number":1198,"context_line":"                pass"},{"line_number":1199,"context_line":"        try:"},{"line_number":1200,"context_line":"            if stop_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1201,"context_line":"                self.compute_api.force_stop(context, instance,"},{"line_number":1202,"context_line":"                                            clean_shutdown\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a122d0e_8a3fb286","line":1199,"range":{"start_line":1198,"start_character":20,"end_line":1199,"end_character":8},"in_reply_to":"1a122d0e_a8a45fb9","updated":"2016-05-03 02:07:38.000000000","message":"Ah, no, I did it by mistake","commit_id":"fca0cbe61866bba07a5887ef427a2359a5b5f198"}],"nova/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"ef2193d98a2a04f41c87793bbc3ed42e7daa3ae8","unresolved":false,"context_lines":[{"line_number":287,"context_line":"2.27"},{"line_number":288,"context_line":"----"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"  Allow user pass `force-stop` to perform a force shutdown when"},{"line_number":291,"context_line":"  calling `os-stop` API."}],"source_content_type":"text/x-rst","patch_set":14,"id":"5a18252c_a31ab86c","line":290,"range":{"start_line":290,"start_character":18,"end_line":290,"end_character":30},"updated":"2016-04-12 08:40:29.000000000","message":"Not exactly. According to the implementation we can pass an optional `type`.","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"}],"releasenotes/notes/bp-allow-force-stop-cb49bd2e948219c7.yaml":[{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"ef2193d98a2a04f41c87793bbc3ed42e7daa3ae8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allowing user to define a force stop to"},{"line_number":4,"context_line":"    an instance. Parameter `force-shutdown`"},{"line_number":5,"context_line":"    can be passed to `os-stop` API with"},{"line_number":6,"context_line":"    microversion latter than 2.27 to perform"},{"line_number":7,"context_line":"    a force stop."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"5a18252c_63da607a","line":4,"range":{"start_line":4,"start_character":28,"end_line":4,"end_character":42},"updated":"2016-04-12 08:40:29.000000000","message":"type","commit_id":"a6d81c4e61e2b82abd010caab52244376432d6af"}]}
