Browse Source

[API Replay] Stop processing when security group creation fails

In this case, there is no point in processing rules. Processing
will also fail due to an unreferenced variable.

Change-Id: I1344eca7ef1667be5a66b8d63818ba5e8f43ac20
changes/52/790452/1
Salvatore Orlando 3 months ago
committed by Salvatore Orlando
parent
commit
9f4e9072ce
  1. 2
      vmware_nsx/api_replay/client.py

2
vmware_nsx/api_replay/client.py

@ -413,6 +413,8 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
except Exception as e:
self.add_error("Failed to create security group (%(sg)s): "
"%(e)s" % {'sg': sg, 'e': e})
# Don't bother going to rules
continue
# Use bulk rules creation for the rules of the SG
if not sg_rules:

Loading…
Cancel
Save