)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06a2ceb380bd82307af7b5828f49c932313ec063","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Disallow resize if image not available"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If a resize is attempted on an instance that was started from an image"},{"line_number":10,"context_line":"that has since been deleted, a resize will fail. To make error reporting"},{"line_number":11,"context_line":"a bit cleaner."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ideal solution is to keep all the necessary metadata associated with the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAPH%2F%2F2pM%3D","line":10,"updated":"2013-05-21 16:32:56.000000000","message":"I\u0027d change \"To make error reporting a bit cleaner.\" to \"This change makes error reporting cleaner.\"","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f6714bb423bda0e2418fa6104990b2bbdc066e38","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Disallow resize if image not available"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If a resize is attempted on an instance that was started from an image"},{"line_number":10,"context_line":"that has since been deleted, a resize will fail. To make error reporting"},{"line_number":11,"context_line":"a bit cleaner."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ideal solution is to keep all the necessary metadata associated with the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAPH%2F%2F2oc%3D","line":10,"in_reply_to":"AAAAPH%2F%2F2pM%3D","updated":"2013-05-21 16:42:06.000000000","message":"Done","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06a2ceb380bd82307af7b5828f49c932313ec063","unresolved":false,"context_lines":[{"line_number":10,"context_line":"that has since been deleted, a resize will fail. To make error reporting"},{"line_number":11,"context_line":"a bit cleaner."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ideal solution is to keep all the necessary metadata associated with the"},{"line_number":14,"context_line":"image when the instance was started in nova, and re-use it in case of"},{"line_number":15,"context_line":"migration/resize"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAPH%2F%2F2pE%3D","line":13,"updated":"2013-05-21 16:32:56.000000000","message":"Should you be pointing out the \u0027ideal solution\u0027 in the commit message when you\u0027re not doing this as part of this patch?  It sort of makes it confusing to review since I\u0027m not sure if I should be looking for an implementation of the ideal solution.  Maybe a blueprint should be opened to track that?","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f6714bb423bda0e2418fa6104990b2bbdc066e38","unresolved":false,"context_lines":[{"line_number":10,"context_line":"that has since been deleted, a resize will fail. To make error reporting"},{"line_number":11,"context_line":"a bit cleaner."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Ideal solution is to keep all the necessary metadata associated with the"},{"line_number":14,"context_line":"image when the instance was started in nova, and re-use it in case of"},{"line_number":15,"context_line":"migration/resize"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAPH%2F%2F2oY%3D","line":13,"in_reply_to":"AAAAPH%2F%2F2pE%3D","updated":"2013-05-21 16:42:06.000000000","message":"I might go and raise the blueprint - it does seem like a decent idea - but also not a trivial amount of work.You are right no need for it here.","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"941b6fdecfed1a5db15476686f89c17a5a8994a6","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"        except (exception.ImageNotFound,"},{"line_number":1102,"context_line":"                exception.ImageNotAuthorized,"},{"line_number":1103,"context_line":"                exception.Invalid):"},{"line_number":1104,"context_line":"            msg \u003d _(\"Cannot access the orriginal image \""},{"line_number":1105,"context_line":"                    \"instance was started with.\")"},{"line_number":1106,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F578%3D","line":1104,"updated":"2013-05-20 16:39:49.000000000","message":"\u0027original\u0027.","commit_id":"740793aca7cff1f0e50aca096149295ea200af3f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b783533d56c127fecba284822c7ac70dc93e4ec3","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":1099,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":1100,"context_line":"                    \u0027resize\u0027)"},{"line_number":1101,"context_line":"        except (exception.ImageNotFound,"},{"line_number":1102,"context_line":"                exception.ImageNotAuthorized,"},{"line_number":1103,"context_line":"                exception.Invalid):"},{"line_number":1104,"context_line":"            msg \u003d _(\"Cannot access the original image \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F50s%3D","line":1101,"updated":"2013-05-20 17:22:10.000000000","message":"I\u0027d break these out a bit for more granular error codes, i.e. ImageNotFound is a subclass of NotFound with a code of 404 so it maps to exc.HTTPNotFound and ImageNotAuthorized should map to exc.HTTPUnauthorized (code 401).  The Invalid except maps to exc.HTTPBadRequest (code 400).\n\nYou could also get usability points by pulling the image_id parameter out of the ImageNotFound/ImageNotAuthorized exceptions and putting those into the HTTP exception message you raise.","commit_id":"d6f475ef8dd356c37a54f8fa376f2e8037a8ccb2"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"df2f23822b9e99c57708ca11300f8a5544a4236e","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":1099,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":1100,"context_line":"                    \u0027resize\u0027)"},{"line_number":1101,"context_line":"        except (exception.ImageNotFound,"},{"line_number":1102,"context_line":"                exception.ImageNotAuthorized,"},{"line_number":1103,"context_line":"                exception.Invalid):"},{"line_number":1104,"context_line":"            msg \u003d _(\"Cannot access the original image \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F2qw%3D","line":1101,"in_reply_to":"AAAAPH%2F%2F50s%3D","updated":"2013-05-21 16:27:16.000000000","message":"Hi - I did split it up, but I kept the 400 for image not found as well. After spending some time reading various HTTP status code discussions - I decided that 404 should really be used for when the main resource is missing (not a hard science tho).","commit_id":"d6f475ef8dd356c37a54f8fa376f2e8037a8ccb2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06a2ceb380bd82307af7b5828f49c932313ec063","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"        except exception.ImageNotFound as image_error:"},{"line_number":1106,"context_line":"            msg \u003d _(\"Image that the instance was started \""},{"line_number":1107,"context_line":"                    \"with could not be found\")"},{"line_number":1108,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1109,"context_line":"        except exception.Invalid:"},{"line_number":1110,"context_line":"            msg \u003d _(\"Invalid instance image.\")"},{"line_number":1111,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2pw%3D","line":1108,"updated":"2013-05-21 16:32:56.000000000","message":"This should be HTTPNotFound for a 404.  HTTPBadRequest is a 400.","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f6714bb423bda0e2418fa6104990b2bbdc066e38","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"        except exception.ImageNotFound as image_error:"},{"line_number":1106,"context_line":"            msg \u003d _(\"Image that the instance was started \""},{"line_number":1107,"context_line":"                    \"with could not be found\")"},{"line_number":1108,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1109,"context_line":"        except exception.Invalid:"},{"line_number":1110,"context_line":"            msg \u003d _(\"Invalid instance image.\")"},{"line_number":1111,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2o8%3D","line":1108,"in_reply_to":"AAAAPH%2F%2F2pw%3D","updated":"2013-05-21 16:42:06.000000000","message":"See my comment on the previous patch please","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b0fa92dbf9e55d42148f42baa07a50f272e6032d","unresolved":false,"context_lines":[{"line_number":1104,"context_line":"            raise exc.HTTPUnauthorized(explanation\u003dmsg)"},{"line_number":1105,"context_line":"        except exception.ImageNotFound as image_error:"},{"line_number":1106,"context_line":"            msg \u003d _(\"Image that the instance was started \""},{"line_number":1107,"context_line":"                    \"with could not be found\")"},{"line_number":1108,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1109,"context_line":"        except exception.Invalid:"},{"line_number":1110,"context_line":"            msg \u003d _(\"Invalid instance image.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F2js%3D","line":1107,"updated":"2013-05-21 17:08:00.000000000","message":"Nit: Missing a period at the end of the sentence.","commit_id":"5191c9c56fd88324e42d54f89ed962b7d06621df"}],"nova/tests/api/openstack/compute/test_server_actions.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"225bd7ed7c396f4a6aac45acdc52748235ec92d4","unresolved":false,"context_lines":[{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        def _fake_resize(obj, context, instance, flavor_id):"},{"line_number":638,"context_line":"            self.resize_called \u003d True"},{"line_number":639,"context_line":"            raise exception.ImageNotFound(image_id\u003d\u0027fake_image_id\u0027)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"        self.stubs.Set(compute_api.API, \u0027resize\u0027, _fake_resize)"},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F50c%3D","line":639,"updated":"2013-05-20 17:22:55.000000000","message":"You should also test ImageNotAuthorized and Invalid exceptions since you\u0027re catching those.","commit_id":"d6f475ef8dd356c37a54f8fa376f2e8037a8ccb2"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"df2f23822b9e99c57708ca11300f8a5544a4236e","unresolved":false,"context_lines":[{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        def _fake_resize(obj, context, instance, flavor_id):"},{"line_number":638,"context_line":"            self.resize_called \u003d True"},{"line_number":639,"context_line":"            raise exception.ImageNotFound(image_id\u003d\u0027fake_image_id\u0027)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"        self.stubs.Set(compute_api.API, \u0027resize\u0027, _fake_resize)"},{"line_number":642,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2F2qQ%3D","line":639,"in_reply_to":"AAAAPH%2F%2F50c%3D","updated":"2013-05-21 16:27:16.000000000","message":"Done","commit_id":"d6f475ef8dd356c37a54f8fa376f2e8037a8ccb2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06a2ceb380bd82307af7b5828f49c932313ec063","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            (exception.ImageNotAuthorized(image_id\u003dimage_id),"},{"line_number":640,"context_line":"             webob.exc.HTTPUnauthorized),"},{"line_number":641,"context_line":"            (exception.ImageNotFound(image_id\u003dimage_id),"},{"line_number":642,"context_line":"             webob.exc.HTTPBadRequest),"},{"line_number":643,"context_line":"            (exception.Invalid, webob.exc.HTTPBadRequest),"},{"line_number":644,"context_line":"        ]"},{"line_number":645,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2pk%3D","line":642,"updated":"2013-05-21 16:32:56.000000000","message":"Should be HTTPNotFound.","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f6714bb423bda0e2418fa6104990b2bbdc066e38","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            (exception.ImageNotAuthorized(image_id\u003dimage_id),"},{"line_number":640,"context_line":"             webob.exc.HTTPUnauthorized),"},{"line_number":641,"context_line":"            (exception.ImageNotFound(image_id\u003dimage_id),"},{"line_number":642,"context_line":"             webob.exc.HTTPBadRequest),"},{"line_number":643,"context_line":"            (exception.Invalid, webob.exc.HTTPBadRequest),"},{"line_number":644,"context_line":"        ]"},{"line_number":645,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPH%2F%2F2o0%3D","line":642,"in_reply_to":"AAAAPH%2F%2F2pk%3D","updated":"2013-05-21 16:42:06.000000000","message":"Comment on the previous patch.","commit_id":"ef6c128cd883a70db43a54b870580b70ee90c1ee"}]}
