summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen.murphy@suse.de>2018-01-16 17:13:57 +0100
committerColleen Murphy <colleen.murphy@suse.de>2018-01-16 17:18:42 +0100
commit4afb43ab0115f42b4fadcbf19ecac81815d481e3 (patch)
treee9ab486e6a67240f9b7b2dfcb2e6d23f6840e6ee
parent92736b9c2f9fdd0c70645b26025ea98f09e07b8c (diff)
downloadpython-barbicanclient-4afb43ab0115f42b4fadcbf19ecac81815d481e3.tar.gz
Pass OSC interface through to barbican plugin
python-openstackclient uses OS_INTERFACE or --os-interface to select a catalog endpoint to work with. The barbican CLI uses BARBICAN_INTERFACE or --interface, which OSC won't pass through. This is a problem because the it prevents the user from selecting a non-public endpoint when using barbican via openstackclient rather than as a standalone CLI. This patch updates the osc plugin to pass through the interface set by OSC to the barbican client class. Change-Id: I1e9890c9e87fb77b272f939bf33914df739aa5be
-rw-r--r--barbicanclient/osc_plugin.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/barbicanclient/osc_plugin.py b/barbicanclient/osc_plugin.py
index 1d0e0e5..d4fcea7 100644
--- a/barbicanclient/osc_plugin.py
+++ b/barbicanclient/osc_plugin.py
@@ -26,7 +26,8 @@ API_VERSIONS = {
def make_client(instance):
"""Returns a Barbican service client."""
return client.Client(session=instance.session,
- region_name=instance._region_name)
+ region_name=instance._region_name,
+ interface=instance.interface)
def build_option_parser(parser):