From 3296781b2c890a700507f26789d6f3cc5f126f35 Mon Sep 17 00:00:00 2001 From: Vladimir Eremin Date: Thu, 15 Jan 2015 13:11:30 +0300 Subject: [PATCH] Use session for neutron client python-openstack client is now using sessions to create clients. This patch implements creating Network client using sessions. Related to c3c6edbe8a083aef0fb6aea3cb461ff8e715fc59 Change-Id: If90ac705eb11dfc1e3abbe2ce18c3d8ccefdbdfb Closes-Bug: 1411179 --- openstackclient/network/client.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/openstackclient/network/client.py b/openstackclient/network/client.py index bb3e1b2397..858a507926 100644 --- a/openstackclient/network/client.py +++ b/openstackclient/network/client.py @@ -34,21 +34,9 @@ def make_client(instance): API_VERSIONS) LOG.debug('Instantiating network client: %s', network_client) - endpoint = instance.get_endpoint_for_service_type( - API_NAME, - region_name=instance._region_name, - ) - return network_client( - username=instance._username, - tenant_name=instance._project_name, - password=instance._password, + session=instance.session, region_name=instance._region_name, - auth_url=instance._auth_url, - endpoint_url=endpoint, - token=instance.auth.get_token(instance.session), - insecure=instance._insecure, - ca_cert=instance._cacert, )