Add exception for deleting an object in use
Change-Id: I636fda84ac8d273d83f6682fd7adb472ac0ae0ba
This commit is contained in:
parent
468c3effba
commit
00167c1cb1
@ -37,7 +37,8 @@ def http_error_to_exception(status_code, error_code):
|
||||
requests.codes.BAD_REQUEST:
|
||||
{'60508': exceptions.NsxIndexingInProgress,
|
||||
'60514': exceptions.NsxSearchTimeout,
|
||||
'500045': exceptions.NsxPendingDelete},
|
||||
'500045': exceptions.NsxPendingDelete,
|
||||
'500030': exceptions.ResourceInUse},
|
||||
requests.codes.CONFLICT: exceptions.StaleRevision,
|
||||
requests.codes.PRECONDITION_FAILED: exceptions.StaleRevision,
|
||||
requests.codes.INTERNAL_SERVER_ERROR:
|
||||
|
@ -196,4 +196,9 @@ class NsxPendingDelete(NsxLibException):
|
||||
|
||||
|
||||
class APITransactionAborted(ServerBusy):
|
||||
message = _("API transaction aborted as MP cluster is reconfiguring.")
|
||||
message = _("API transaction aborted as MP cluster is reconfiguring")
|
||||
|
||||
|
||||
class ResourceInUse(ManagerError):
|
||||
message = _("The object cannot be deleted as either it has children or it "
|
||||
"is being referenced by other objects")
|
||||
|
Loading…
Reference in New Issue
Block a user