From ffdd523055d2395d1216c5fa0007ed6af0b6146e Mon Sep 17 00:00:00 2001 From: Vincenzo Riccobene Date: Tue, 5 Jan 2016 16:53:43 +0000 Subject: Fix ApexLake setup Changes the directories where to store apexlake data in order to allow a non super user to run the setup. JIRA: YARDSTICK-35 Change-Id: I871b2ab793183887c86666bfe2241e3c26b4f427 Signed-off-by: Vincenzo Riccobene --- yardstick/vTC/apexlake/experimental_framework/common.py | 12 ++++++------ yardstick/vTC/apexlake/setup.py | 6 +++--- yardstick/vTC/apexlake/tests/common_test.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/yardstick/vTC/apexlake/experimental_framework/common.py b/yardstick/vTC/apexlake/experimental_framework/common.py index 6b5f932ce..afe70241a 100644 --- a/yardstick/vTC/apexlake/experimental_framework/common.py +++ b/yardstick/vTC/apexlake/experimental_framework/common.py @@ -76,10 +76,10 @@ def init_conf_file(api=False): global CONF_FILE if api: CONF_FILE = ConfigurationFile(cf.get_sections_api(), - '/etc/apexlake/apexlake.conf') + '/tmp/apexlake/apexlake.conf') else: CONF_FILE = ConfigurationFile(cf.get_sections(), - '/etc/apexlake/apexlake.conf') + '/tmp/apexlake/apexlake.conf') def init_general_vars(api=False): @@ -99,10 +99,10 @@ def init_general_vars(api=False): "is not present in configuration file") TEMPLATE_DIR = '/tmp/apexlake/heat_templates/' - if not os.path.exists(TEMPLATE_DIR): - os.makedirs(TEMPLATE_DIR) - cmd = "cp /etc/apexlake/heat_templates/*.yaml {}".format(TEMPLATE_DIR) - run_command(cmd) + # if not os.path.exists(TEMPLATE_DIR): + # os.makedirs(TEMPLATE_DIR) + # cmd = "cp /tmp/apexlake/heat_templates/*.yaml {}".format(TEMPLATE_DIR) + # run_command(cmd) if not api: # Validate template name diff --git a/yardstick/vTC/apexlake/setup.py b/yardstick/vTC/apexlake/setup.py index e33b5bfc8..8ab3f4845 100644 --- a/yardstick/vTC/apexlake/setup.py +++ b/yardstick/vTC/apexlake/setup.py @@ -30,9 +30,9 @@ setup(name='apexlake', ] }, data_files=[ - ('/etc/apexlake/', ['apexlake.conf']), - ('/etc/apexlake/heat_templates/', + ('/tmp/apexlake/', ['apexlake.conf']), + ('/tmp/apexlake/heat_templates/', ['heat_templates/vTC.yaml']), - ('/etc/apexlake/heat_templates/', + ('/tmp/apexlake/heat_templates/', ['heat_templates/stress_workload.yaml']) ]) diff --git a/yardstick/vTC/apexlake/tests/common_test.py b/yardstick/vTC/apexlake/tests/common_test.py index 2ce6f7717..293754b16 100644 --- a/yardstick/vTC/apexlake/tests/common_test.py +++ b/yardstick/vTC/apexlake/tests/common_test.py @@ -137,7 +137,7 @@ class TestCommonInit(unittest.TestCase): self.assertEqual(common.TEMPLATE_NAME, 'vTC.yaml') self.assertEqual(common.RESULT_DIR, '/tmp/apexlake/results/') self.assertEqual(common.ITERATIONS, 1) - mock_makedirs.assert_called_once_with('/tmp/apexlake/heat_templates/') + # mock_makedirs.assert_called_once_with('/tmp/apexlake/heat_templates/') class TestCommonInit2(unittest.TestCase): -- cgit 1.2.3-korg