summaryrefslogtreecommitdiff
path: root/cinderclient/tests/v2/fakes.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-07-24 19:06:06 +0000
committerGerrit Code Review <review@openstack.org>2014-07-24 19:06:06 +0000
commitba826fbf3cc9219ad0cce0ff2d529975efc13a8d (patch)
tree8318e9ea90bf4e061841998a1225fd1ecb03d477 /cinderclient/tests/v2/fakes.py
parent15cbd66138ba14d1bedc94a793d9ed22b97a518f (diff)
parent4d3b9bcea3d4a031d63886c39d5ae3ddb39b7bf1 (diff)
downloadpython-cinderclient-ba826fbf3cc9219ad0cce0ff2d529975efc13a8d.tar.gz
Merge "Add commands for managing and unmanaging volumes"
Diffstat (limited to 'cinderclient/tests/v2/fakes.py')
-rw-r--r--cinderclient/tests/v2/fakes.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cinderclient/tests/v2/fakes.py b/cinderclient/tests/v2/fakes.py
index b8dfe27..f271653 100644
--- a/cinderclient/tests/v2/fakes.py
+++ b/cinderclient/tests/v2/fakes.py
@@ -370,6 +370,8 @@ class FakeHTTPClient(base_client.HTTPClient):
assert 'new_type' in body[action]
elif action == 'os-set_bootable':
assert list(body[action]) == ['bootable']
+ elif action == 'os-unmanage':
+ assert body[action] is None
else:
raise AssertionError("Unexpected action: %s" % action)
return (resp, {}, _body)
@@ -828,3 +830,8 @@ class FakeHTTPClient(base_client.HTTPClient):
def put_snapshots_1234_metadata(self, **kw):
return (200, {}, {"metadata": {"key1": "val1", "key2": "val2"}})
+
+ def post_os_volume_manage(self, **kw):
+ volume = _stub_volume(id='1234')
+ volume.update(kw['body']['volume'])
+ return (202, {}, {'volume': volume})