OSC: try fetching ironic-inspector URL from osc-lib
Together with https://review.opendev.org/#/c/664830/ it corrects using auth_type=none with ironic-inspector. Change-Id: Iaf94b939359f7f5c8c910ea3b6d601027b043c1c
This commit is contained in:
parent
e146a841f5
commit
440cd92749
@ -40,8 +40,14 @@ for mversion in range(ironic_inspector_client.MAX_API_VERSION[1] + 1):
|
||||
|
||||
|
||||
def make_client(instance):
|
||||
url = instance.get_configuration().get('inspector_url')
|
||||
if not url:
|
||||
url = instance.get_endpoint_for_service_type(
|
||||
'baremetal-introspection', interface=instance.interface,
|
||||
region_name=instance._region_name
|
||||
)
|
||||
return ironic_inspector_client.ClientV1(
|
||||
inspector_url=instance.get_configuration().get('inspector_url'),
|
||||
inspector_url=url,
|
||||
session=instance.session,
|
||||
api_version=instance._api_version[API_NAME],
|
||||
interface=instance._interface,
|
||||
@ -49,6 +55,7 @@ def make_client(instance):
|
||||
|
||||
|
||||
def build_option_parser(parser):
|
||||
# TODO(dtantsur): deprecate these options in favor of more generic OS_*
|
||||
parser.add_argument('--inspector-api-version',
|
||||
default=utils.env('INSPECTOR_VERSION',
|
||||
default=DEFAULT_API_VERSION),
|
||||
|
Loading…
Reference in New Issue
Block a user