diff --git a/vmware_nsx/plugins/nsx_v/vshield/common/VcnsApiClient.py b/vmware_nsx/plugins/nsx_v/vshield/common/VcnsApiClient.py index 53bbb8e6e3..b68ec1b945 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/common/VcnsApiClient.py +++ b/vmware_nsx/plugins/nsx_v/vshield/common/VcnsApiClient.py @@ -144,7 +144,7 @@ class VcnsApiHelper(object): headers=headers, timeout=self.timeout) except requests.exceptions.Timeout: - raise exceptions.VcnsApiException(uri=uri) + raise exceptions.ResourceTimedOut(uri=uri) status = response.status_code diff --git a/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py b/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py index 397d507a55..26a77b8761 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py +++ b/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py @@ -62,6 +62,10 @@ class ResourceNotFound(VcnsApiException): message = _("Resource %(uri)s not found") +class ResourceTimedOut(VcnsApiException): + message = _("Resource %(uri)s timed out") + + class MediaTypeUnsupport(VcnsApiException): message = _("Media Type %(uri)s is not supported")