Merge "Throw an exception in case of exceeding quota."
This commit is contained in:
commit
20e35d13bf
|
@ -186,6 +186,11 @@ def create_security_group_rule(body):
|
|||
sgr = os_net.create_security_group_rule(**params)
|
||||
return sgr.id
|
||||
except os_exc.ConflictException as ex:
|
||||
if 'quota' in ex.details.lower():
|
||||
LOG.error("Failed to create security group rule %s: %s", body,
|
||||
ex.details)
|
||||
raise
|
||||
else:
|
||||
LOG.debug("Failed to create already existing security group "
|
||||
"rule %s", body)
|
||||
# Get existent sg rule id from exception message
|
||||
|
|
Loading…
Reference in New Issue