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 <vincenzox.m.riccobene@intel.com>
global CONF_FILE
if api:
CONF_FILE = ConfigurationFile(cf.get_sections_api(),
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(),
else:
CONF_FILE = ConfigurationFile(cf.get_sections(),
- '/etc/apexlake/apexlake.conf')
+ '/tmp/apexlake/apexlake.conf')
def init_general_vars(api=False):
def init_general_vars(api=False):
"is not present in configuration file")
TEMPLATE_DIR = '/tmp/apexlake/heat_templates/'
"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
if not api:
# Validate template name
- ('/etc/apexlake/', ['apexlake.conf']),
- ('/etc/apexlake/heat_templates/',
+ ('/tmp/apexlake/', ['apexlake.conf']),
+ ('/tmp/apexlake/heat_templates/',
['heat_templates/vTC.yaml']),
['heat_templates/vTC.yaml']),
- ('/etc/apexlake/heat_templates/',
+ ('/tmp/apexlake/heat_templates/',
['heat_templates/stress_workload.yaml'])
])
['heat_templates/stress_workload.yaml'])
])
self.assertEqual(common.TEMPLATE_NAME, 'vTC.yaml')
self.assertEqual(common.RESULT_DIR, '/tmp/apexlake/results/')
self.assertEqual(common.ITERATIONS, 1)
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):
class TestCommonInit2(unittest.TestCase):