summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen.murphy@suse.de>2018-01-16 17:13:57 +0100
committerColleen Murphy <colleen@gazlene.net>2018-01-26 08:43:24 +0000
commit9f6dcb0617217241ea4260bd421b19dde35160b5 (patch)
treeb25663b03cae761d677dce0a7c4a888e45a1c7d0
parent6dcb1319611f97524f84b79a7ebd723e3ea5440e (diff)
downloadpython-barbicanclient-9f6dcb0617217241ea4260bd421b19dde35160b5.tar.gz
Pass OSC interface through to barbican pluginpike-em4.5.3
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 (cherry picked from commit 4afb43ab0115f42b4fadcbf19ecac81815d481e3)
-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):