diff options
author | j-griffith <john.griffith8@gmail.com> | 2017-09-09 18:03:08 +0000 |
---|---|---|
committer | j-griffith <john.griffith8@gmail.com> | 2017-09-09 18:17:01 +0000 |
commit | da20fbf45bd094dae2b6a8869d0b5fd4b29b322b (patch) | |
tree | 63ba7ed8721a9c24a9ba793433d0220b72023ffe /cinderclient/v3/attachments.py | |
parent | f447b07490e36b513b70c557ae0a8327c2b109df (diff) | |
download | python-cinderclient-da20fbf45bd094dae2b6a8869d0b5fd4b29b322b.tar.gz |
Add api_version_wraps to attachment-complete
The attachment-complete method didn't include the version
checking. This patch adds that and adds a couple of tests.
Change-Id: I63dba6ee6d56bb63a79f3ad2ef3412ebd9c1ce07
Closes-Bug: #1715732
Diffstat (limited to 'cinderclient/v3/attachments.py')
-rw-r--r-- | cinderclient/v3/attachments.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cinderclient/v3/attachments.py b/cinderclient/v3/attachments.py index 6146626..aaa8bcf 100644 --- a/cinderclient/v3/attachments.py +++ b/cinderclient/v3/attachments.py @@ -12,6 +12,7 @@ """Attachment interface.""" +from cinderclient import api_versions from cinderclient import base @@ -64,9 +65,12 @@ class VolumeAttachmentManager(base.ManagerWithFind): """Attachment update.""" body = {'attachment': {'connector': connector}} resp = self._update('/attachments/%s' % id, body) + # NOTE(jdg): This kinda sucks, + # create returns a dict, but update returns an object :( return self.resource_class(self, resp['attachment'], loaded=True, resp=resp) + @api_versions.wraps('3.44') def complete(self, attachment): """Mark the attachment as completed.""" resp, body = self._action_return_resp_and_body('os-complete', |