Check project presence in static account
Added more verification for static accounts.
Account can be used if it has field "project_name"
or "tenant_name".
Otherwise an account is ignored.
Related-PROD: https://mirantis.jira.com/browse/PRODX-25578
Change-Id: I79be25d04182f3ca84d7e4c4a5fd67b7f5adb17d
diff --git a/tempest/lib/common/preprov_creds.py b/tempest/lib/common/preprov_creds.py
index f4176b1..37bc3c4 100644
--- a/tempest/lib/common/preprov_creds.py
+++ b/tempest/lib/common/preprov_creds.py
@@ -451,6 +451,8 @@
accounts with and without networks
:return: boolean value
"""
+ if not ({'project_name', 'tenant_name'} & account.keys()):
+ return False
if separate_projects_by_network_existence:
is_network_in_resources = 'network' in account.get('resources', {})
return is_network_in_resources ==\