summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-01-29 01:37:32 +0000
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-01-29 01:45:14 +0000
commitd817a030e21cc5ac2d25d13676c2f07be058681c (patch)
treedd0bcd6316dffbe99a5a691c52f7afbec746c770
parentffd91e2111435268fef7f45af689357925ac453f (diff)
downloadtempest-lib-d817a030e21cc5ac2d25d13676c2f07be058681c.tar.gz
Move api_version to a class value
Volume v2 service clients pass api_version in __init__() now, but Iddd8306723c1ff33105f513c1993a0497a949c29 will move the passed api_version to class values for avoiding a redundant __init__() definition. For doing this, we need to move api_version to class value to avoid initializing it in RestClient __init__(). Change-Id: Ic86739dde83dcac8f68e53599967de53694f692f
-rw-r--r--tempest_lib/common/rest_client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tempest_lib/common/rest_client.py b/tempest_lib/common/rest_client.py
index 683efa5..c5353ad 100644
--- a/tempest_lib/common/rest_client.py
+++ b/tempest_lib/common/rest_client.py
@@ -39,6 +39,9 @@ class RestClient(object):
TYPE = "json"
+ # The version of the API this client implements
+ api_version = None
+
LOG = logging.getLogger(__name__)
def __init__(self, auth_provider, service, region,
@@ -54,8 +57,6 @@ class RestClient(object):
self.build_timeout = build_timeout
self.trace_requests = trace_requests
- # The version of the API this client implements
- self.api_version = None
self._skip_path = False
self.general_header_lc = set(('cache-control', 'connection',
'date', 'pragma', 'trailer',