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:
parent
8dd8cdcdfe
commit
3296781b2c
@ -34,21 +34,9 @@ def make_client(instance):
|
|||||||
API_VERSIONS)
|
API_VERSIONS)
|
||||||
LOG.debug('Instantiating network client: %s', network_client)
|
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(
|
return network_client(
|
||||||
username=instance._username,
|
session=instance.session,
|
||||||
tenant_name=instance._project_name,
|
|
||||||
password=instance._password,
|
|
||||||
region_name=instance._region_name,
|
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,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user