member create: handling SubnetNotFound exception

ignoring stitching subnets by catching exception
while associating fixed ip with corresponding
subnet id

Change-Id: Ieccecc41b2608102c201f48fcd1c831db19882a6
This commit is contained in:
ank 2016-10-06 19:34:26 +05:30
parent 72d30c8265
commit dd31fc9126
1 changed files with 5 additions and 1 deletions

View File

@ -582,7 +582,11 @@ class LaunchInstance(workflows.Workflow):
ptg = client.policy_target_get(request, ptg_id)
fixed_ip = values[2]
for subnet_id in ptg.subnets:
subnet = api.neutron.subnet_get(request, subnet_id)
try:
subnet = api.neutron.subnet_get(
request, subnet_id)
except Exception:
continue
if IPAddress(fixed_ip) in \
IPNetwork(subnet['cidr']):
args['fixed_ips'] = [