summaryrefslogtreecommitdiff
path: root/novaclient/client.py
diff options
context:
space:
mode:
authorAndrey Kurilin <akurilin@mirantis.com>2016-12-02 18:40:18 +0200
committerAndrey Kurilin <akurilin@mirantis.com>2016-12-12 18:06:14 +0000
commit4ff6c617ecd09b2aafae93bf90711ecd9891d384 (patch)
tree47abdea09eda238fa963a1bbc7e73bdba023a7f5 /novaclient/client.py
parentc86a1eb3d7b39beadf868f6ed4bfeb05bdb5244f (diff)
downloadpython-novaclient-4ff6c617ecd09b2aafae93bf90711ecd9891d384.tar.gz
Restict usage *args for novaclient.client.Client
Possitional arguments doen't allow to provide proper compatibility and deprecation workflows. *args was deprecated long time ago and a proper message was added. Change-Id: Ib4a8f4db52a0f4cb8e8cf5e8c8e778eef8831e91
Diffstat (limited to 'novaclient/client.py')
-rw-r--r--novaclient/client.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/novaclient/client.py b/novaclient/client.py
index 79f36342..2e02be3f 100644
--- a/novaclient/client.py
+++ b/novaclient/client.py
@@ -808,7 +808,7 @@ def get_client_class(version):
def Client(version, username=None, api_key=None, project_id=None,
- auth_url=None, *args, **kwargs):
+ auth_url=None, **kwargs):
"""Initialize client object based on given version.
HOW-TO:
@@ -829,15 +829,9 @@ def Client(version, username=None, api_key=None, project_id=None,
session API. See "The novaclient Python API" page at
python-novaclient's doc.
"""
- if args:
- warnings.warn("Only VERSION, USERNAME, PASSWORD, PROJECT_ID and "
- "AUTH_URL arguments can be specified as positional "
- "arguments. All other variables should be keyword "
- "arguments. Note that this will become an error in "
- "Ocata.")
api_version, client_class = _get_client_class_and_version(version)
kwargs.pop("direct_use", None)
return client_class(username=username, api_key=api_key,
project_id=project_id, auth_url=auth_url,
api_version=api_version, direct_use=False,
- *args, **kwargs)
+ **kwargs)