Merge "cli auth: only inject project name if provided"
diff --git a/tempest/lib/cli/base.py b/tempest/lib/cli/base.py
index c9cffd2..c308c30 100644
--- a/tempest/lib/cli/base.py
+++ b/tempest/lib/cli/base.py
@@ -374,12 +374,13 @@
:param merge_stderr: if True the stderr buffer is merged into stdout
:type merge_stderr: boolean
"""
- creds = ('--os-username %s --os-project-name %s --os-password %s '
+ creds = ('--os-username %s --os-password %s '
'--os-auth-url %s' %
(self.username,
- self.tenant_name,
self.password,
self.uri))
+ if self.tenant_name is not None:
+ creds += ' --os-project-name %s' % self.tenant_name
if self.identity_api_version:
if cmd not in self.CLIENTS_WITHOUT_IDENTITY_VERSION:
creds += ' --os-identity-api-version %s' % (