To check if the user was providing a scoped token we were relying on the
"HTTP_X_PROJECT_ID" environment variable, relying on a KeyError
exception when accessing the dictionary. However, the variable can be
empty, resulting in a dictionary key "HTTP_X_PROJECT_ID":None. As a
consequence, we were using None as the project ID, resulting in
misleading errors.
Reviewed: https:/ /review. openstack. org/452161 /git.openstack. org/cgit/ openstack/ ooi/commit/ ?id=0549ee16cb5 2d46bdc598943e2 fa985ad9442339
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0549ee16cb52d46 bdc598943e2fa98 5ad9442339
Author: Alvaro Lopez Garcia <email address hidden>
Date: Fri Mar 31 13:34:36 2017 +0200
Check if project id is None from headers
To check if the user was providing a scoped token we were relying on the X_PROJECT_ ID" environment variable, relying on a KeyError PROJECT_ ID":None. As a
"HTTP_
exception when accessing the dictionary. However, the variable can be
empty, resulting in a dictionary key "HTTP_X_
consequence, we were using None as the project ID, resulting in
misleading errors.
Closes-bug: #1678060 371b1d3401e3355 28c5cc6455e
Change-Id: I1956fd99be5771