Add _error_checker() call on versions_client
There are two REST API operation methods (request and raw_request)
under tempest.lib and most service clients use request().
request() calls _error_checker() for translating HTTP error code to
the corresponding exception, however raw_request() doesn't do that
because of the raw method.
When an exception happens on service client methods which calls
raw_request(), now Tempest cannot translated and it makes some
unexpected situation like I6c05ad377847e2b67ab988efdba006f73cbafcfe
This patch adds _error_checker() call to them.
Change-Id: I9acf45eb1711683b47f0606ed7c1a9c8327ef241
diff --git a/tempest/lib/services/compute/versions_client.py b/tempest/lib/services/compute/versions_client.py
index eb4e7e9..b2052c3 100644
--- a/tempest/lib/services/compute/versions_client.py
+++ b/tempest/lib/services/compute/versions_client.py
@@ -40,6 +40,7 @@
def list_versions(self):
version_url = self._get_base_version_url()
resp, body = self.raw_request(version_url, 'GET')
+ self._error_checker(resp, body)
body = json.loads(body)
self.validate_response(schema.list_versions, resp, body)
return rest_client.ResponseBody(resp, body)
@@ -56,6 +57,7 @@
# we need a token for this request
resp, body = self.raw_request(version_url, 'GET',
{'X-Auth-Token': self.token})
+ self._error_checker(resp, body)
body = json.loads(body)
self.validate_response(schema.get_one_version, resp, body)
return rest_client.ResponseBody(resp, body)