[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
This commit is contained in:
Salvatore Orlando 2021-05-10 10:05:28 -07:00 committed by Salvatore Orlando
parent 6629cc2b93
commit 9f4e9072ce
1 changed files with 2 additions and 0 deletions

View File

@ -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: