Merge "NSX|V: Fix vcns timeout exception"

This commit is contained in:
Zuul 2017-10-19 21:48:30 +00:00 committed by Gerrit Code Review
commit fb9f324039
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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")