Merge "Ensure endpoint type is used for network commands" into stable/mitaka
This commit is contained in:
commit
92e0a117f1
|
@ -14,6 +14,7 @@
|
|||
import logging
|
||||
|
||||
from openstack import connection
|
||||
from openstack import profile
|
||||
|
||||
from openstackclient.common import utils
|
||||
|
||||
|
@ -31,8 +32,13 @@ API_VERSIONS = {
|
|||
|
||||
def make_client(instance):
|
||||
"""Returns a network proxy"""
|
||||
prof = profile.Profile()
|
||||
prof.set_region(API_NAME, instance._region_name)
|
||||
prof.set_version(API_NAME, instance._api_version[API_NAME])
|
||||
prof.set_interface(API_NAME, instance._interface)
|
||||
conn = connection.Connection(authenticator=instance.session.auth,
|
||||
verify=instance.session.verify)
|
||||
verify=instance.session.verify,
|
||||
profile=prof)
|
||||
LOG.debug('Connection: %s', conn)
|
||||
LOG.debug('Network client initialized using OpenStack SDK: %s',
|
||||
conn.network)
|
||||
|
|
Loading…
Reference in New Issue