Add the version attribute to the Client class

There is a way to get the version of the API being used. We need such
feature to work correct with different versions of the Cinder API
from third-party tools.

Change-Id: Ifde689df08644f9452138a9cd22052bc57fcb5d5
This commit is contained in:
Yuriy Nesenenko 2015-10-19 17:57:59 +03:00
parent cfecd8ebe0
commit 349eb96052
2 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,8 @@ class Client(object):
""" """
version = '1'
def __init__(self, username=None, api_key=None, project_id=None, def __init__(self, username=None, api_key=None, project_id=None,
auth_url='', insecure=False, timeout=None, tenant_id=None, auth_url='', insecure=False, timeout=None, tenant_id=None,
proxy_tenant_id=None, proxy_token=None, region_name=None, proxy_tenant_id=None, proxy_token=None, region_name=None,

View File

@ -47,6 +47,8 @@ class Client(object):
... ...
""" """
version = '2'
def __init__(self, username=None, api_key=None, project_id=None, def __init__(self, username=None, api_key=None, project_id=None,
auth_url='', insecure=False, timeout=None, tenant_id=None, auth_url='', insecure=False, timeout=None, tenant_id=None,
proxy_tenant_id=None, proxy_token=None, region_name=None, proxy_tenant_id=None, proxy_token=None, region_name=None,