diff --git a/vmware_nsxlib/v3/client.py b/vmware_nsxlib/v3/client.py index 3f18c700..85443d4c 100644 --- a/vmware_nsxlib/v3/client.py +++ b/vmware_nsxlib/v3/client.py @@ -37,6 +37,7 @@ def http_error_to_exception(status_code, error_code): requests.codes.BAD_REQUEST: {'60508': exceptions.NsxIndexingInProgress, '60514': exceptions.NsxSearchTimeout, + '8327': exceptions.NsxOverlapVlan, '500045': exceptions.NsxPendingDelete, '500030': exceptions.ResourceInUse, '500105': exceptions.NsxOverlapAddresses, diff --git a/vmware_nsxlib/v3/exceptions.py b/vmware_nsxlib/v3/exceptions.py index 4fe0cab4..085f83ad 100644 --- a/vmware_nsxlib/v3/exceptions.py +++ b/vmware_nsxlib/v3/exceptions.py @@ -211,6 +211,11 @@ class NsxOverlapAddresses(NsxLibInvalidInput): message = _("Overlapping addresses found: %(details)s") +class NsxOverlapVlan(NsxLibInvalidInput): + message = _("Duplicate logical-switch vlan-ids sharing same underlying " + "physical devices resulting in a conflict") + + class APITransactionAborted(ServerBusy): message = _("API transaction aborted as MP cluster is reconfiguring")