Merge "Add support for token caching"

This commit is contained in:
Zuul 2021-04-09 23:29:03 +00:00 committed by Gerrit Code Review
commit 782e4d0f97
1 changed files with 6 additions and 4 deletions

View File

@ -83,10 +83,12 @@ class ClientManager(clientmanager.ClientManager):
self._cli_options._openstack_config._pw_callback = \
shell.prompt_for_password
try:
self._cli_options._auth = \
self._cli_options._openstack_config.load_auth_plugin(
self._cli_options.config,
)
# We might already get auth from SDK caching
if not self._cli_options._auth:
self._cli_options._auth = \
self._cli_options._openstack_config.load_auth_plugin(
self._cli_options.config,
)
except TypeError as e:
self._fallback_load_auth_plugin(e)