aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli
diff options
context:
space:
mode:
Diffstat (limited to 'functest/cli')
-rw-r--r--functest/cli/commands/cli_os.py4
-rw-r--r--functest/cli/commands/cli_tier.py6
2 files changed, 5 insertions, 5 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
diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py
index 7aa3f714e..933d8cd63 100644
--- a/functest/cli/commands/cli_tier.py
+++ b/functest/cli/commands/cli_tier.py
@@ -8,12 +8,12 @@
# pylint: disable=missing-docstring
+import os
import pkg_resources
import click
from functest.ci import tier_builder
-from functest.utils.constants import CONST
from functest.utils import functest_utils
@@ -21,8 +21,8 @@ class Tier(object):
def __init__(self):
self.tiers = tier_builder.TierBuilder(
- CONST.__getattribute__('INSTALLER_TYPE'),
- CONST.__getattribute__('DEPLOY_SCENARIO'),
+ os.environ['INSTALLER_TYPE'],
+ os.environ['DEPLOY_SCENARIO'],
pkg_resources.resource_filename('functest', 'ci/testcases.yaml'))
def list(self):