Skip to content

Commit 3296781

Browse files
committed
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 c3c6edb Change-Id: If90ac705eb11dfc1e3abbe2ce18c3d8ccefdbdfb Closes-Bug: 1411179
1 parent 8dd8cdc commit 3296781

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

‎openstackclient/network/client.py‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,9 @@ def make_client(instance):
3434
API_VERSIONS)
3535
LOG.debug('Instantiating network client: %s', network_client)
3636

37-
endpoint = instance.get_endpoint_for_service_type(
38-
API_NAME,
39-
region_name=instance._region_name,
40-
)
41-
4237
return network_client(
43-
username=instance._username,
44-
tenant_name=instance._project_name,
45-
password=instance._password,
38+
session=instance.session,
4639
region_name=instance._region_name,
47-
auth_url=instance._auth_url,
48-
endpoint_url=endpoint,
49-
token=instance.auth.get_token(instance.session),
50-
insecure=instance._insecure,
51-
ca_cert=instance._cacert,
5240
)
5341

5442

0 commit comments

Comments
 (0)