)]}'
{"tempest/api/volume/base.py":[{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"3737923daa4df19f8816a22faee037b471ea02b9","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    @classmethod"},{"line_number":187,"context_line":"    def clear_volumes(cls):"},{"line_number":188,"context_line":"        for volume in cls.volumes:"},{"line_number":189,"context_line":"            test_utils.call_and_ignore_notfound_exc("},{"line_number":190,"context_line":"                cls.volumes_client.delete_volume, volume[\u0027id\u0027])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for volume in cls.volumes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_2fc4708f","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":51},"updated":"2017-01-05 09:21:28.000000000","message":"call_and_ignore_notfound will only ignore NotFound, and if exception other than NotFound is raised, the loop \"for volume in cls.volumes:\" will be broken.","commit_id":"5b0eaabb60186600f94d09d8308a93649210503b"},{"author":{"_account_id":19262,"name":"Liron Kuchlani","email":"lkuchlan@redhat.com","username":"lkuchlan"},"change_message_id":"1f216a6e91b254425529c308cbb6ae543eb5d5e8","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    @classmethod"},{"line_number":187,"context_line":"    def clear_volumes(cls):"},{"line_number":188,"context_line":"        for volume in cls.volumes:"},{"line_number":189,"context_line":"            test_utils.call_and_ignore_notfound_exc("},{"line_number":190,"context_line":"                cls.volumes_client.delete_volume, volume[\u0027id\u0027])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for volume in cls.volumes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_92073fc9","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":51},"in_reply_to":"ba5201f7_2fc4708f","updated":"2017-01-05 09:56:03.000000000","message":"Sorry my mistake, I was confused.\nActually, other exceptions not should be raised, but anyway I think we should wait for other opinions.","commit_id":"5b0eaabb60186600f94d09d8308a93649210503b"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"bdb1df84b03be96ae193c8195961e070cb2b11cb","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    @classmethod"},{"line_number":187,"context_line":"    def clear_volumes(cls):"},{"line_number":188,"context_line":"        for volume in cls.volumes:"},{"line_number":189,"context_line":"            test_utils.call_and_ignore_notfound_exc("},{"line_number":190,"context_line":"                cls.volumes_client.delete_volume, volume[\u0027id\u0027])"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for volume in cls.volumes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_48e44aab","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":51},"in_reply_to":"ba5201f7_92073fc9","updated":"2017-01-05 11:23:20.000000000","message":"It\u0027s true that \u0027other exceptions not should be raised\u0027 but if it happens anyway (like a misconfigured Cinder, or whatever), several/many volumes will not be deleted because the loop will exit.\n\nThat\u0027s why the correct approach, more general approach is to create the volumes in the tests (and not in resource_setup()), and use addCleanup(...).  This way  the cleanup will be tried for each and every created volume (not once for every volumes).\n\nSo, I think we should leave the code as is. Otherwise it\u0027s a lot of work: basically make the create_volume() method an instance method (not a class method) and schedule the addCleanup() call in the create_volume() method.","commit_id":"5b0eaabb60186600f94d09d8308a93649210503b"}]}
