Fix creating of client manager for network tests
Patrole network tests fail when pre-provisioned credentials are
used (Could not find user).
This is caused by missing 'user_id' and 'tenant_id' parameters
in the client manager.
The reason why this happens only with network tests is because
when client manager from neutron_tempest_plugin is created
the set_auth() function which refills the credentials is not
called (in contrast with tempest's get_client_manager() function
where the set_auth() function is called).
This patch makes sure that client manager contains 'user_id'
and 'tenant_id' by refilling the credentials using the set_auth()
function.
Closes-Bug: 1846410
Change-Id: I01ea0da7e43923f50053d41ac069f3f913d5b728
diff --git a/patrole_tempest_plugin/tests/api/network/rbac_base.py b/patrole_tempest_plugin/tests/api/network/rbac_base.py
index 7093b5c..ca94e5f 100644
--- a/patrole_tempest_plugin/tests/api/network/rbac_base.py
+++ b/patrole_tempest_plugin/tests/api/network/rbac_base.py
@@ -68,6 +68,7 @@
if cls.is_neutron_tempest_plugin_available():
from neutron_tempest_plugin.api import clients
neutron_tempest_manager = clients.Manager(manager.credentials)
+ neutron_tempest_manager.auth_provider.set_auth()
cls.ntp_client = neutron_tempest_manager.network_client
return manager