Skip to content

Commit 8c6b5a0

Browse files
committed
Initialize neutron client with region name
All clients except neutron are initialized with region name. This makes unable to use network related commands of openstackclient in multi-region configurations Change-Id: I200dc9a2f938c3e69357f91c79810df167e4fccb Closes-bug: 1570491
1 parent 83fbce4 commit 8c6b5a0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

openstackclient/network/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import logging
1515

1616
from openstack import connection
17+
from openstack import profile
1718

1819
from openstackclient.common import utils
1920

@@ -31,8 +32,11 @@
3132

3233
def make_client(instance):
3334
"""Returns a network proxy"""
35+
prof = profile.Profile()
36+
prof.set_region(API_NAME, instance._region_name)
37+
prof.set_version(API_NAME, instance._api_version[API_NAME])
3438
conn = connection.Connection(authenticator=instance.session.auth,
35-
verify=instance.session.verify)
39+
verify=instance.session.verify, profile=prof)
3640
LOG.debug('Connection: %s', conn)
3741
LOG.debug('Network client initialized using OpenStack SDK: %s',
3842
conn.network)

0 commit comments

Comments
 (0)