)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dde0b201994076bbe310564754fe93bdb428488a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch fixes this issue by catching SnapshotNotFound"},{"line_number":12,"context_line":"exception and raising HTTPBadRequest in controller."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact: Return 400 error instead of 500 if user passes"},{"line_number":15,"context_line":"non-existing snapshot id to the boot server api."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1614097"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_c6384440","line":14,"updated":"2016-08-29 14:34:29.000000000","message":"This creates a bug against nova - are there actual docs that need updating? If not, just remove this. If the api-ref docs in tree need to be updated, then just update those as part of this change, although I doubt that\u0027s the case as 400 is standard.","commit_id":"41fc6fe76bde22e882c90ea612cae8fd60277d62"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"041a440bc8a1b18adbe6a773377cecda75895b55","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch fixes this issue by catching SnapshotNotFound"},{"line_number":12,"context_line":"exception and raising HTTPBadRequest in controller."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact: Return 400 error instead of 500 if user passes"},{"line_number":15,"context_line":"non-existing snapshot id to the boot server api."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1614097"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da7fb54a_ca9452ea","line":14,"in_reply_to":"fa7ab95a_c6384440","updated":"2016-09-02 17:59:29.000000000","message":"400 is standard in this case because the id is passed on the body and api-wg guideline(https://github.com/openstack/api-wg/blob/master/guidelines/http.rst#failure-code-clarifications) shows 400 is valid:\n\n If a request contains a reference to a nonexistent resource\n in the body (not URI), the code should be 400 Bad Request.\n Do not use 404 NotFound because :rfc:`7231#section-6.5.4`\n (section 6.5.4) mentions the origin server did not find a\n current representation for the target resource for 404 and\n representation for the target resource means a URI. 422\n Unprocessable Entity is also an option for this situation\n but do not use 422 because the code is not defined in RFC\n 7231 and not standard. (For example, the specified flavor\n doesn\u0027t exist when creating a virtual machine, the code\n should be 400)","commit_id":"41fc6fe76bde22e882c90ea612cae8fd60277d62"}],"nova/tests/unit/api/openstack/compute/test_serversV21.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"bc2d4424376f595764e3387ce196477497898aad","unresolved":false,"context_lines":[{"line_number":2957,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":2958,"context_line":"                          self.controller.create, self.req, body\u003dself.body)"},{"line_number":2959,"context_line":""},{"line_number":2960,"context_line":"    @mock.patch.object(nova.compute.flavors, \u0027get_flavor_by_flavor_id\u0027,"},{"line_number":2961,"context_line":"                              return_value\u003dobjects.Flavor())"},{"line_number":2962,"context_line":"    @mock.patch.object(compute_api.API, \u0027create\u0027)"},{"line_number":2963,"context_line":"    def test_create_instance_with_non_existing_snapshot_id(self,"},{"line_number":2964,"context_line":"                                                 mock_get_flavor_by_flavor_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_58dcd745","line":2961,"range":{"start_line":2960,"start_character":23,"end_line":2961,"end_character":60},"updated":"2016-08-30 11:11:36.000000000","message":"nit: alignment","commit_id":"2a0045c66b6b2df56bd9651dd01a606036a014ee"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"bc2d4424376f595764e3387ce196477497898aad","unresolved":false,"context_lines":[{"line_number":2961,"context_line":"                              return_value\u003dobjects.Flavor())"},{"line_number":2962,"context_line":"    @mock.patch.object(compute_api.API, \u0027create\u0027)"},{"line_number":2963,"context_line":"    def test_create_instance_with_non_existing_snapshot_id(self,"},{"line_number":2964,"context_line":"                                                 mock_get_flavor_by_flavor_id,"},{"line_number":2965,"context_line":"                                                 mock_create):"},{"line_number":2966,"context_line":"        mock_create.side_effect \u003d exception.SnapshotNotFound(snapshot_id\u003d\u0027123\u0027)"},{"line_number":2967,"context_line":""},{"line_number":2968,"context_line":"        self.body[\u0027server\u0027] \u003d {\u0027name\u0027: \u0027server_test\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_78b6fbf9","line":2965,"range":{"start_line":2964,"start_character":49,"end_line":2965,"end_character":60},"updated":"2016-08-30 11:11:36.000000000","message":"The order is reversed.","commit_id":"2a0045c66b6b2df56bd9651dd01a606036a014ee"}]}
