Browse Source

member create: handling SubnetNotFound exception

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

Change-Id: Ieccecc41b2608102c201f48fcd1c831db19882a6
ank 2 years ago
parent
commit
dd31fc9126
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      gbpui/panels/policytargets/workflows.py

+ 5
- 1
gbpui/panels/policytargets/workflows.py View File

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

Loading…
Cancel
Save