)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"603530df702f1823ebecdf38d9078acbfa5a3f9b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Correct expected error code for os-resetState action"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"extensions.expected_errors will handle all error codes when a REST api method"},{"line_number":10,"context_line":"is docorated by it. If the REST api method has any error code which are not in"},{"line_number":11,"context_line":"the list of extensions.expected_errors, nova-api will return an 500 to client."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"So the list will indicate all possible return code of this method."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa1b9901_8f89db28","line":10,"updated":"2015-08-19 10:22:27.000000000","message":"s/docorated/decorated","commit_id":"2aab0bc4356d6dd4e0a5990d28c7e714f75e5f4a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"603530df702f1823ebecdf38d9078acbfa5a3f9b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"is docorated by it. If the REST api method has any error code which are not in"},{"line_number":11,"context_line":"the list of extensions.expected_errors, nova-api will return an 500 to client."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"So the list will indicate all possible return code of this method."},{"line_number":14,"context_line":"os-resetState action have no 400(BadRequest Error) comes out, remove it."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1476490"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa1b9901_6f86c714","line":13,"updated":"2015-08-19 10:22:27.000000000","message":"s/code/codes/?","commit_id":"2aab0bc4356d6dd4e0a5990d28c7e714f75e5f4a"}],"nova/api/openstack/compute/admin_actions.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8265761159063cc0c5bab2e65baa7fc5f308c164","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    @wsgi.response(202)"},{"line_number":68,"context_line":"    @extensions.expected_errors(404)"},{"line_number":69,"context_line":"    @wsgi.action(\u0027os-resetState\u0027)"},{"line_number":70,"context_line":"    @validation.schema(reset_server_state.reset_state)"},{"line_number":71,"context_line":"    def _reset_state(self, req, id, body):"},{"line_number":72,"context_line":"        \"\"\"Permit admins to reset the state of a server.\"\"\""},{"line_number":73,"context_line":"        context \u003d req.environ[\"nova.context\"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_3a6412b7","line":70,"updated":"2015-08-21 10:48:20.000000000","message":"does the validation possible produce a 400 error?","commit_id":"df5a276643dd1c19db7b8e865bcff63cda35d363"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"19a07a34d144c4f366382498dbaed2f283059b8d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    @wsgi.response(202)"},{"line_number":68,"context_line":"    @extensions.expected_errors(404)"},{"line_number":69,"context_line":"    @wsgi.action(\u0027os-resetState\u0027)"},{"line_number":70,"context_line":"    @validation.schema(reset_server_state.reset_state)"},{"line_number":71,"context_line":"    def _reset_state(self, req, id, body):"},{"line_number":72,"context_line":"        \"\"\"Permit admins to reset the state of a server.\"\"\""},{"line_number":73,"context_line":"        context \u003d req.environ[\"nova.context\"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_8293334f","line":70,"in_reply_to":"fa1b9901_3a6412b7","updated":"2015-08-24 02:47:55.000000000","message":"hi John, this error has been handled by extensions.expected_errorr, no need to care about exception.ValidationError again:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/extensions.py#L494","commit_id":"df5a276643dd1c19db7b8e865bcff63cda35d363"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1afd9912604c9e574667dfba5240fa107257fe80","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, id)"},{"line_number":80,"context_line":"        instance.vm_state \u003d state"},{"line_number":81,"context_line":"        instance.task_state \u003d None"},{"line_number":82,"context_line":"        instance.save(admin_state_reset\u003dTrue)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_a99d90bd","line":81,"updated":"2015-08-20 02:48:56.000000000","message":"there can raise NotFound, we didn\u0027t catch it here. But this should be another patch.","commit_id":"df5a276643dd1c19db7b8e865bcff63cda35d363"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"799d4298d9fcb70b23818ce4037a8af3de704456","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, id)"},{"line_number":80,"context_line":"        instance.vm_state \u003d state"},{"line_number":81,"context_line":"        instance.task_state \u003d None"},{"line_number":82,"context_line":"        instance.save(admin_state_reset\u003dTrue)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_8785eccf","line":81,"in_reply_to":"fa1b9901_a99d90bd","updated":"2015-08-20 17:51:18.000000000","message":"get_instance raises NotFound, so current patch seems good for me.","commit_id":"df5a276643dd1c19db7b8e865bcff63cda35d363"}]}
