diff --git a/cinderclient/tests/v1/fakes.py b/cinderclient/tests/v1/fakes.py index 6fb7f5443..648733c57 100644 --- a/cinderclient/tests/v1/fakes.py +++ b/cinderclient/tests/v1/fakes.py @@ -282,6 +282,9 @@ class FakeHTTPClient(base_client.HTTPClient): def post_snapshots_5678_action(self, body, **kw): return self.post_snapshots_1234_action(body, **kw) + def delete_snapshots_1234(self, **kw): + return (202, {}, {}) + # # Volumes # diff --git a/cinderclient/tests/v1/test_shell.py b/cinderclient/tests/v1/test_shell.py index 50293cf91..8c2e33d70 100644 --- a/cinderclient/tests/v1/test_shell.py +++ b/cinderclient/tests/v1/test_shell.py @@ -351,3 +351,7 @@ class ShellTest(utils.TestCase): self.run_command('service-enable host cinder-volume') self.assert_called('PUT', '/os-services/enable', {"binary": "cinder-volume", "host": "host"}) + + def test_snapshot_delete(self): + self.run_command('snapshot-delete 1234') + self.assert_called('DELETE', '/snapshots/1234') diff --git a/cinderclient/tests/v2/fakes.py b/cinderclient/tests/v2/fakes.py index 086034aac..890fa5357 100644 --- a/cinderclient/tests/v2/fakes.py +++ b/cinderclient/tests/v2/fakes.py @@ -291,6 +291,9 @@ class FakeHTTPClient(base_client.HTTPClient): def post_snapshots_5678_action(self, body, **kw): return self.post_snapshots_1234_action(body, **kw) + def delete_snapshots_1234(self, **kw): + return (202, {}, {}) + # # Volumes # diff --git a/cinderclient/tests/v2/test_shell.py b/cinderclient/tests/v2/test_shell.py index 85a230ac9..4946adad0 100644 --- a/cinderclient/tests/v2/test_shell.py +++ b/cinderclient/tests/v2/test_shell.py @@ -341,3 +341,7 @@ class ShellTest(utils.TestCase): expected = {'os-retype': {'new_type': 'foo', 'migration_policy': 'never'}} self.assert_called('POST', '/volumes/1234/action', body=expected) + + def test_snapshot_delete(self): + self.run_command('snapshot-delete 1234') + self.assert_called('DELETE', '/snapshots/1234') diff --git a/doc/source/index.rst b/doc/source/index.rst index 6c4df2275..f7a6f9323 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -46,6 +46,7 @@ MASTER .. _1264415: http://bugs.launchpad.net/python-cinderclient/+bug/1264415 .. _1258489: http://bugs.launchpad.net/python-cinderclient/+bug/1258489 .. _1248519: http://bugs.launchpad.net/python-cinderclient/+bug/1248519 +.. _1257747: http://bugs.launchpad.net/python-cinderclient/+bug/1257747 1.0.7 -----