Added ability to select identity interface

Extent configuration options to allow communicating with identity
over interface different than public.

Closes-Bug: #2105987
Change-Id: I3c2cb65337afc2cddd2a4771545139d470540a06
This commit is contained in:
Piotr Korthals
2025-04-02 12:09:06 +02:00
committed by Takashi Kajinami
parent 7a432c43b7
commit 4a3c10b58e
3 changed files with 15 additions and 1 deletions

View File

@@ -40,7 +40,10 @@ def _get_keystone_connection():
CONF, group='oslo_limit')
session = loading.load_session_from_conf_options(
CONF, group='oslo_limit', auth=auth)
_SDK_CONNECTION = connection.Connection(session=session).identity
_SDK_CONNECTION = connection.Connection(
session=session,
interface=CONF.oslo_limit.interface
).identity
except (ksa_exceptions.NoMatchingPlugin,
ksa_exceptions.MissingRequiredOptions,
ksa_exceptions.MissingAuthPlugin,

View File

@@ -43,6 +43,11 @@ _options = [
choices=['public', 'publicURL', 'internal', 'internalURL',
'admin', 'adminURL'],
help=_("The interface for endpoint discovery")),
cfg.StrOpt(
'interface',
default='public',
choices=['public', 'internal', 'admin'],
help=_("The interface used for communication with identity service.")),
]
_option_group = 'oslo_limit'

View File

@@ -0,0 +1,6 @@
---
features:
- |
Added option ``interface`` to ``[oslo_limit]`` section, introducing ability
to select interface for communicating with identity service for obtaining
limits.