Everything is scoped now and even with the old account.yaml, the scope will be set to 'project' by L132.
This code of storing the account with role is wrong as we should not store the same account in two places, one with role L145 and the other with scope L147. It should be stored with scope only. We can replace this for loop[1] with the below so that we store the account with only <scope>_<role> hash only
for role in roles:
if scope: hash_dict = cls._append_scoped_role( scope, role, temp_hash_key, hash_dict) else: hash_dict = cls._append_role( role, temp_hash_key, hash_dict)
thanks for reporting.
Everything is scoped now and even with the old account.yaml, the scope will be set to 'project' by L132.
This code of storing the account with role is wrong as we should not store the same account in two places, one with role L145 and the other with scope L147. It should be stored with scope only. We can replace this for loop[1] with the below so that we store the account with only <scope>_<role> hash only
for role in roles:
hash_ dict = cls._append_ scoped_ role(
scope, role, temp_hash_key, hash_dict)
else:
hash_ dict = cls._append_role(
role, temp_hash_key, hash_dict)
if scope:
[1] https:/ /github. com/openstack/ tempest/ blob/1632cf5085 de995206ec97788 b4b546c13466860 /tempest/ lib/common/ preprov_ creds.py# L143-L148