Merge "Add return one value to volume delete methods"
diff --git a/tempest/services/volume/json/admin/volume_quotas_client.py b/tempest/services/volume/json/admin/volume_quotas_client.py
index 1a21a2c..88df69f 100644
--- a/tempest/services/volume/json/admin/volume_quotas_client.py
+++ b/tempest/services/volume/json/admin/volume_quotas_client.py
@@ -75,6 +75,7 @@
"""Delete the tenant's quota set."""
resp, body = self.delete('os-quota-sets/%s' % tenant_id)
self.expected_success(200, resp.status)
+ return service_client.ResponseBody(resp, body)
class VolumeQuotasClientJSON(BaseVolumeQuotasClientJSON):
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index 67f12d6..b3b4ae6 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -91,6 +91,7 @@
"""Deletes the Specified Volume_type."""
resp, body = self.delete("types/%s" % str(volume_id))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def list_volume_types_extra_specs(self, vol_type_id, params=None):
"""List all the volume_types extra specs created."""
@@ -130,6 +131,7 @@
resp, body = self.delete("types/%s/extra_specs/%s" % (
(str(vol_id)), str(extra_spec_name)))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def update_volume_type_extra_specs(self, vol_type_id, extra_spec_name,
extra_spec):
@@ -183,6 +185,7 @@
resp, body = self.delete(
"/types/%s/encryption/provider" % str(vol_type_id))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
class VolumeTypesClientJSON(BaseVolumeTypesClientJSON):
diff --git a/tempest/services/volume/json/qos_client.py b/tempest/services/volume/json/qos_client.py
index f14c8b4..32555eb 100644
--- a/tempest/services/volume/json/qos_client.py
+++ b/tempest/services/volume/json/qos_client.py
@@ -85,6 +85,7 @@
resp, body = self.delete(
"qos-specs/%s?force=%s" % (str(qos_id), force))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def list_qos(self):
"""List all the QoS specifications created."""
@@ -119,15 +120,17 @@
keys : it is the array of the keys to unset
"""
put_body = json.dumps({'keys': keys})
- resp, _ = self.put('qos-specs/%s/delete_keys' % qos_id, put_body)
+ resp, body = self.put('qos-specs/%s/delete_keys' % qos_id, put_body)
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def associate_qos(self, qos_id, vol_type_id):
"""Associate the specified QoS with specified volume-type."""
url = "qos-specs/%s/associate" % str(qos_id)
url += "?vol_type_id=%s" % vol_type_id
- resp, _ = self.get(url)
+ resp, body = self.get(url)
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def get_association_qos(self, qos_id):
"""Get the association of the specified QoS specification."""
@@ -141,14 +144,16 @@
"""Disassociate the specified QoS with specified volume-type."""
url = "qos-specs/%s/disassociate" % str(qos_id)
url += "?vol_type_id=%s" % vol_type_id
- resp, _ = self.get(url)
+ resp, body = self.get(url)
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def disassociate_all_qos(self, qos_id):
"""Disassociate the specified QoS with all associations."""
url = "qos-specs/%s/disassociate_all" % str(qos_id)
- resp, _ = self.get(url)
+ resp, body = self.get(url)
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
class QosSpecsClientJSON(BaseQosSpecsClientJSON):
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index a27370d..cd115df 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -123,6 +123,7 @@
"""Delete Snapshot."""
resp, body = self.delete("snapshots/%s" % str(snapshot_id))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def is_resource_deleted(self, id):
try:
@@ -195,6 +196,7 @@
url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
resp, body = self.delete(url)
self.expected_success(200, resp.status)
+ return service_client.ResponseBody(resp, body)
def force_delete_snapshot(self, snapshot_id):
"""Force Delete Snapshot."""
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index b12852f..c0f81fe 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -102,6 +102,7 @@
"""Deletes the Specified Volume."""
resp, body = self.delete("volumes/%s" % str(volume_id))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def upload_volume(self, volume_id, image_name, disk_format):
"""Uploads a volume in Glance."""
@@ -259,6 +260,7 @@
"""Delete a volume transfer."""
resp, body = self.delete("os-volume-transfer/%s" % str(transfer_id))
self.expected_success(202, resp.status)
+ return service_client.ResponseBody(resp, body)
def accept_volume_transfer(self, transfer_id, transfer_auth_key):
"""Accept a volume transfer."""
@@ -330,6 +332,7 @@
url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
resp, body = self.delete(url)
self.expected_success(200, resp.status)
+ return service_client.ResponseBody(resp, body)
class VolumesClientJSON(BaseVolumesClientJSON):