)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2a1d2375f1b01825f9bb7cd8e6a9a8a708d20108","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the method delete from volume_image_metadata, volume_api.get()"},{"line_number":10,"context_line":"can be called twice. This first time is to get the metadata, and"},{"line_number":11,"context_line":"the second is to get the volume. We can get them both at a time"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0633c16db21e254ec43bad472748cbc0b7796a24"},{"line_number":14,"context_line":"Closes-Bug: #1489342"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da20952f_9a98e91d","line":11,"updated":"2015-08-31 13:36:48.000000000","message":"This should be reworded and \u0027.\u0027 added:  \"We can get both of them at the same time.\"","commit_id":"ef290454b0d7c3bbbf06bafe6110057a1803363e"}],"cinder/api/contrib/volume_image_metadata.py":[{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"4e70b7e8f5609476dac70cbc9642dc773427e77a","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                    raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                if not volume:"},{"line_number":157,"context_line":"                    volume \u003d self.volume_api.get(context, id)"},{"line_number":158,"context_line":"                self.volume_api.delete_volume_metadata("},{"line_number":159,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_ab67a6e7","line":156,"updated":"2015-08-31 10:57:58.000000000","message":"This feels wrong. Under what circumstances can the above call have not raised a 404 and so let us get here with volume \u003d None?","commit_id":"ef290454b0d7c3bbbf06bafe6110057a1803363e"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3f214c3ffceae890e97f6736a1d92293d27062d6","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                    raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                if not volume:"},{"line_number":157,"context_line":"                    volume \u003d self.volume_api.get(context, id)"},{"line_number":158,"context_line":"                self.volume_api.delete_volume_metadata("},{"line_number":159,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_daf0a1cb","line":156,"in_reply_to":"da20952f_ab67a6e7","updated":"2015-08-31 13:28:16.000000000","message":"If key is empty and _get_image_metadata is not called.","commit_id":"ef290454b0d7c3bbbf06bafe6110057a1803363e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"21d3635a3628d0998291f736e64c6168cde57dc8","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                    raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                if not volume:"},{"line_number":157,"context_line":"                    volume \u003d self.volume_api.get(context, id)"},{"line_number":158,"context_line":"                self.volume_api.delete_volume_metadata("},{"line_number":159,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_cccf6627","line":156,"updated":"2015-09-01 06:31:41.000000000","message":"This condition can\u0027t be true if key isn\u0027t None (which hasn\u0027t been handled correctly).  If volume is None, an HTTPNotFound exception should have been raised in _get_image_metadata() call.  Thus below volume_api.get() call is also not needed.\n\nThis function can be simplified as:\n\n    if key:\n        vol, meta \u003d self._get_image_metadta(ctxt, id)\n        if key not in metadata:\n            raise HTTPNotFound\n        \n        self.volume_api.delete_volume_metadata(ctxt, vol, key, ...)\n    else:\n        raise HTTPBadRequest(\u0027key cannot be None\u0027)","commit_id":"997e1387164d2a82eb8e4658247e5766818f9329"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"41bc1ca1b80ec811155a98b7c278fca038964ec7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                    raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                if not volume:"},{"line_number":157,"context_line":"                    volume \u003d self.volume_api.get(context, id)"},{"line_number":158,"context_line":"                self.volume_api.delete_volume_metadata("},{"line_number":159,"context_line":"                    context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_6a54fac8","line":156,"in_reply_to":"da20952f_cccf6627","updated":"2015-09-01 06:59:25.000000000","message":"Thank you, Zhiteng.","commit_id":"997e1387164d2a82eb8e4658247e5766818f9329"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"15bd02e7b26ed8595920084a9ae506d5d83a0ad2","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                    context, vol, key,"},{"line_number":156,"context_line":"                    meta_type\u003dcommon.METADATA_TYPES.image)"},{"line_number":157,"context_line":"            else:"},{"line_number":158,"context_line":"                raise webob.exc.HTTPBadRequest(\u0027The key cannot be None.\u0027)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"            return webob.Response(status_int\u003d200)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_6a75da2f","line":158,"updated":"2015-09-01 07:04:53.000000000","message":"This should be (explanation\u003derror_msg).  The one in my example was pseudo code, sorry for the confusion.","commit_id":"e5c1a0c2ef8e3c15b5a802a281a54c1217d943ec"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0b7f1e4e870f14142fcd4fb4e421b46ecc615ab2","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        except exception.VolumeNotFound:"},{"line_number":46,"context_line":"            msg \u003d _(\u0027Volume with volume id %s does not exist.\u0027) % volume_id"},{"line_number":47,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":48,"context_line":"        return (volume, meta)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _get_all_images_metadata(self, context):"},{"line_number":51,"context_line":"        \"\"\"Returns the image metadata for all volumes.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_3d9fc0b5","line":48,"updated":"2015-09-28 05:06:41.000000000","message":"So, when we try to retrieve the image medata from the volume (mod: _get_image_metadata) then something else other than image metadata also returned.\n\nDoes this really make sense?","commit_id":"1d1695838d4291e92043a31893d8cb103a26f627"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"7e37906912f28a60bfdc8aafe92453017c4b9743","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        except exception.VolumeNotFound:"},{"line_number":46,"context_line":"            msg \u003d _(\u0027Volume with volume id %s does not exist.\u0027) % volume_id"},{"line_number":47,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":48,"context_line":"        return (volume, meta)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _get_all_images_metadata(self, context):"},{"line_number":51,"context_line":"        \"\"\"Returns the image metadata for all volumes.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_01410e38","line":48,"in_reply_to":"9a1a9d01_3d9fc0b5","updated":"2015-09-29 00:15:24.000000000","message":"This method is only used within this file. Maybe a better name will remove the confusion.","commit_id":"1d1695838d4291e92043a31893d8cb103a26f627"}]}
