)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"f1e4596db2c25e7d92d3979b88afa0c55b61d285","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch exceptions.HasSnapshot() from delete image in rbd driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case an image has still an snapshot the RBD driver can\u0027t"},{"line_number":10,"context_line":"delete the image and raises exceptions.HasSnapshot(). Catch"},{"line_number":11,"context_line":"this exception and print raise HTTPConflict with log and error"},{"line_number":12,"context_line":"message."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5aef4532_2bd98a57","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":16},"updated":"2016-03-10 14:54:07.000000000","message":"Nit\n\u0027In case an image still has a snapshot ...\"","commit_id":"f79f431dea474c5027dcd638bd72f9be0c45f373"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"f1e4596db2c25e7d92d3979b88afa0c55b61d285","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Catch exceptions.HasSnapshot() from delete image in rbd driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case an image has still an snapshot the RBD driver can\u0027t"},{"line_number":10,"context_line":"delete the image and raises exceptions.HasSnapshot(). Catch"},{"line_number":11,"context_line":"this exception and print raise HTTPConflict with log and error"},{"line_number":12,"context_line":"message."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1555476"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5aef4532_ab93da59","line":12,"range":{"start_line":10,"start_character":54,"end_line":12,"end_character":8},"updated":"2016-03-10 14:54:07.000000000","message":"Nit\n\"Catch this exception to log and raise HTTPConflict.\" ?","commit_id":"f79f431dea474c5027dcd638bd72f9be0c45f373"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3d3b9bb2ff3b402f8c74aae9a414d0c9442473c7","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case an image still has a snapshot the RBD driver can\u0027t"},{"line_number":10,"context_line":"delete the image and raises exceptions.HasSnapshot(). Catch"},{"line_number":11,"context_line":"this exception and raise HTTPConflict."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1555476"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3afc51ec_66ffd8aa","line":11,"range":{"start_line":11,"start_character":37,"end_line":11,"end_character":38},"updated":"2016-03-14 11:13:20.000000000","message":"IMO this should be marked with APIImpact, right?","commit_id":"5366568be000729ee6df619ffc11e73d3c3da3c7"},{"author":{"_account_id":9064,"name":"Danny Al-Gaaf","email":"danny.al-gaaf@bisect.de","username":"dalgaaf"},"change_message_id":"f4d8198de50fd303187f4bd05f280c8c192c9a6e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case an image still has a snapshot the RBD driver can\u0027t"},{"line_number":10,"context_line":"delete the image and raises exceptions.HasSnapshot(). Catch"},{"line_number":11,"context_line":"this exception and raise HTTPConflict."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1555476"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3afc51ec_7b07691c","line":11,"range":{"start_line":11,"start_character":37,"end_line":11,"end_character":38},"in_reply_to":"3afc51ec_66ffd8aa","updated":"2016-03-14 13:18:36.000000000","message":"Not sure since HTTPConfict is already raised at the same place.","commit_id":"5366568be000729ee6df619ffc11e73d3c3da3c7"}],"glance/api/v2/images.py":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a9ab092b0505c290a4e77cb0d87e5a9084a79777","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            LOG.warn(msg)"},{"line_number":251,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":252,"context_line":"        except glance_store.exceptions.HasSnapshot as e:"},{"line_number":253,"context_line":"            LOG.warn(\"Image \u0027%s\u0027 could not be deleted \""},{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\", image_id)"},{"line_number":255,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":256,"context_line":"        except exception.InvalidImageStatusTransition as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_f3c20b84","line":253,"range":{"start_line":253,"start_character":16,"end_line":253,"end_character":20},"updated":"2016-03-10 10:50:10.000000000","message":"Nit: We need the translation bit (_ at the start here. See other \u0027warn\u0027 messages, eg:\n\n msg \u003d (_(\"Image \u0027%s\u0027 could not be deleted \"\n          \"because it has snapshot(s) left.\", image_id)\n LOG.warn(msg)\n\n(It\u0027s tedious I know...)","commit_id":"faa6f994afefeab574e792c863a84385b87820de"},{"author":{"_account_id":9064,"name":"Danny Al-Gaaf","email":"danny.al-gaaf@bisect.de","username":"dalgaaf"},"change_message_id":"06fe3dce5937250d414a2089e735ecf46aab1c42","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            LOG.warn(msg)"},{"line_number":251,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":252,"context_line":"        except glance_store.exceptions.HasSnapshot as e:"},{"line_number":253,"context_line":"            LOG.warn(\"Image \u0027%s\u0027 could not be deleted \""},{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\", image_id)"},{"line_number":255,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":256,"context_line":"        except exception.InvalidImageStatusTransition as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_5393fff9","line":253,"range":{"start_line":253,"start_character":16,"end_line":253,"end_character":20},"in_reply_to":"5aef4532_f3c20b84","updated":"2016-03-10 10:59:11.000000000","message":"Done","commit_id":"faa6f994afefeab574e792c863a84385b87820de"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40d9939abc9a6960e23c26ad717ead76364f478e","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            LOG.warn(msg)"},{"line_number":251,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":252,"context_line":"        except glance_store.exceptions.HasSnapshot as e:"},{"line_number":253,"context_line":"            msg \u003d (_(\"Image %(image_id)s could not be deleted \""},{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_91b4fff2","line":253,"updated":"2016-03-12 11:55:47.000000000","message":"_LW(","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40d9939abc9a6960e23c26ad717ead76364f478e","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            msg \u003d (_(\"Image %(image_id)s could not be deleted \""},{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"},{"line_number":257,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":258,"context_line":"        except exception.InvalidImageStatusTransition as e:"},{"line_number":259,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_d195e740","line":256,"updated":"2016-03-12 11:55:47.000000000","message":"I don\u0027t think we should log it again here. The rdb driver logs it already once https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/rbd.py#L338-L343","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"},{"author":{"_account_id":9064,"name":"Danny Al-Gaaf","email":"danny.al-gaaf@bisect.de","username":"dalgaaf"},"change_message_id":"f760d0fd1f9216c75684e73220fb23caee39af45","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            msg \u003d (_(\"Image %(image_id)s could not be deleted \""},{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"},{"line_number":257,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":258,"context_line":"        except exception.InvalidImageStatusTransition as e:"},{"line_number":259,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_ac10c44f","line":256,"in_reply_to":"3afc51ec_d195e740","updated":"2016-03-12 12:52:33.000000000","message":"Done","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"658412d089a46bd044ec735081e9928a2d3f65f0","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"},{"line_number":257,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":258,"context_line":"        except exception.InvalidImageStatusTransition as e:"},{"line_number":259,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":260,"context_line":"        except exception.NotAuthenticated as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_aeb6193b","line":257,"range":{"start_line":257,"start_character":53,"end_line":257,"end_character":55},"updated":"2016-03-11 15:31:20.000000000","message":"this should be delete.  I think we should pass the message to the end user since \u0027There was a conflict when trying to complete your request.\u0027  Isn\u0027t that helpful. https://github.com/Pylons/webob/blob/master/webob/exc.py#L793\n\nThis is just a suggestion, pls explain your reasoning, I am a noob to your customs :-)","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40d9939abc9a6960e23c26ad717ead76364f478e","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"},{"line_number":257,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":258,"context_line":"        except exception.InvalidImageStatusTransition as e:"},{"line_number":259,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":260,"context_line":"        except exception.NotAuthenticated as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_518f1723","line":257,"range":{"start_line":257,"start_character":53,"end_line":257,"end_character":55},"in_reply_to":"3afc51ec_510557c0","updated":"2016-03-12 11:55:47.000000000","message":"Correct the 409 Conflict will be raised with message \"The image cannot be deleted because it has snapshot(s).\"","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"},{"author":{"_account_id":9064,"name":"Danny Al-Gaaf","email":"danny.al-gaaf@bisect.de","username":"dalgaaf"},"change_message_id":"f760d0fd1f9216c75684e73220fb23caee39af45","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"},{"line_number":257,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":258,"context_line":"        except exception.InvalidImageStatusTransition as e:"},{"line_number":259,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":260,"context_line":"        except exception.NotAuthenticated as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_0c1e1863","line":257,"range":{"start_line":257,"start_character":53,"end_line":257,"end_character":55},"in_reply_to":"3afc51ec_518f1723","updated":"2016-03-12 12:52:33.000000000","message":"Done","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"},{"author":{"_account_id":9064,"name":"Danny Al-Gaaf","email":"danny.al-gaaf@bisect.de","username":"dalgaaf"},"change_message_id":"cc8cf8aa71caa77c7e4781b144686197c77a0208","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                     \"because it has snapshot(s) left.\") %"},{"line_number":255,"context_line":"                   {\u0027image_id\u0027: image_id})"},{"line_number":256,"context_line":"            LOG.warn(msg)"},{"line_number":257,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":258,"context_line":"        except exception.InvalidImageStatusTransition as e:"},{"line_number":259,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":260,"context_line":"        except exception.NotAuthenticated as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_510557c0","line":257,"range":{"start_line":257,"start_character":53,"end_line":257,"end_character":55},"in_reply_to":"3afc51ec_aeb6193b","updated":"2016-03-12 11:32:10.000000000","message":"It already pass a useful error message to the user. It forwards the original error message from the driver to the user since e.msg should be the original glance_store.exceptions.HasSnapshot exception msg.","commit_id":"0b8b62dfe01cc91edcc42471442252b4d180264e"}],"glance/tests/unit/v2/test_images_resource.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3d3b9bb2ff3b402f8c74aae9a414d0c9442473c7","unresolved":false,"context_lines":[{"line_number":2010,"context_line":"    def test_delete_has_snapshot(self):"},{"line_number":2011,"context_line":"        def fake_safe_delete_from_backend(self, *args, **kwargs):"},{"line_number":2012,"context_line":"            raise store.exceptions.HasSnapshot()"},{"line_number":2013,"context_line":"        self.stubs.Set(self.store_utils, \u0027safe_delete_from_backend\u0027,"},{"line_number":2014,"context_line":"                       fake_safe_delete_from_backend)"},{"line_number":2015,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":2016,"context_line":"        self.assertRaises(webob.exc.HTTPConflict, self.controller.delete,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_06a6d40f","line":2013,"range":{"start_line":2013,"start_character":13,"end_line":2013,"end_character":18},"updated":"2016-03-14 11:13:20.000000000","message":"use mock.patch.object instead","commit_id":"5366568be000729ee6df619ffc11e73d3c3da3c7"},{"author":{"_account_id":9064,"name":"Danny Al-Gaaf","email":"danny.al-gaaf@bisect.de","username":"dalgaaf"},"change_message_id":"f4d8198de50fd303187f4bd05f280c8c192c9a6e","unresolved":false,"context_lines":[{"line_number":2010,"context_line":"    def test_delete_has_snapshot(self):"},{"line_number":2011,"context_line":"        def fake_safe_delete_from_backend(self, *args, **kwargs):"},{"line_number":2012,"context_line":"            raise store.exceptions.HasSnapshot()"},{"line_number":2013,"context_line":"        self.stubs.Set(self.store_utils, \u0027safe_delete_from_backend\u0027,"},{"line_number":2014,"context_line":"                       fake_safe_delete_from_backend)"},{"line_number":2015,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":2016,"context_line":"        self.assertRaises(webob.exc.HTTPConflict, self.controller.delete,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_9b4d159c","line":2013,"range":{"start_line":2013,"start_character":13,"end_line":2013,"end_character":18},"in_reply_to":"3afc51ec_06a6d40f","updated":"2016-03-14 13:18:36.000000000","message":"It\u0027s simply a copy from the test above. IMO if this would be okay, it should be patched in the whole file separately.","commit_id":"5366568be000729ee6df619ffc11e73d3c3da3c7"}]}
