summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2018-02-05 12:07:40 -0700
committerspisarski <s.pisarski@cablelabs.com>2018-02-05 12:07:40 -0700
commitf4a60323a5653f416023b482faf58015154c0e57 (patch)
treefb974d9f375191ede140360a45c94b28f0cc7c95
parent9cf59ae0a133b0c8ab3907c84ec3c7b962df599a (diff)
Fixed OSCreds retrieval.
The optional parameter 'project_name' was never getting a default value when not used causing an OSCredsError to be raised. Change-Id: I2a0986c62c5d9520f60ebd06db1f3a749e62361c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--snaps/openstack/create_user.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/snaps/openstack/create_user.py b/snaps/openstack/create_user.py
index 5da3a5e..64912b3 100644
--- a/snaps/openstack/create_user.py
+++ b/snaps/openstack/create_user.py
@@ -91,6 +91,9 @@ class OpenStackUser(OpenStackIdentityObject):
credentials
:return:
"""
+ if not project_name:
+ project_name = self._os_creds.project_name
+
return OSCreds(
username=self.user_settings.name,
password=self.user_settings.password,