)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"02810966ecdc1bfd4ca957918d50f2fce50d7dd0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch SnapshotNotFound exception at os-volumes"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When create a volume ,nova allow user input a snapshot id,"},{"line_number":10,"context_line":"it will get the snapshot according to the ID. We"},{"line_number":11,"context_line":"didn\u0027t handle exception.SnapshotNotFound thrown from"},{"line_number":12,"context_line":"cinder layer."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7a016987_42e921b6","line":9,"updated":"2015-05-22 17:08:36.000000000","message":"nit: When creating a volume, nova allows the user to input a snapshot id, and","commit_id":"1e163aca281ec27e70ef987c504a24052a9f8807"}],"nova/api/openstack/compute/contrib/volumes.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"abf70baf708879e16b6742dc75508bb072bdc3b5","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if snapshot_id is not None:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                snapshot \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":157,"context_line":"            except exception.SnapshotNotFound as e:"},{"line_number":158,"context_line":"                raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_37e295d6","line":157,"updated":"2015-04-30 06:41:44.000000000","message":"Why do we need to handle it manually for v2, when it\u0027s handled somewhere in server infrastructure layer, and appropriate 404 error is already returned?","commit_id":"722ce26444cb35c13548ee0e2bf0c963fd135c2d"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"023da1faff659c6c3151ae8fd4fcd5e26fe1e8e7","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if snapshot_id is not None:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                snapshot \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":157,"context_line":"            except exception.SnapshotNotFound as e:"},{"line_number":158,"context_line":"                raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_619f2804","line":157,"in_reply_to":"3acd31a7_0193d45c","updated":"2015-04-30 09:28:02.000000000","message":"yes, I agree with you, however, SnapshotNotFound should be translated to HTTPNotFound ,right? \n\ne.g we have a code used frequently in API layer\nyou mean this exception catch need to be removed also?\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/common.py#L528","commit_id":"722ce26444cb35c13548ee0e2bf0c963fd135c2d"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"57de937de614c897d2e2ddf15d5c7b23584a951f","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if snapshot_id is not None:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                snapshot \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":157,"context_line":"            except exception.SnapshotNotFound as e:"},{"line_number":158,"context_line":"                raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_fbf52783","line":157,"in_reply_to":"3acd31a7_37e295d6","updated":"2015-04-30 08:26:59.000000000","message":"you mean SnapshotNotFound is handled somewhere in this tree? but this is volume code not server side, right?","commit_id":"722ce26444cb35c13548ee0e2bf0c963fd135c2d"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"188879b8227d07e96da4f8090a2d45918d99097f","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if snapshot_id is not None:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                snapshot \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":157,"context_line":"            except exception.SnapshotNotFound as e:"},{"line_number":158,"context_line":"                raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_475d5ce8","line":157,"in_reply_to":"3acd31a7_619f2804","updated":"2015-04-30 10:01:45.000000000","message":"Well, i got it. The reason is to return more standard text error code and detailed message.","commit_id":"722ce26444cb35c13548ee0e2bf0c963fd135c2d"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"2c3fd1205b7f604cf790d6db410d0d03b74f27ff","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if snapshot_id is not None:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                snapshot \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":157,"context_line":"            except exception.SnapshotNotFound as e:"},{"line_number":158,"context_line":"                raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":159,"context_line":"        else:"},{"line_number":160,"context_line":"            snapshot \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_0193d45c","line":157,"in_reply_to":"3acd31a7_fbf52783","updated":"2015-04-30 09:19:21.000000000","message":"I mean that v2 returns\n\n HTTP/1.1 404 Not Found\n {\"itemNotFound\":\n   {\"message\": \"The resource could not be found.\",\n    \"code\": 404}}\n\nto a client as a final result. Apparently SnapshotNotFound is converted in wsgi server layer.\n\nIs this conversion is not enough?","commit_id":"722ce26444cb35c13548ee0e2bf0c963fd135c2d"}],"nova/api/openstack/compute/plugins/v3/volumes.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3688b921835518c350d3307702ef3be37ea12ea2","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        limited_list \u003d common.limited(volumes, req)"},{"line_number":131,"context_line":"        res \u003d [entity_maker(context, vol) for vol in limited_list]"},{"line_number":132,"context_line":"        return {\u0027volumes\u0027: res}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    @extensions.expected_errors(400)"},{"line_number":135,"context_line":"    @validation.schema(volumes_schema.create)"},{"line_number":136,"context_line":"    def create(self, req, body):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_2ea2cc4b","line":133,"updated":"2015-04-15 16:36:37.000000000","message":"we should add 404 at here","commit_id":"ad22ad3ae707ec540424cb749ac1ff0a13c245de"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3688b921835518c350d3307702ef3be37ea12ea2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        snapshot_id \u003d vol.get(\u0027snapshot_id\u0027, None)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if snapshot_id is not None:"},{"line_number":148,"context_line":"            try: "},{"line_number":149,"context_line":"                snapshot \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":150,"context_line":"            except exception.SnapshotNotFound as e:"},{"line_number":151,"context_line":"                raise exc.HTTPNotFound(explanation\u003de.format_message())"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_ce9128f3","line":148,"updated":"2015-04-15 16:36:37.000000000","message":"oops, an extra space","commit_id":"ad22ad3ae707ec540424cb749ac1ff0a13c245de"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3688b921835518c350d3307702ef3be37ea12ea2","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        try:"},{"line_number":470,"context_line":"            vol \u003d self.volume_api.get_snapshot(context, id)"},{"line_number":471,"context_line":"        except exception.SnapshotNotFoun as e:"},{"line_number":472,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        return {\u0027snapshot\u0027: _translate_snapshot_detail_view(context, vol)}"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_6ec334ee","line":471,"updated":"2015-04-15 16:36:37.000000000","message":"miss a \u0027d\u0027","commit_id":"ad22ad3ae707ec540424cb749ac1ff0a13c245de"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9eed2ef782c52591223d76946aa1fd2ed4d508c0","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        try:"},{"line_number":470,"context_line":"            vol \u003d self.volume_api.get_snapshot(context, id)"},{"line_number":471,"context_line":"        except exception.SnapshotNotFoun as e:"},{"line_number":472,"context_line":"            raise exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        return {\u0027snapshot\u0027: _translate_snapshot_detail_view(context, vol)}"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_e9605ed1","line":471,"in_reply_to":"7aaa499b_6ec334ee","updated":"2015-04-15 16:42:05.000000000","message":"um.. not sure why this ... typo. guess","commit_id":"ad22ad3ae707ec540424cb749ac1ff0a13c245de"}],"nova/tests/unit/api/openstack/compute/contrib/test_volumes.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"98658971b68871594c0c52086c121d4fd1534efc","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        size_effect\u003dexception.SnapshotNotFound(snapshot_id\u003d\u00271\u0027))"},{"line_number":290,"context_line":"    def test_volume_create_bad_snapshot_id(self, mock_get):"},{"line_number":291,"context_line":"        vol \u003d {\"snapshot_id\": \u00271\u0027}"},{"line_number":292,"context_line":"        body \u003d {\"volumes\": vol}"},{"line_number":293,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.url_prefix + \u0027/os-volumes\u0027)"},{"line_number":294,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":295,"context_line":"                  volumes.VolumeController().create, req, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_a93936a6","line":292,"updated":"2015-04-15 16:46:31.000000000","message":"s/volumes/volume, I fast than ci :)","commit_id":"744b132f6deaf5028445e14df6d7a2004469d42c"}]}
