Removes listing of inaccessible subnets
- Related-Bug: 1709249 - Basicaly implementing @Aloga's suggestion Change-Id: I22fd07025300127d411803d4ea0351eb09c1ce64
This commit is contained in:
parent
8f3a0de485
commit
4d33c21399
|
@ -283,11 +283,14 @@ class OpenStackNeutron(helpers.BaseHelper):
|
|||
net = self.get_from_response(response, "network", {})
|
||||
# subnet
|
||||
if "subnets" in net:
|
||||
path = "/subnets/%s" % net["subnets"][0]
|
||||
req_subnet = self._make_get_request(req, path)
|
||||
response_subnet = req_subnet.get_response()
|
||||
net["subnet_info"] = self.get_from_response(
|
||||
response_subnet, "subnet", {})
|
||||
try:
|
||||
path = "/subnets/%s" % net["subnets"][0]
|
||||
req_subnet = self._make_get_request(req, path)
|
||||
response_subnet = req_subnet.get_response()
|
||||
net["subnet_info"] = self.get_from_response(
|
||||
response_subnet, "subnet", {})
|
||||
except Exception:
|
||||
raise exception.ResourceNotFound()
|
||||
|
||||
ooi_networks = self._build_networks([net])
|
||||
|
||||
|
|
Loading…
Reference in New Issue