From 303ac3f835f6741ac922abcdf5f153b7e9e1d07b Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Wed, 21 Jun 2017 07:48:35 +0000 Subject: Use adapters for inspectorclient Inspector-client is a bit lacking behind other clients, as it does not have Adapter-based SessionClient and thus does not support all adapter-related options. That's why we construct a session and an adapter from config section, use adapter to resolve inspector API from service catalog (or return the fixed endpoint_override one) and then pass the session and inspector API endpoint to client. This patch also deprecates `[inspector]service_url` in favor of `[inspector]endpoint_override`. As a side-effect, addressig inspector service now supports both regions and interfaces to specify entry in service catalog. Also, inspectorclient calls are now being made with the user token (wrapped with a service token) when there is a token in the task's request context. Change-Id: I21836e712fa9764468ac2654525554b5b4f03741 Partial-Bug: #1699547 --- etc/ironic/ironic.conf.sample | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/ironic/ironic.conf.sample b/etc/ironic/ironic.conf.sample index 99f1fed87..a384d7ec9 100644 --- a/etc/ironic/ironic.conf.sample +++ b/etc/ironic/ironic.conf.sample @@ -1895,12 +1895,28 @@ # fake_inspector driver. (boolean value) #enabled = false +# Always use this endpoint URL for requests for this client. +# (string value) +#endpoint_override = + # Verify HTTPS connections. (boolean value) #insecure = false # PEM encoded client certificate key file (string value) #keyfile = +# The maximum major version of a given API, intended to be +# used as the upper bound of a range with min_version. +# Mutually exclusive with version. (string value) +#max_version = + +# The minimum major version of a given API, intended to be +# used as the lower bound of a range with max_version. +# Mutually exclusive with version. If min_version is given +# with no max_version it is as if max version is "latest". +# (string value) +#min_version = + # User's password (string value) #password = @@ -1918,8 +1934,24 @@ # Deprecated group/name - [inspector]/tenant_name #project_name = -# ironic-inspector HTTP endpoint. If this is not set, the -# service catalog will be used. (string value) +# The default region_name for endpoint URL discovery. (string +# value) +#region_name = + +# The default service_name for endpoint URL discovery. (string +# value) +#service_name = + +# The default service_type for endpoint URL discovery. (string +# value) +#service_type = baremetal-introspection + +# DEPRECATED: ironic-inspector HTTP endpoint. If this is not +# set, the service catalog will be used. (string value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +# Reason: Use [inspector]/endpoint_override option instead to +# set a specific ironic-inspector API URL to connect to. #service_url = # period (in seconds) to check status of nodes on inspection @@ -1951,6 +1983,15 @@ # Deprecated group/name - [inspector]/user_name #username = +# List of interfaces, in order of preference, for endpoint +# URL. (list value) +#valid_interfaces = internal,public + +# Minimum Major API version within a given Major API version +# for endpoint URL discovery. Mutually exclusive with +# min_version and max_version (string value) +#version = + [ipmi] -- cgit v1.2.1