Full response for Database Limits & Version Client

Provide the entire response object for all methods of the
DatabaseLimitsClient and DatabaseVersionsClient.

partially implements: blueprint method-return-value-and-move-service-clients-to-lib

Change-Id: I1eca42442258d8bd33ce870b4d5878b9d7a9173b
This commit is contained in:
Anusha Ramineni 2015-08-20 11:24:06 +05:30
parent 9d23f20651
commit ae4abd1102
4 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class DatabaseLimitsTest(base.BaseDatabaseTest):
def test_absolute_limits(self):
# Test to verify if all absolute limit paramaters are
# present when verb is ABSOLUTE
limits = self.client.list_db_limits()
limits = self.client.list_db_limits()['limits']
expected_abs_limits = ['max_backups', 'max_volumes',
'max_instances', 'verb']
absolute_limit = [l for l in limits

View File

@ -27,7 +27,7 @@ class DatabaseVersionsTest(base.BaseDatabaseTest):
@test.attr(type='smoke')
@test.idempotent_id('6952cd77-90cd-4dca-bb60-8e2c797940cf')
def test_list_db_versions(self):
versions = self.client.list_db_versions()
versions = self.client.list_db_versions()['versions']
self.assertTrue(len(versions) > 0, "No database versions found")
# List of all versions should contain the current version, and there
# should only be one 'current' version

View File

@ -27,4 +27,4 @@ class DatabaseLimitsClient(service_client.ServiceClient):
url += '?%s' % urllib.urlencode(params)
resp, body = self.get(url)
self.expected_success(200, resp.status)
return service_client.ResponseBodyList(resp, self._parse_resp(body))
return service_client.ResponseBody(resp, body)

View File

@ -43,4 +43,4 @@ class DatabaseVersionsClient(service_client.ServiceClient):
resp, body = self.get(url)
self.expected_success(200, resp.status)
return service_client.ResponseBodyList(resp, self._parse_resp(body))
return service_client.ResponseBody(resp, body)