summaryrefslogtreecommitdiff
path: root/novaclient/client.py
diff options
context:
space:
mode:
authorAndrey Kurilin <akurilin@mirantis.com>2016-12-02 19:23:41 +0200
committerAndrey Kurilin <andr.kurilin@gmail.com>2016-12-15 19:49:03 +0200
commit1ce917ef255696424ad299d0c611f7cf8bf137ab (patch)
treee3cfdf42adc26ee4b4aeb655e06909facc66cbd2 /novaclient/client.py
parent73196fd3c1b938386cc162969a03a9bf1286b03d (diff)
downloadpython-novaclient-1ce917ef255696424ad299d0c611f7cf8bf137ab.tar.gz
Rename bypass_url to endpoint_override
* there are two terms in openstack which describes the same thing: bypass_url and endpoint_override * endpoint_override is more wide term. It is used in Keystone) * since not all openstack folks knows that bypass_url and endpoint_override are the same, bypass_url (variable which was used in novaclient) was not transmitted to SessionClient NOTE: name of variable in inner class HTTPClient was not changed, since this class will be abandoned soon. Change-Id: I2d45820c01851b271de8ea66e0d59ec494040c04
Diffstat (limited to 'novaclient/client.py')
-rw-r--r--novaclient/client.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/novaclient/client.py b/novaclient/client.py
index c5590e7c..6897fe33 100644
--- a/novaclient/client.py
+++ b/novaclient/client.py
@@ -684,9 +684,9 @@ def _construct_http_client(api_version=None,
auth=None,
auth_token=None,
auth_url=None,
- bypass_url=None,
cacert=None,
connection_pool=False,
+ endpoint_override=None,
endpoint_type='publicURL',
http_log_debug=False,
insecure=False,
@@ -711,15 +711,16 @@ def _construct_http_client(api_version=None,
# TODO(mordred): If not session, just make a Session, then return
# SessionClient always
if session:
- return SessionClient(session=session,
+ return SessionClient(api_version=api_version,
auth=auth,
+ endpoint_override=endpoint_override,
interface=interface or endpoint_type,
- service_type=service_type,
region_name=region_name,
service_name=service_name,
- user_agent=user_agent,
+ service_type=service_type,
+ session=session,
timings=timings,
- api_version=api_version,
+ user_agent=user_agent,
**kwargs)
else:
# FIXME(jamielennox): username and password are now optional. Need
@@ -742,7 +743,7 @@ def _construct_http_client(api_version=None,
service_name=service_name,
volume_service_name=volume_service_name,
timings=timings,
- bypass_url=bypass_url,
+ bypass_url=endpoint_override,
os_cache=os_cache,
http_log_debug=http_log_debug,
cacert=cacert,
@@ -879,6 +880,7 @@ def Client(version, username=None, api_key=None, project_id=None,
# os_cache is not a fully compatible with no_cache, so we need to
# apply this custom processing
kwargs["os_cache"] = not kwargs["os_cache"]
+ _check_arguments(kwargs, "Ocata", "bypass_url", "endpoint_override")
api_version, client_class = _get_client_class_and_version(version)
kwargs.pop("direct_use", None)