From dd31fc9126cd60927ff8f77300b7845d9ca2da23 Mon Sep 17 00:00:00 2001 From: ank Date: Thu, 6 Oct 2016 19:34:26 +0530 Subject: [PATCH] member create: handling SubnetNotFound exception ignoring stitching subnets by catching exception while associating fixed ip with corresponding subnet id Change-Id: Ieccecc41b2608102c201f48fcd1c831db19882a6 --- gbpui/panels/policytargets/workflows.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gbpui/panels/policytargets/workflows.py b/gbpui/panels/policytargets/workflows.py index e18e56f..0088b35 100644 --- a/gbpui/panels/policytargets/workflows.py +++ b/gbpui/panels/policytargets/workflows.py @@ -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'] = [