Don't call the Keystone client if the token is None
There are certain cases the user.Token constructor is called with
the default unscoped_token value of None. When this happens using
PKI, an unexpected error occurs. If the token is None, we know it's
not pki and should not make an extra call to the Keystone client to
check.
A test is provided to demonstrate the issue, and the test fails
without the included code change.
Reviewed: https:/ /review. openstack. org/286860 /git.openstack. org/cgit/ openstack/ django_ openstack_ auth/commit/ ?id=75a6b9721e5 7c0cbabd9d330db b0f1cfdd3af48a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 75a6b9721e57c0c babd9d330dbb0f1 cfdd3af48a
Author: Brad Pokorny <email address hidden>
Date: Mon Feb 29 23:01:46 2016 -0800
Don't call the Keystone client if the token is None
There are certain cases the user.Token constructor is called with
the default unscoped_token value of None. When this happens using
PKI, an unexpected error occurs. If the token is None, we know it's
not pki and should not make an extra call to the Keystone client to
check.
A test is provided to demonstrate the issue, and the test fails
without the included code change.
Change-Id: Ie8e93eda4cf8e8 285785335126624 781470be19c
Closes-Bug: #1551977