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 c3c6edbe8a

Change-Id: If90ac705eb11dfc1e3abbe2ce18c3d8ccefdbdfb
Closes-Bug: 1411179
This commit is contained in:
Vladimir Eremin 2015-01-15 13:11:30 +03:00
parent 8dd8cdcdfe
commit 3296781b2c

View File

@ -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,
)