Merge "Full response for VolumeHostsClient methods"
This commit is contained in:
@@ -21,7 +21,7 @@ class VolumeHostsAdminV2TestsJSON(base.BaseVolumeAdminTest):
|
||||
|
||||
@test.idempotent_id('d5f3efa2-6684-4190-9ced-1c2f526352ad')
|
||||
def test_list_hosts(self):
|
||||
hosts = self.hosts_client.list_hosts()
|
||||
hosts = self.hosts_client.list_hosts()['hosts']
|
||||
self.assertTrue(len(hosts) >= 2, "No. of hosts are < 2,"
|
||||
"response of list hosts is: % s" % hosts)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class BaseVolumeHostsClient(service_client.ServiceClient):
|
||||
resp, body = self.get(url)
|
||||
body = json.loads(body)
|
||||
self.expected_success(200, resp.status)
|
||||
return service_client.ResponseBodyList(resp, body['hosts'])
|
||||
return service_client.ResponseBody(resp, body)
|
||||
|
||||
|
||||
class VolumeHostsClient(BaseVolumeHostsClient):
|
||||
|
||||
Reference in New Issue
Block a user