Merge "API test for get-me-network"

This commit is contained in:
Jenkins 2016-02-24 05:18:54 +00:00 committed by Gerrit Code Review
commit c7457ee192
1 changed files with 10 additions and 1 deletions

View File

@ -194,8 +194,10 @@ class NetworkClientJSON(service_client.ServiceClient):
self.expected_success(204, resp.status)
return service_client.ResponseBody(resp, body)
def list_subnetpools(self):
def list_subnetpools(self, **filters):
uri = self.get_uri("subnetpools")
if filters:
uri = '?'.join([uri, urlparse.urlencode(filters)])
resp, body = self.get(uri)
body = {'subnetpools': self.deserialize_list(body)}
self.expected_success(200, resp.status)
@ -717,3 +719,10 @@ class NetworkClientJSON(service_client.ServiceClient):
self.expected_success(200, resp.status)
body = json.loads(body)
return service_client.ResponseBody(resp, body)
def get_auto_allocated_topology(self, tenant_id=None):
uri = '%s/auto-allocated-topology/%s' % (self.uri_prefix, tenant_id)
resp, body = self.get(uri)
self.expected_success(200, resp.status)
body = json.loads(body)
return service_client.ResponseBody(resp, body)