aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_os.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-12 16:27:54 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-13 07:44:31 +0100
commitdd168d1587838be11d7a8372f77b16915a3af85b (patch)
tree3e2078cfb6ac20d78a13d1c74565e2c5b4e51496 /functest/cli/commands/cli_os.py
parent46f1037fe35bc249dca868b363107bc1bcd70469 (diff)
Improve the way of getting env values
It simply reads env vars instead of calling CONST.__getattribute__() Change-Id: If3137f3cfb9f3102388988a82393b9b2f4e99f60 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/cli/commands/cli_os.py')
-rw-r--r--functest/cli/commands/cli_os.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/functest/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py
index 7595caab7..0cf286238 100644
--- a/functest/cli/commands/cli_os.py
+++ b/functest/cli/commands/cli_os.py
@@ -20,10 +20,10 @@ from functest.utils.constants import CONST
class OpenStack(object):
def __init__(self):
- self.os_auth_url = CONST.__getattribute__('OS_AUTH_URL')
+ self.os_auth_url = os.environ['OS_AUTH_URL']
self.endpoint_ip = None
self.endpoint_port = None
- self.openstack_creds = CONST.__getattribute__('env_file')
+ self.openstack_creds = getattr(CONST, 'env_file')
if self.os_auth_url:
self.endpoint_ip = urllib.parse.urlparse(self.os_auth_url).hostname
self.endpoint_port = urllib.parse.urlparse(self.os_auth_url).port