summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2017-01-29 17:55:24 +0100
committerColleen Murphy <colleen@gazlene.net>2017-01-29 17:58:44 +0100
commit57b1f948187730716ff2bec4acb4cffb78e9a22c (patch)
tree3ede1f3616ada2007bf1955f24cb834d4eab12eb
parent8afdc7c80efbc819712d42ad6e57053df7fef272 (diff)
downloaddjango_openstack_auth-57b1f948187730716ff2bec4acb4cffb78e9a22c.tar.gz
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
-rw-r--r--openstack_auth/plugin/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/openstack_auth/plugin/base.py b/openstack_auth/plugin/base.py
index 4b520b4..f1aff52 100644
--- a/openstack_auth/plugin/base.py
+++ b/openstack_auth/plugin/base.py
@@ -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: