summaryrefslogtreecommitdiff
path: root/novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py
diff options
context:
space:
mode:
Diffstat (limited to 'novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py')
-rw-r--r--novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py b/novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py
new file mode 100644
index 0000000..8ab732a
--- /dev/null
+++ b/novaclient/tests/unit/v2/contrib/test_assisted_volume_snapshots.py
@@ -0,0 +1,42 @@
1# Copyright (C) 2013, Red Hat, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15"""
16Assisted volume snapshots - to be used by Cinder and not end users.
17"""
18
19from novaclient import extension
20from novaclient.tests.unit import utils
21from novaclient.tests.unit.v2.contrib import fakes
22from novaclient.v2.contrib import assisted_volume_snapshots as assisted_snaps
23
24
25extensions = [
26 extension.Extension(assisted_snaps.__name__.split(".")[-1],
27 assisted_snaps),
28]
29cs = fakes.FakeClient(extensions=extensions)
30
31
32class AssistedVolumeSnapshotsTestCase(utils.TestCase):
33
34 def test_create_snap(self):
35 cs.assisted_volume_snapshots.create('1', {})
36 cs.assert_called('POST', '/os-assisted-volume-snapshots')
37
38 def test_delete_snap(self):
39 cs.assisted_volume_snapshots.delete('x', {})
40 cs.assert_called(
41 'DELETE',
42 '/os-assisted-volume-snapshots/x?delete_info={}')