diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-07-26 17:05:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-07-26 17:05:52 +0000 |
commit | 18381fb872e7280539e2b41ea2673bd230c89518 (patch) | |
tree | dd8cd037b51fb736964c09ace07fdf7c47f9954d | |
parent | c73828c5cede28488d68eadf06d2e4f0454495d9 (diff) | |
parent | 4760157375819d689a9f3dc5c1e69e48ba23e546 (diff) | |
download | python-cinderclient-18381fb872e7280539e2b41ea2673bd230c89518.tar.gz |
Merge "python-cinderclient doc unclear on Volume.attach"
-rw-r--r-- | cinderclient/v2/volumes.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/cinderclient/v2/volumes.py b/cinderclient/v2/volumes.py index 02b86ee..b4e950b 100644 --- a/cinderclient/v2/volumes.py +++ b/cinderclient/v2/volumes.py @@ -33,7 +33,17 @@ class Volume(base.Resource): return self.manager.update(self, **kwargs) def attach(self, instance_uuid, mountpoint, mode='rw', host_name=None): - """Set attachment metadata. + """Inform Cinder that the given volume is attached to the given instance. + + Calling this method will not actually ask Cinder to attach + a volume, but to mark it on the DB as attached. If the volume + is not actually attached to the given instance, inconsistent + data will result. + + The right flow of calls is : + 1- call reserve + 2- call initialize_connection + 3- call attach :param instance_uuid: uuid of the attaching instance. :param mountpoint: mountpoint on the attaching instance or host. @@ -44,7 +54,18 @@ class Volume(base.Resource): host_name) def detach(self): - """Clear attachment metadata.""" + """Inform Cinder that the given volume is detached from the given instance. + + Calling this method will not actually ask Cinder to detach + a volume, but to mark it on the DB as detached. If the volume + is not actually detached from the given instance, inconsistent + data will result. + + The right flow of calls is : + 1- call reserve + 2- call initialize_connection + 3- call detach + """ return self.manager.detach(self) def reserve(self, volume): |