summaryrefslogtreecommitdiff
path: root/cinderclient/v1/volumes.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-21 08:46:11 +0000
committerGerrit Code Review <review@openstack.org>2012-12-21 08:46:11 +0000
commitbf7b86748a49455ae1545f01fe5cfc9b801223aa (patch)
tree017859901ae1cec33c3003c52ba8949849588619 /cinderclient/v1/volumes.py
parent9a496900964c7037db994db800bab456d57c2164 (diff)
parent24733119fe5da11bccf16d345f6f27cec8bbd06f (diff)
downloadpython-cinderclient-1.0.2.tar.gz
Merge "Add clone volume support to cinderclient."1.0.2
Diffstat (limited to 'cinderclient/v1/volumes.py')
-rw-r--r--cinderclient/v1/volumes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cinderclient/v1/volumes.py b/cinderclient/v1/volumes.py
index fb98418..c9c4271 100644
--- a/cinderclient/v1/volumes.py
+++ b/cinderclient/v1/volumes.py
@@ -102,7 +102,7 @@ class VolumeManager(base.ManagerWithFind):
"""
resource_class = Volume
- def create(self, size, snapshot_id=None,
+ def create(self, size, snapshot_id=None, source_volid=None,
display_name=None, display_description=None,
volume_type=None, user_id=None,
project_id=None, availability_zone=None,
@@ -121,6 +121,7 @@ class VolumeManager(base.ManagerWithFind):
:param availability_zone: Availability Zone to use
:param metadata: Optional metadata to set on volume creation
:param imageRef: reference to an image stored in glance
+ :param source_volid: ID of source volume to clone from
"""
if metadata is None:
@@ -140,6 +141,7 @@ class VolumeManager(base.ManagerWithFind):
'attach_status': "detached",
'metadata': volume_metadata,
'imageRef': imageRef,
+ 'source_volid': source_volid,
}}
return self._create('/volumes', body, 'volume')