remove imported FUNCTEST_REPO object
[functest.git] / cli / commands / cli_os.py
index 722c700..fc027d5 100644 (file)
@@ -9,18 +9,15 @@
 
 
 import os
+
 import click
+
 import functest.utils.functest_utils as ft_utils
 import functest.utils.openstack_clean as os_clean
 import functest.utils.openstack_snapshot as os_snapshot
-import yaml
-
 
-with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
-    functest_yaml = yaml.safe_load(f)
+functest_yaml = ft_utils.get_functest_yaml()
 
-REPOS_DIR = os.getenv('repos_dir')
-FUNCTEST_REPO = ("%s/functest/" % REPOS_DIR)
 FUNCTEST_CONF_DIR = functest_yaml.get("general").get(
     "directories").get("dir_functest_conf")
 RC_FILE = os.getenv('creds')
@@ -83,7 +80,7 @@ class CliOpenStack:
 
     def check(self):
         self.ping_endpoint()
-        cmd = FUNCTEST_REPO + "ci/check_os.sh"
+        cmd = ft_utils.FUNCTEST_REPO + "/ci/check_os.sh"
         ft_utils.execute_command(cmd, verbose=False)
 
     def snapshot_create(self):