Merge "Update the details of tempest results"
[functest.git] / functest / cli / commands / cli_os.py
index 0cf2862..d3e229c 100644 (file)
@@ -14,16 +14,16 @@ import click
 from six.moves import urllib
 
 from functest.ci import check_deployment
-from functest.utils.constants import CONST
+from functest.utils import constants
 
 
 class OpenStack(object):
 
     def __init__(self):
-        self.os_auth_url = os.environ['OS_AUTH_URL']
+        self.os_auth_url = os.environ.get('OS_AUTH_URL', None)
         self.endpoint_ip = None
         self.endpoint_port = None
-        self.openstack_creds = getattr(CONST, 'env_file')
+        self.openstack_creds = constants.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