Backport connect_as fix from openstacksdk
The connect_as method tried overlaying things directly on top of the 'defaults' cloud config, but things get all messed up and it's actually never what you want. Instead, pull the existing CloudRegion from the local config object and pass it in. Change-Id: I54593bd8f6dd2124df854e923456c390e0d6a147
This commit is contained in:
parent
3c3132285f
commit
94c1ac842d
|
@ -321,6 +321,9 @@ class OpenStackCloud(
|
|||
that do not want to be overridden can be ommitted.
|
||||
"""
|
||||
|
||||
if self.cloud_config._openstack_config:
|
||||
config = self.cloud_config._openstack_config
|
||||
else:
|
||||
config = os_client_config.OpenStackConfig(
|
||||
app_name=self.cloud_config._app_name,
|
||||
app_version=self.cloud_config._app_version,
|
||||
|
@ -362,9 +365,7 @@ class OpenStackCloud(
|
|||
# Constructor, otherwise the new auth plugin doesn't get used.
|
||||
return keystoneauth1.session.Session(session=self.keystone_session)
|
||||
|
||||
# Use cloud='defaults' so that we overlay settings properly
|
||||
cloud_config = config.get_one_cloud(
|
||||
cloud='defaults',
|
||||
session_constructor=session_constructor,
|
||||
**params)
|
||||
# Override the cloud name so that logging/location work right
|
||||
|
|
Loading…
Reference in New Issue