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
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user