Remove need to include admin in credentials in base classes
This commit removes some excess code from the rbac_base classes,
including defining the auth_provider and setting credentials =
['primary', 'admin']. The credentials array should only be
populated with credentials needed by a test class -- but currently
admin is provided for rbac_utils, which is poor design.
This is accomplished by refactoring the constructor in RbacUtils
to instantiate an admin client manager using get_client_manager
which is available in the instance of tempest.test.BaseTestCase.
From there, it is easy to reference the admin roles client used
for switching roles. This is the only reason that admin was
provided in the credentials array above.
The following was changed:
- refactored RbacUtils constructor to remove need to add
'admin' to credentials array
- refactored rbac_utils functions to avoid using auth_provider
and to instead reference the auth_provider nested inside
os_primary
- adding doctring for RbacUtils
- refactored unit tests as needed
Change-Id: Id5588f2bf8947c314d46bd3cc0ef8b5c93874fc8
31 files changed