summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-01-19 01:56:45 +0000
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-01-20 05:09:09 +0000
commitebd5ed69fc6034e514c738d88a7daaa6c556952b (patch)
tree73bdcec228a3ea80ee4c579d1bfabc68f99ec0ff
parent26828ccc9e371200c44df88c36a4cfc641384de8 (diff)
downloadtempest-lib-ebd5ed69fc6034e514c738d88a7daaa6c556952b.tar.gz
Make rest_client exception inheritances easy
There are rest_client own exceptions, but some of these inheritances are not reasonable. Then, tempest-lib users(like Tempest) can not know what exceptions happen when using rest_client module of tempest-lib. This patch makes them easy. Change-Id: Iba5108eb39b76153326020d2281f8f99ddf1bec6
-rw-r--r--tempest_lib/exceptions.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/tempest_lib/exceptions.py b/tempest_lib/exceptions.py
index 8907cd1..d97d158 100644
--- a/tempest_lib/exceptions.py
+++ b/tempest_lib/exceptions.py
@@ -50,10 +50,6 @@ class RestClientException(TempestException,
pass
-class RFCViolation(RestClientException):
- message = "RFC Violation"
-
-
class InvalidHttpSuccessCode(RestClientException):
message = "The success code is different than the expected one"
@@ -66,7 +62,7 @@ class Unauthorized(RestClientException):
message = 'Unauthorized'
-class TimeoutException(TempestException):
+class TimeoutException(RestClientException):
message = "Request timed out"
@@ -98,12 +94,12 @@ class Conflict(RestClientException):
message = "An object with that identifier already exists"
-class ResponseWithNonEmptyBody(RFCViolation):
+class ResponseWithNonEmptyBody(RestClientException):
message = ("RFC Violation! Response with %(status)d HTTP Status Code "
"MUST NOT have a body")
-class ResponseWithEntity(RFCViolation):
+class ResponseWithEntity(RestClientException):
message = ("RFC Violation! Response with 205 HTTP Status Code "
"MUST NOT have an entity")