Merge "Return complete response from remaining service client"
This commit is contained in:
@@ -47,5 +47,4 @@ class FloatingIPsBulkClient(service_client.ServiceClient):
|
||||
resp, body = self.put('os-floating-ips-bulk/delete', post_body)
|
||||
body = json.loads(body)
|
||||
self.validate_response(schema.delete_floating_ips_bulk, resp, body)
|
||||
data = body['floating_ips_bulk_delete']
|
||||
return service_client.ResponseBodyData(resp, data)
|
||||
return service_client.ResponseBody(resp, body)
|
||||
|
||||
@@ -71,7 +71,8 @@ class ImageClientV2(service_client.ServiceClient):
|
||||
"-json-patch"}
|
||||
resp, body = self.patch('v2/images/%s' % image_id, data, headers)
|
||||
self.expected_success(200, resp.status)
|
||||
return service_client.ResponseBody(resp, self._parse_resp(body))
|
||||
body = json.loads(body)
|
||||
return service_client.ResponseBody(resp, body)
|
||||
|
||||
def create_image(self, name, container_format, disk_format, **kwargs):
|
||||
params = {
|
||||
|
||||
@@ -31,7 +31,8 @@ class BaseVolumeQuotasClient(service_client.ServiceClient):
|
||||
url = 'os-quota-sets/%s/defaults' % tenant_id
|
||||
resp, body = self.get(url)
|
||||
self.expected_success(200, resp.status)
|
||||
return service_client.ResponseBody(resp, self._parse_resp(body))
|
||||
body = jsonutils.loads(body)
|
||||
return service_client.ResponseBody(resp, body)
|
||||
|
||||
def show_quota_set(self, tenant_id, params=None):
|
||||
"""List the quota set for a tenant."""
|
||||
@@ -42,7 +43,8 @@ class BaseVolumeQuotasClient(service_client.ServiceClient):
|
||||
|
||||
resp, body = self.get(url)
|
||||
self.expected_success(200, resp.status)
|
||||
return service_client.ResponseBody(resp, self._parse_resp(body))
|
||||
body = jsonutils.loads(body)
|
||||
return service_client.ResponseBody(resp, body)
|
||||
|
||||
def show_quota_usage(self, tenant_id):
|
||||
"""List the quota set for a tenant."""
|
||||
@@ -66,7 +68,8 @@ class BaseVolumeQuotasClient(service_client.ServiceClient):
|
||||
post_body = jsonutils.dumps({'quota_set': post_body})
|
||||
resp, body = self.put('os-quota-sets/%s' % tenant_id, post_body)
|
||||
self.expected_success(200, resp.status)
|
||||
return service_client.ResponseBody(resp, self._parse_resp(body))
|
||||
body = jsonutils.loads(body)
|
||||
return service_client.ResponseBody(resp, body)
|
||||
|
||||
def delete_quota_set(self, tenant_id):
|
||||
"""Delete the tenant's quota set."""
|
||||
|
||||
Reference in New Issue
Block a user