Access credential fields as attributes
Some tests access credentials attributes using dictionary
syntax (e.g. with get method); changed to use the Credentials
attribute directly.
Partially implements: bp multi-keystone-api-version-tests
Change-Id: Ic5b68af18d9a2dda581bdc1500d064e0ba732ec4
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 8667445..434904f 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -140,15 +140,19 @@
@property
def user(self):
- return self.auth_provider.credentials.get('username', None)
+ return self.auth_provider.credentials.username
@property
def tenant_name(self):
- return self.auth_provider.credentials.get('tenant_name', None)
+ return self.auth_provider.credentials.tenant_name
+
+ @property
+ def tenant_id(self):
+ return self.auth_provider.credentials.tenant_id
@property
def password(self):
- return self.auth_provider.credentials.get('password', None)
+ return self.auth_provider.credentials.password
@property
def base_url(self):