)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"10970558e9fe6fbd935767b948dbf19fb3c3b02c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Check host exists before evacuate"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently if or not a host exists is not checked"},{"line_number":10,"context_line":"before we attempt to evacuate to the host. This"},{"line_number":11,"context_line":"results in rpc call being made to non existent host"},{"line_number":12,"context_line":"if you try to evacuate to a host that is not in our"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAQn%2F%2FAuw%3D","line":9,"updated":"2013-08-08 14:30:24.000000000","message":"The wording is not grammatically correct. You might want to change it to: \n\nBefore an evacuate is attempted, there are no checks in place to see if the host exists. This results in an RPC call to a non-existent host. This patch adds a simple check for the existence of a host before evacuate is attempted.","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"}],"nova/api/openstack/compute/contrib/evacuate.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"da9f7490d7df92fab5d02c91b182eed3d4818865","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":74,"context_line":"        except exception.NotFound:"},{"line_number":75,"context_line":"            msg \u003d _(\"Compute host %s not found.\") % host"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAyY%3D","line":73,"updated":"2013-08-08 14:24:06.000000000","message":"Unused variable, no need to assign the result.","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"420ea9220dbeb247c8b69eda8f9435c1459e7bdb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":74,"context_line":"        except exception.NotFound:"},{"line_number":75,"context_line":"            msg \u003d _(\"Compute host %s not found.\") % host"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAhc%3D","line":73,"in_reply_to":"AAAAQn%2F%2FAyY%3D","updated":"2013-08-08 15:04:58.000000000","message":"+1","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":4340,"name":"Sulochan Acharya","email":"sulochan@gmail.com","username":"sulochan-acharya"},"change_message_id":"182648c86b7c574cf75cc88543b82d2e3a970685","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            service \u003d self.host_api.service_get_by_compute_host(context, host)"},{"line_number":74,"context_line":"        except exception.NotFound:"},{"line_number":75,"context_line":"            msg \u003d _(\"Compute host %s not found.\") % host"},{"line_number":76,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAho%3D","line":73,"in_reply_to":"AAAAQn%2F%2FAyY%3D","updated":"2013-08-08 15:05:00.000000000","message":"Done","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"da9f7490d7df92fab5d02c91b182eed3d4818865","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":83,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":84,"context_line":"                    \u0027evacuate\u0027)"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            msg \u003d _(\"Error in evacuate, %s\") % e"},{"line_number":87,"context_line":"            LOG.exception(msg, instance\u003dinstance)"},{"line_number":88,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAxQ%3D","line":85,"updated":"2013-08-08 14:24:06.000000000","message":"Can you get rid of the catchall for Exception here?  The v3 version of the plugin does a better job with exception handling.\n\ne.x. instance not found would actually return a 400 here.\n\nYou should be able to just handle these 2:\n\nInstanceNotFound\n\nComputeServiceUnavailable","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":4340,"name":"Sulochan Acharya","email":"sulochan@gmail.com","username":"sulochan-acharya"},"change_message_id":"6c9153e2ee60343a4c18638ab3f759f2a1630be2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":83,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":84,"context_line":"                    \u0027evacuate\u0027)"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            msg \u003d _(\"Error in evacuate, %s\") % e"},{"line_number":87,"context_line":"            LOG.exception(msg, instance\u003dinstance)"},{"line_number":88,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAbY%3D","line":85,"in_reply_to":"AAAAQn%2F%2FAhs%3D","updated":"2013-08-08 15:25:46.000000000","message":"i submitted with this change but will undo it and make it into a new patch.","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":4340,"name":"Sulochan Acharya","email":"sulochan@gmail.com","username":"sulochan-acharya"},"change_message_id":"182648c86b7c574cf75cc88543b82d2e3a970685","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":83,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":84,"context_line":"                    \u0027evacuate\u0027)"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            msg \u003d _(\"Error in evacuate, %s\") % e"},{"line_number":87,"context_line":"            LOG.exception(msg, instance\u003dinstance)"},{"line_number":88,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAhg%3D","line":85,"in_reply_to":"AAAAQn%2F%2FAxQ%3D","updated":"2013-08-08 15:05:00.000000000","message":"Done","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"420ea9220dbeb247c8b69eda8f9435c1459e7bdb","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":83,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":84,"context_line":"                    \u0027evacuate\u0027)"},{"line_number":85,"context_line":"        except Exception as e:"},{"line_number":86,"context_line":"            msg \u003d _(\"Error in evacuate, %s\") % e"},{"line_number":87,"context_line":"            LOG.exception(msg, instance\u003dinstance)"},{"line_number":88,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAhs%3D","line":85,"in_reply_to":"AAAAQn%2F%2FAxQ%3D","updated":"2013-08-08 15:04:58.000000000","message":"I would prefer this in a separate patch since it\u0027s not directly relevant to the issue at hand.","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"ce79a33d2bb0d4db38b75d58f5048b4b4e28fa82","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":83,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":84,"context_line":"                    \u0027evacuate\u0027)"},{"line_number":85,"context_line":"        except exception.InstanceNotFound as e:"},{"line_number":86,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":87,"context_line":"        except exception.ComputeServiceUnavailable as e:"},{"line_number":88,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FAaA%3D","line":85,"updated":"2013-08-08 15:28:50.000000000","message":"I\u0027m not a fan of unrelated changes in patchsets, but if you\u0027re going to change it there should be tests for it.","commit_id":"ab8b2fcaf9a51293298972e18fa79f1f1e698e9d"},{"author":{"_account_id":4340,"name":"Sulochan Acharya","email":"sulochan@gmail.com","username":"sulochan-acharya"},"change_message_id":"b820b225da4df9f8d8bf1010eef2bd73beafc1c2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":83,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":84,"context_line":"                    \u0027evacuate\u0027)"},{"line_number":85,"context_line":"        except exception.InstanceNotFound as e:"},{"line_number":86,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":87,"context_line":"        except exception.ComputeServiceUnavailable as e:"},{"line_number":88,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FAY4%3D","line":85,"in_reply_to":"AAAAQn%2F%2FAaA%3D","updated":"2013-08-08 15:33:40.000000000","message":"saw your comment after i pushed this through, breaking this into separate patch. thanks.","commit_id":"ab8b2fcaf9a51293298972e18fa79f1f1e698e9d"}],"nova/tests/api/openstack/compute/contrib/test_evacuate.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"da9f7490d7df92fab5d02c91b182eed3d4818865","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        res \u003d req.get_response(app)"},{"line_number":85,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_evacuate_instance_with_bad_targed(self):"},{"line_number":88,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":89,"context_line":"        ctxt.user_id \u003d \u0027fake\u0027"},{"line_number":90,"context_line":"        ctxt.project_id \u003d \u0027fake\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAv0%3D","line":87,"updated":"2013-08-08 14:24:06.000000000","message":"typo: \"target\"","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"},{"author":{"_account_id":4340,"name":"Sulochan Acharya","email":"sulochan@gmail.com","username":"sulochan-acharya"},"change_message_id":"182648c86b7c574cf75cc88543b82d2e3a970685","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        res \u003d req.get_response(app)"},{"line_number":85,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_evacuate_instance_with_bad_targed(self):"},{"line_number":88,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":89,"context_line":"        ctxt.user_id \u003d \u0027fake\u0027"},{"line_number":90,"context_line":"        ctxt.project_id \u003d \u0027fake\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2FAhU%3D","line":87,"in_reply_to":"AAAAQn%2F%2FAv0%3D","updated":"2013-08-08 15:05:00.000000000","message":"Done","commit_id":"5385f19a4630b63de460380b92ca29cdb9a46ed7"}]}
