Add info logs to plugin scoping

As requested[1], this patch adds info logging when an unscoped token
cannot be scoped to a given project or domain returned by list_projects
or list_domains.

[1] https://review.openstack.org/#/c/389337/

Change-Id: I0cb4b7450528cd1e056b8a2af4f820a17914209c
This commit is contained in:
Colleen Murphy 2017-01-29 17:55:24 +01:00
parent 8afdc7c80e
commit 57b1f94818
1 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,8 @@ class BasePlugin(object):
scoped_auth_ref = scoped_auth.get_access(session)
except (keystone_exceptions.ClientException,
keystone_exceptions.AuthorizationFailure):
LOG.info('Attempted scope to project %s failed, will attempt'
'to scope to another project.' % project.name)
pass
else:
break
@ -227,6 +229,8 @@ class BasePlugin(object):
domain_auth_ref = domain_auth.get_access(session)
except (keystone_exceptions.ClientException,
keystone_exceptions.AuthorizationFailure):
LOG.info('Attempted scope to domain %s failed, will attempt'
'to scope to another domain.' % domain_name)
pass
else:
if len(domains) > 1: