)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"b4c97238fc99b56a1850a58c3f6b6e9011b97178","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Delete Snapshot: status wrongly set when busy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This fix sets the snapshot status correctly to \u0027error_deleting\u0027,"},{"line_number":10,"context_line":"when snapshot reportd to be busy by backend driver."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Iecfd32b8265ce9f7cdfcba6d89397f269024b75d"},{"line_number":13,"context_line":"Closes-Bug: #1564623"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a122d0e_185db348","line":10,"range":{"start_line":10,"start_character":14,"end_line":10,"end_character":21},"updated":"2016-05-03 11:41:02.000000000","message":"s/reportd/reported","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"}],"manila/share/manager.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"b4c97238fc99b56a1850a58c3f6b6e9011b97178","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_d51e615e","line":1950,"range":{"start_line":1950,"start_character":45,"end_line":1950,"end_character":66},"updated":"2016-05-03 11:41:02.000000000","message":"If the driver export \"ShareSnapshotIsBusy\", it means snapshot are being used. not the snapshot itself is a problem. If the snapshot state is set to available, The snapshot can continue to be used. User can continue to operate this snapshot. If the snapshot state is set to error_deleting， only the administrator can operate this snapshot.\n\nso, Is it the available state more suitable than error_deleting state?","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"99b82126cb4d493a6f0ae6a40b83883b9877395d","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_ddb8362d","line":1950,"range":{"start_line":1950,"start_character":45,"end_line":1950,"end_character":66},"in_reply_to":"1a122d0e_d51e615e","updated":"2016-05-03 19:00:31.000000000","message":"+1, I agree that the available state is more suitable than error_deleting in this case, so we prevent the snapshot from being locked in this state.","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"fa4947a9436b15f159b62ded32985383d06658a8","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_fccb5448","line":1950,"range":{"start_line":1950,"start_character":45,"end_line":1950,"end_character":66},"in_reply_to":"1a122d0e_ddb8362d","updated":"2016-05-04 13:39:31.000000000","message":"There are two drivers that raise the SnapshotBusy exception today: the NetApp driver and the ZFS driver.. \n\nThis is the delete path.. think of the state transition:\n\nUser wants to delete a snapshot\n\n - Snapshot status goes from \u0027available\u0027 or \u0027error\u0027 to \u0027deleting\u0027\n\nDriver raises a \"ShareSnapshotIsBusy\" exception\n\n - Snapshot status goes from \u0027deleting\u0027 to \u0027available\u0027?\n\nWhat is the user experience in this? Currently, there is no asynchronous user messaging in Manila, so the user would be very confused. \n\nA user *cannot* delete a snapshot that is set to \u0027error_deleting\u0027. An administrator can reset-state.. but we expect that the administrator reads the logs before doing something like that. \n\nSo, error_deleting is the right state.","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"b4c97238fc99b56a1850a58c3f6b6e9011b97178","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"        try:"},{"line_number":1934,"context_line":"            self.driver.delete_snapshot(context, snapshot_instance,"},{"line_number":1935,"context_line":"                                        share_server\u003dshare_server)"},{"line_number":1936,"context_line":"        except exception.ShareSnapshotIsBusy:"},{"line_number":1937,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1938,"context_line":"                if force:"},{"line_number":1939,"context_line":"                    msg \u003d _(\"The driver reported that the snapshot %s \""},{"line_number":1940,"context_line":"                            \"was busy on the backend. Since this \""},{"line_number":1941,"context_line":"                            \"operation was forced, the snapshot will \""},{"line_number":1942,"context_line":"                            \"be deleted from Manila\u0027s database. A \""},{"line_number":1943,"context_line":"                            \"cleanup on the backend may be necessary.\")"},{"line_number":1944,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1945,"context_line":"                    exc.reraise \u003d False"},{"line_number":1946,"context_line":"                else:"},{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1954,"context_line":"                if force:"},{"line_number":1955,"context_line":"                    msg \u003d _(\"The driver was unable to delete the \""},{"line_number":1956,"context_line":"                            \"snapshot %s on the backend. Since this \""},{"line_number":1957,"context_line":"                            \"operation is forced, the snapshot will \""},{"line_number":1958,"context_line":"                            \"be deleted from Manila\u0027s database. A cleanup on \""},{"line_number":1959,"context_line":"                            \"the backend may be necessary.\")"},{"line_number":1960,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1961,"context_line":"                    exc.reraise \u003d False"},{"line_number":1962,"context_line":"                else:"},{"line_number":1963,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1964,"context_line":"                        context,"},{"line_number":1965,"context_line":"                        snapshot_instance_id,"},{"line_number":1966,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1967,"context_line":""},{"line_number":1968,"context_line":"        self.db.share_snapshot_instance_delete(context, snapshot_instance_id)"},{"line_number":1969,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_639ebc64","line":1966,"range":{"start_line":1936,"start_character":8,"end_line":1966,"end_character":68},"updated":"2016-05-03 11:41:02.000000000","message":"If change the STATUS_AVAILABLE to STATUS_ERROR_DELETING. The two branches(line 1936-1950  and line 1952-1966) of the processing is the same, Why do we need to be separated into two parts?","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6ea48579e6667b2a980d4986c0140b88a024a445","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"        try:"},{"line_number":1934,"context_line":"            self.driver.delete_snapshot(context, snapshot_instance,"},{"line_number":1935,"context_line":"                                        share_server\u003dshare_server)"},{"line_number":1936,"context_line":"        except exception.ShareSnapshotIsBusy:"},{"line_number":1937,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1938,"context_line":"                if force:"},{"line_number":1939,"context_line":"                    msg \u003d _(\"The driver reported that the snapshot %s \""},{"line_number":1940,"context_line":"                            \"was busy on the backend. Since this \""},{"line_number":1941,"context_line":"                            \"operation was forced, the snapshot will \""},{"line_number":1942,"context_line":"                            \"be deleted from Manila\u0027s database. A \""},{"line_number":1943,"context_line":"                            \"cleanup on the backend may be necessary.\")"},{"line_number":1944,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1945,"context_line":"                    exc.reraise \u003d False"},{"line_number":1946,"context_line":"                else:"},{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1954,"context_line":"                if force:"},{"line_number":1955,"context_line":"                    msg \u003d _(\"The driver was unable to delete the \""},{"line_number":1956,"context_line":"                            \"snapshot %s on the backend. Since this \""},{"line_number":1957,"context_line":"                            \"operation is forced, the snapshot will \""},{"line_number":1958,"context_line":"                            \"be deleted from Manila\u0027s database. A cleanup on \""},{"line_number":1959,"context_line":"                            \"the backend may be necessary.\")"},{"line_number":1960,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1961,"context_line":"                    exc.reraise \u003d False"},{"line_number":1962,"context_line":"                else:"},{"line_number":1963,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1964,"context_line":"                        context,"},{"line_number":1965,"context_line":"                        snapshot_instance_id,"},{"line_number":1966,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1967,"context_line":""},{"line_number":1968,"context_line":"        self.db.share_snapshot_instance_delete(context, snapshot_instance_id)"},{"line_number":1969,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_6bf16e6a","line":1966,"range":{"start_line":1936,"start_character":8,"end_line":1966,"end_character":68},"in_reply_to":"1a122d0e_639ebc64","updated":"2016-05-03 13:06:33.000000000","message":"+1 These should now be one.. you can retain the generic exception message..","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"99b82126cb4d493a6f0ae6a40b83883b9877395d","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"        try:"},{"line_number":1934,"context_line":"            self.driver.delete_snapshot(context, snapshot_instance,"},{"line_number":1935,"context_line":"                                        share_server\u003dshare_server)"},{"line_number":1936,"context_line":"        except exception.ShareSnapshotIsBusy:"},{"line_number":1937,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1938,"context_line":"                if force:"},{"line_number":1939,"context_line":"                    msg \u003d _(\"The driver reported that the snapshot %s \""},{"line_number":1940,"context_line":"                            \"was busy on the backend. Since this \""},{"line_number":1941,"context_line":"                            \"operation was forced, the snapshot will \""},{"line_number":1942,"context_line":"                            \"be deleted from Manila\u0027s database. A \""},{"line_number":1943,"context_line":"                            \"cleanup on the backend may be necessary.\")"},{"line_number":1944,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1945,"context_line":"                    exc.reraise \u003d False"},{"line_number":1946,"context_line":"                else:"},{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1954,"context_line":"                if force:"},{"line_number":1955,"context_line":"                    msg \u003d _(\"The driver was unable to delete the \""},{"line_number":1956,"context_line":"                            \"snapshot %s on the backend. Since this \""},{"line_number":1957,"context_line":"                            \"operation is forced, the snapshot will \""},{"line_number":1958,"context_line":"                            \"be deleted from Manila\u0027s database. A cleanup on \""},{"line_number":1959,"context_line":"                            \"the backend may be necessary.\")"},{"line_number":1960,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1961,"context_line":"                    exc.reraise \u003d False"},{"line_number":1962,"context_line":"                else:"},{"line_number":1963,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1964,"context_line":"                        context,"},{"line_number":1965,"context_line":"                        snapshot_instance_id,"},{"line_number":1966,"context_line":"                        {\u0027status\u0027: constants.STATUS_ERROR_DELETING})"},{"line_number":1967,"context_line":""},{"line_number":1968,"context_line":"        self.db.share_snapshot_instance_delete(context, snapshot_instance_id)"},{"line_number":1969,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_fd837253","line":1966,"range":{"start_line":1936,"start_character":8,"end_line":1966,"end_character":68},"in_reply_to":"1a122d0e_6bf16e6a","updated":"2016-05-03 19:00:31.000000000","message":"it cannot be one if we do \"available\" for snapshotIsBusy scenario and Error_deleting for other errors.","commit_id":"c69573b211b4667a7c71295f395aba6220462e96"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"88c8a6c8891feeab64ff2ca4619fdc2ac07c4c1e","unresolved":false,"context_lines":[{"line_number":1935,"context_line":"                                        share_server\u003dshare_server)"},{"line_number":1936,"context_line":"        except exception.ShareSnapshotIsBusy:"},{"line_number":1937,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1938,"context_line":"                if force:"},{"line_number":1939,"context_line":"                    msg \u003d _(\"The driver reported that the snapshot %s \""},{"line_number":1940,"context_line":"                            \"was busy on the backend. Since this \""},{"line_number":1941,"context_line":"                            \"operation was forced, the snapshot will \""},{"line_number":1942,"context_line":"                            \"be deleted from Manila\u0027s database. A \""},{"line_number":1943,"context_line":"                            \"cleanup on the backend may be necessary.\")"},{"line_number":1944,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1945,"context_line":"                    exc.reraise \u003d False"},{"line_number":1946,"context_line":"                else:"},{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_2ef21e07","side":"PARENT","line":1945,"range":{"start_line":1938,"start_character":16,"end_line":1945,"end_character":39},"updated":"2016-05-12 10:26:14.000000000","message":"Removing whole this part of code you break possibility to delete snapshot forcibly.","commit_id":"9604cca6b2018add6ccd71ed3c5c40b83161e508"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"d1579b7c960fd0ba59e816667b8eb2289d72b320","unresolved":false,"context_lines":[{"line_number":1935,"context_line":"                                        share_server\u003dshare_server)"},{"line_number":1936,"context_line":"        except exception.ShareSnapshotIsBusy:"},{"line_number":1937,"context_line":"            with excutils.save_and_reraise_exception() as exc:"},{"line_number":1938,"context_line":"                if force:"},{"line_number":1939,"context_line":"                    msg \u003d _(\"The driver reported that the snapshot %s \""},{"line_number":1940,"context_line":"                            \"was busy on the backend. Since this \""},{"line_number":1941,"context_line":"                            \"operation was forced, the snapshot will \""},{"line_number":1942,"context_line":"                            \"be deleted from Manila\u0027s database. A \""},{"line_number":1943,"context_line":"                            \"cleanup on the backend may be necessary.\")"},{"line_number":1944,"context_line":"                    LOG.exception(msg, snapshot_id)"},{"line_number":1945,"context_line":"                    exc.reraise \u003d False"},{"line_number":1946,"context_line":"                else:"},{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_e4d15731","side":"PARENT","line":1945,"range":{"start_line":1938,"start_character":16,"end_line":1945,"end_character":39},"in_reply_to":"dab17558_2ef21e07","updated":"2016-05-12 10:58:56.000000000","message":"This logic is done below. Above comment is false.","commit_id":"9604cca6b2018add6ccd71ed3c5c40b83161e508"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"88c8a6c8891feeab64ff2ca4619fdc2ac07c4c1e","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_AVAILABLE})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_6e954687","side":"PARENT","line":1950,"range":{"start_line":1950,"start_character":35,"end_line":1950,"end_character":60},"updated":"2016-05-12 10:26:14.000000000","message":"Only status should have been updated.","commit_id":"9604cca6b2018add6ccd71ed3c5c40b83161e508"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"d1579b7c960fd0ba59e816667b8eb2289d72b320","unresolved":false,"context_lines":[{"line_number":1947,"context_line":"                    self.db.share_snapshot_instance_update("},{"line_number":1948,"context_line":"                        context,"},{"line_number":1949,"context_line":"                        snapshot_instance_id,"},{"line_number":1950,"context_line":"                        {\u0027status\u0027: constants.STATUS_AVAILABLE})"},{"line_number":1951,"context_line":""},{"line_number":1952,"context_line":"        except Exception:"},{"line_number":1953,"context_line":"            with excutils.save_and_reraise_exception() as exc:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_24dcff45","side":"PARENT","line":1950,"range":{"start_line":1950,"start_character":35,"end_line":1950,"end_character":60},"in_reply_to":"dab17558_6e954687","updated":"2016-05-12 10:58:56.000000000","message":"This logic is done below. Above comment is false.","commit_id":"9604cca6b2018add6ccd71ed3c5c40b83161e508"}],"manila/tests/share/test_manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"289fd49391523517af984abe5b45c13f8c7e7f2d","unresolved":false,"context_lines":[{"line_number":1453,"context_line":"            self.context, expected_snapshot_instance_dict, share_server\u003dNone)"},{"line_number":1454,"context_line":"        db_update.assert_has_calls(expected_update_calls, any_order\u003dTrue)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"    def test_delete_snapshot_driver_other_exception(self):"},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"        def _raise_not_found(self, *args, **kwargs):"},{"line_number":1459,"context_line":"            raise exception.NotFound()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_9c622015","line":1456,"range":{"start_line":1456,"start_character":8,"end_line":1456,"end_character":51},"updated":"2016-05-04 13:46:22.000000000","message":"Rename this test, use ddt and provide two different kinds of exceptions.. both kinds of exceptions (ShareSnapshotIsBusy and any other exception) would be treated the same according to your code.","commit_id":"bce1519795e42e5dd800081f35ff152c7ebebef1"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"289fd49391523517af984abe5b45c13f8c7e7f2d","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        self.assertFalse(db_destroy_call.called)"},{"line_number":1497,"context_line":"        self.assertFalse(mock_exception_log.called)"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"    def test_delete_snapshot_exception_snapshot_is_busy(self):"},{"line_number":1500,"context_line":"        \"\"\"Test snapshot should not be deleted if busy.\"\"\""},{"line_number":1501,"context_line":""},{"line_number":1502,"context_line":"        def _raise_share_snapshot_is_busy(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_9c306009","line":1499,"range":{"start_line":1499,"start_character":8,"end_line":1499,"end_character":55},"updated":"2016-05-04 13:46:22.000000000","message":"This isn\u0027t relevant any more.. You can use ddt and supply both these exceptions to the above unit test..","commit_id":"bce1519795e42e5dd800081f35ff152c7ebebef1"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"549ec267d73b754b291742a77d677563b3571eb2","unresolved":false,"context_lines":[{"line_number":1453,"context_line":"            self.context, expected_snapshot_instance_dict, share_server\u003dNone)"},{"line_number":1454,"context_line":"        db_update.assert_has_calls(expected_update_calls, any_order\u003dTrue)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"    @ddt.data(\u0027ShareSnapshotIsBusy\u0027,"},{"line_number":1457,"context_line":"              \u0027NotFound\u0027)"},{"line_number":1458,"context_line":"    def test_delete_snapshot_driver_exception(self, exc):"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":"        share_id \u003d \u0027FAKE_SHARE_ID\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5b205749","line":1457,"range":{"start_line":1456,"start_character":4,"end_line":1457,"end_character":25},"updated":"2016-05-05 13:44:53.000000000","message":"Take a look at line 1586 (master), you can avoid the if statements.. \n\nhttps://github.com/openstack/manila/blob/53364e0/manila/tests/share/test_manager.py#L1586","commit_id":"95bf35f25ae7854609333cc1421aa1dd1de1f13f"},{"author":{"_account_id":16305,"name":"NidhiMittalHada","email":"nidhimittal19@gmail.com","username":"nidhimittalhada"},"change_message_id":"9a7460f1fa7a9dd7ea397796b4192eb710a1cc07","unresolved":false,"context_lines":[{"line_number":1453,"context_line":"            self.context, expected_snapshot_instance_dict, share_server\u003dNone)"},{"line_number":1454,"context_line":"        db_update.assert_has_calls(expected_update_calls, any_order\u003dTrue)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"    @ddt.data(\u0027ShareSnapshotIsBusy\u0027,"},{"line_number":1457,"context_line":"              \u0027NotFound\u0027)"},{"line_number":1458,"context_line":"    def test_delete_snapshot_driver_exception(self, exc):"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":"        share_id \u003d \u0027FAKE_SHARE_ID\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_bfe11ad3","line":1457,"range":{"start_line":1456,"start_character":4,"end_line":1457,"end_character":25},"in_reply_to":"1a122d0e_5b205749","updated":"2016-05-06 06:27:04.000000000","message":"Tried that earlier, there was error that snapshot_name parameter was reqd. which i could not give directly from ddt. May be i am missing something.","commit_id":"95bf35f25ae7854609333cc1421aa1dd1de1f13f"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"17b59ca0e04914a5591bb05a854021974ae015bd","unresolved":false,"context_lines":[{"line_number":1453,"context_line":"            self.context, expected_snapshot_instance_dict, share_server\u003dNone)"},{"line_number":1454,"context_line":"        db_update.assert_has_calls(expected_update_calls, any_order\u003dTrue)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"    @ddt.data(\u0027ShareSnapshotIsBusy\u0027,"},{"line_number":1457,"context_line":"              \u0027NotFound\u0027)"},{"line_number":1458,"context_line":"    def test_delete_snapshot_driver_exception(self, exc):"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":"        share_id \u003d \u0027FAKE_SHARE_ID\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_7ccb3273","line":1457,"range":{"start_line":1456,"start_character":4,"end_line":1457,"end_character":25},"in_reply_to":"dab17558_bfe11ad3","updated":"2016-05-06 12:04:08.000000000","message":"yes, so use \n\n    @ddt.data(exception.ShareSnapshotIsBusy(snapshot_name\u003d\u0027xyzzy\u0027), exception.NotFound)\n    def test_delete_snapshot_driver_exception(self, exc):\n\nand \n\n    assertRaises(type(exc))","commit_id":"95bf35f25ae7854609333cc1421aa1dd1de1f13f"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"88c8a6c8891feeab64ff2ca4619fdc2ac07c4c1e","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"        self.share_manager.driver.create_snapshot.assert_called_once_with("},{"line_number":1453,"context_line":"            self.context, expected_snapshot_instance_dict, share_server\u003dNone)"},{"line_number":1454,"context_line":"        db_update.assert_has_calls(expected_update_calls, any_order\u003dTrue)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"    @ddt.data(exception.ShareSnapshotIsBusy(snapshot_name\u003d\u0027fake_name\u0027),"},{"line_number":1457,"context_line":"              exception.NotFound())"},{"line_number":1458,"context_line":"    def test_delete_snapshot_driver_exception(self, exc):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_ce3a7298","line":1455,"updated":"2016-05-12 10:26:14.000000000","message":"We should have test when snapshot is deleted anyway if key \"force\u003dTrue\" was provided to \"delete_snapshot\" method.","commit_id":"69eaebc774c4f2132f6dc123ec296df7d3bd0cb0"}]}
