Merge "NSX|V: Fix vcns timeout exception"
This commit is contained in:
commit
fb9f324039
@ -144,7 +144,7 @@ class VcnsApiHelper(object):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=self.timeout)
|
timeout=self.timeout)
|
||||||
except requests.exceptions.Timeout:
|
except requests.exceptions.Timeout:
|
||||||
raise exceptions.VcnsApiException(uri=uri)
|
raise exceptions.ResourceTimedOut(uri=uri)
|
||||||
|
|
||||||
status = response.status_code
|
status = response.status_code
|
||||||
|
|
||||||
|
@ -62,6 +62,10 @@ class ResourceNotFound(VcnsApiException):
|
|||||||
message = _("Resource %(uri)s not found")
|
message = _("Resource %(uri)s not found")
|
||||||
|
|
||||||
|
|
||||||
|
class ResourceTimedOut(VcnsApiException):
|
||||||
|
message = _("Resource %(uri)s timed out")
|
||||||
|
|
||||||
|
|
||||||
class MediaTypeUnsupport(VcnsApiException):
|
class MediaTypeUnsupport(VcnsApiException):
|
||||||
message = _("Media Type %(uri)s is not supported")
|
message = _("Media Type %(uri)s is not supported")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user