diff --git a/vmware_nsxlib/v3/client.py b/vmware_nsxlib/v3/client.py index 2e3fb4d8..de158c19 100644 --- a/vmware_nsxlib/v3/client.py +++ b/vmware_nsxlib/v3/client.py @@ -111,7 +111,8 @@ def http_error_to_exception(status_code, error_code, related_error_codes=None): '500105': exceptions.NsxOverlapAddresses, '500232': exceptions.StaleRevision, # Missing dependent objects '503040': exceptions.NsxSegemntWithVM, - '100148': exceptions.StaleRevision}, + '100148': exceptions.StaleRevision, + '500012': exceptions.NsxInvalidPath}, requests.codes.CONFLICT: exceptions.StaleRevision, requests.codes.PRECONDITION_FAILED: exceptions.StaleRevision, requests.codes.INTERNAL_SERVER_ERROR: diff --git a/vmware_nsxlib/v3/exceptions.py b/vmware_nsxlib/v3/exceptions.py index 095d369c..922d2e48 100644 --- a/vmware_nsxlib/v3/exceptions.py +++ b/vmware_nsxlib/v3/exceptions.py @@ -217,6 +217,10 @@ class NsxPendingDelete(NsxLibException): "remove the deleted object") +class NsxInvalidPath(ManagerError): + message = _("Invalid path found: %(details)s") + + class NsxSegemntWithVM(ManagerError): message = _("Cannot delete segment as it still has VMs or VIFs attached")