summaryrefslogtreecommitdiff
path: root/openstackclient/volume/client.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2020-03-24 07:23:00 -0500
committerMonty Taylor <mordred@inaugust.com>2020-03-24 07:29:35 -0500
commitcdac869412a48ba0e33542ff7859bcc5ccc0544e (patch)
tree01876616c4dbffd15a0e1d27a532a0b7e49bd6f2 /openstackclient/volume/client.py
parentfc12033f1da53fe11f930dd405eae5e2bf814621 (diff)
downloadpython-openstackclient-cdac869412a48ba0e33542ff7859bcc5ccc0544e.tar.gz
Honor endpoint override from config for volume
I'm guessing we should do this for everyone, but we have volume on the brain right now. Rackspace is in the weird situation where they do support v2 but only have v1 in the catalog (wut) So we need to override the block-storage enpdoint by config. To do that, we need to actually honor the config setting over here in OSC. NOTE: We need to systemically overhaul how we're injesting config over here - because there's too much variation. But we can leave that for another day. Story: 2007459 Task: 39137 Change-Id: Ifddf1ddd5abaa768ab18049c09d18bc269f3a4f5
Diffstat (limited to 'openstackclient/volume/client.py')
-rw-r--r--openstackclient/volume/client.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/openstackclient/volume/client.py b/openstackclient/volume/client.py
index fdd1794b..1fbfaaee 100644
--- a/openstackclient/volume/client.py
+++ b/openstackclient/volume/client.py
@@ -67,11 +67,15 @@ def make_client(instance):
# Remember interface only if it is set
kwargs = utils.build_kwargs_dict('endpoint_type', instance.interface)
+ endpoint_override = instance.sdk_connection.config.get_endpoint(
+ 'block-storage')
+
client = volume_client(
session=instance.session,
extensions=extensions,
http_log_debug=http_log_debug,
region_name=instance.region_name,
+ endpoint_override=endpoint_override,
**kwargs
)