diff --git a/cinderclient/v3/attachments.py b/cinderclient/v3/attachments.py index aaa8bcf2f..e18bf9842 100644 --- a/cinderclient/v3/attachments.py +++ b/cinderclient/v3/attachments.py @@ -26,6 +26,7 @@ class VolumeAttachment(base.Resource): class VolumeAttachmentManager(base.ManagerWithFind): resource_class = VolumeAttachment + @api_versions.wraps('3.27') def create(self, volume_id, connector, instance_id): """Create a attachment for specified volume.""" body = {'attachment': {'volume_uuid': volume_id, @@ -34,10 +35,12 @@ class VolumeAttachmentManager(base.ManagerWithFind): retval = self._create('/attachments', body, 'attachment') return retval.to_dict() + @api_versions.wraps('3.27') def delete(self, attachment): """Delete an attachment by ID.""" return self._delete("/attachments/%s" % base.getid(attachment)) + @api_versions.wraps('3.27') def list(self, detailed=False, search_opts=None, marker=None, limit=None, sort_key=None, sort_dir=None, sort=None): """List all attachments.""" @@ -51,6 +54,7 @@ class VolumeAttachmentManager(base.ManagerWithFind): sort_dir=sort_dir, sort=sort) return self._list(url, resource_type, limit=limit) + @api_versions.wraps('3.27') def show(self, id): """Attachment show. @@ -61,6 +65,7 @@ class VolumeAttachmentManager(base.ManagerWithFind): return self.resource_class(self, body['attachment'], loaded=True, resp=resp) + @api_versions.wraps('3.27') def update(self, id, connector): """Attachment update.""" body = {'attachment': {'connector': connector}} diff --git a/cinderclient/v3/group_snapshots.py b/cinderclient/v3/group_snapshots.py index 741149d70..ed7fe7924 100644 --- a/cinderclient/v3/group_snapshots.py +++ b/cinderclient/v3/group_snapshots.py @@ -44,6 +44,7 @@ class GroupSnapshotManager(base.ManagerWithFind): """Manage :class:`GroupSnapshot` resources.""" resource_class = GroupSnapshot + @api_versions.wraps('3.14') def create(self, group_id, name=None, description=None, user_id=None, project_id=None): @@ -67,6 +68,7 @@ class GroupSnapshotManager(base.ManagerWithFind): return self._create('/group_snapshots', body, 'group_snapshot') + @api_versions.wraps('3.14') def get(self, group_snapshot_id): """Get a group snapshot. @@ -86,6 +88,7 @@ class GroupSnapshotManager(base.ManagerWithFind): body = {'status': state} if state else {} return self._action('reset_status', group_snapshot, body) + @api_versions.wraps('3.14') def list(self, detailed=True, search_opts=None): """Lists all group snapshots. @@ -102,6 +105,7 @@ class GroupSnapshotManager(base.ManagerWithFind): return self._list("/group_snapshots%s%s" % (detail, query_string), "group_snapshots") + @api_versions.wraps('3.14') def delete(self, group_snapshot): """Delete a group_snapshot. @@ -109,6 +113,7 @@ class GroupSnapshotManager(base.ManagerWithFind): """ return self._delete("/group_snapshots/%s" % base.getid(group_snapshot)) + @api_versions.wraps('3.14') def update(self, group_snapshot, **kwargs): """Update the name or description for a group_snapshot. diff --git a/cinderclient/v3/volumes.py b/cinderclient/v3/volumes.py index 0cee48bf4..a8c2e49f9 100644 --- a/cinderclient/v3/volumes.py +++ b/cinderclient/v3/volumes.py @@ -151,6 +151,7 @@ class VolumeManager(volumes.VolumeManager): return self._action('revert', volume, info={'snapshot_id': base.getid(snapshot.id)}) + @api_versions.wraps('3.12') def summary(self, all_tenants): """Get volumes summary.""" url = "/volumes/summary" diff --git a/cinderclient/v3/workers.py b/cinderclient/v3/workers.py index 86f895dc8..3794ee921 100644 --- a/cinderclient/v3/workers.py +++ b/cinderclient/v3/workers.py @@ -16,6 +16,7 @@ """ Interface to workers API """ +from cinderclient import api_versions from cinderclient.apiclient import base as common_base from cinderclient import base @@ -33,6 +34,7 @@ class Service(base.Resource): class WorkerManager(base.Manager): base_url = '/workers' + @api_versions.wraps('3.24') def clean(self, **filters): url = self.base_url + '/cleanup' resp, body = self.api.client.post(url, body=filters)