Merge "Add Available params in volume backup and snapshot clients"
diff --git a/tempest/services/volume/base/base_backups_client.py b/tempest/services/volume/base/base_backups_client.py
index 780da7b..3842d66 100644
--- a/tempest/services/volume/base/base_backups_client.py
+++ b/tempest/services/volume/base/base_backups_client.py
@@ -26,7 +26,11 @@
"""Client class to send CRUD Volume backup API requests"""
def create_backup(self, **kwargs):
- """Creates a backup of volume."""
+ """Creates a backup of volume.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-blockstorage-v2.html#createBackup
+ """
post_body = json.dumps({'backup': kwargs})
resp, body = self.post('backups', post_body)
body = json.loads(body)
@@ -34,7 +38,11 @@
return rest_client.ResponseBody(resp, body)
def restore_backup(self, backup_id, **kwargs):
- """Restore volume from backup."""
+ """Restore volume from backup.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-blockstorage-v2.html#restoreBackup
+ """
post_body = json.dumps({'restore': kwargs})
resp, body = self.post('backups/%s/restore' % (backup_id), post_body)
body = json.loads(body)
diff --git a/tempest/services/volume/base/base_snapshots_client.py b/tempest/services/volume/base/base_snapshots_client.py
index 68503dd..da7bb01 100644
--- a/tempest/services/volume/base/base_snapshots_client.py
+++ b/tempest/services/volume/base/base_snapshots_client.py
@@ -60,7 +60,11 @@
return rest_client.ResponseBody(resp, body)
def update_snapshot(self, snapshot_id, **kwargs):
- """Updates a snapshot."""
+ """Updates a snapshot.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-blockstorage-v2.html#updateSnapshot
+ """
put_body = json.dumps({'snapshot': kwargs})
resp, body = self.put('snapshots/%s' % snapshot_id, put_body)
body = json.loads(body)
@@ -123,11 +127,11 @@
return rest_client.ResponseBody(resp, body)
def update_snapshot_metadata(self, snapshot_id, **kwargs):
- """Update metadata for the snapshot."""
- # TODO(piyush): Current api-site doesn't contain this API description.
- # After fixing the api-site, we need to fix here also for putting the
- # link to api-site.
- # LP: https://bugs.launchpad.net/openstack-api-site/+bug/1529063
+ """Update metadata for the snapshot.
+
+ Available params: see http://developer.openstack.org/
+ api-ref-blockstorage-v2.html#updateSnapshotMetadata
+ """
put_body = json.dumps(kwargs)
url = "snapshots/%s/metadata" % str(snapshot_id)
resp, body = self.put(url, put_body)