diff options
| author | Cao Shufeng <caosf.fnst@cn.fujitsu.com> | 2016-08-30 07:38:14 -0400 |
|---|---|---|
| committer | Cao Shufeng <caosf.fnst@cn.fujitsu.com> | 2016-08-30 08:27:12 -0400 |
| commit | 654f71208b3a270df0c7c9d66e2f90d3ecc4c162 (patch) | |
| tree | 026c5edc8cd35fad61e9166fd17a1684450209ab /cinderclient/v3/volume_backups.py | |
| parent | 4f794410f1912090b85ec6332ea82feca8b60634 (diff) | |
| download | python-cinderclient-654f71208b3a270df0c7c9d66e2f90d3ecc4c162.tar.gz | |
Wrap volume_backup's update function with api_version
Volume backup's update function only supports 3.9 microversion
or higher. So it should be wrapped like like this one[1],
otherwise these fuctions may be exposed to lib users with old
microversion.
[1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/services.py#L82
Change-Id: I2c800099e8ae707135417f9821f14d1a9e69586e
Diffstat (limited to 'cinderclient/v3/volume_backups.py')
| -rw-r--r-- | cinderclient/v3/volume_backups.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cinderclient/v3/volume_backups.py b/cinderclient/v3/volume_backups.py index 9a5aa5c..5698789 100644 --- a/cinderclient/v3/volume_backups.py +++ b/cinderclient/v3/volume_backups.py @@ -16,6 +16,7 @@ """ Volume Backups interface (v3 extension). """ +from cinderclient import api_versions from cinderclient import base from cinderclient.openstack.common.apiclient import base as common_base @@ -131,6 +132,7 @@ class VolumeBackupManager(base.ManagerWithFind): resp, body = self.api.client.post("/backups/import_record", body=body) return common_base.DictWithMeta(body['backup'], resp) + @api_versions.wraps("3.9") def update(self, backup, **kwargs): """Update the name or description for a backup. |
