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
(cherry picked from commit 4afb43ab01)
This commit is contained in:
Colleen Murphy 2018-01-16 17:13:57 +01:00 committed by Colleen Murphy
parent 6dcb131961
commit 9f6dcb0617
1 changed files with 2 additions and 1 deletions

View File

@ -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):