{
if [ "$TEST_CASE" == "compute" ]; then
cd ${QTIP_DIR} && python qtip.py -l default -f compute
- cd ${QTIP_DIR} && python data/ref_results/suite_result.py compute
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py compute
elif [ "$TEST_CASE" == "storage" ]; then
cd ${QTIP_DIR} && python qtip.py -l default -f storage
- cd ${QTIP_DIR} && python data/ref_results/suite_result.py storage
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py storage
elif [ "$TEST_CASE" == "network" ]; then
cd ${QTIP_DIR} && python qtip.py -l default -f network
- cd ${QTIP_DIR} && python data/ref_results/suite_result.py network
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py network
elif [ "$TEST_CASE" == "all" ]; then
cd ${QTIP_DIR} && python qtip.py -l default -f compute
cd ${QTIP_DIR} && python qtip.py -l default -f storage
cd ${QTIP_DIR} && python qtip.py -l default -f network
- cd ${QTIP_DIR} && python data/ref_results/suite_result.py compute
- cd ${QTIP_DIR} && python data/ref_results/suite_result.py storage
- cd ${QTIP_DIR} && python data/ref_results/suite_result.py network
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py compute
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py storage
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py network
fi
}
def run_ansible_playbook(self, benchmark, extra_vars):
logger.info(extra_vars)
ansible_api = AnsibleApi()
- ansible_api.execute_playbook('./data/hosts',
+ ansible_api.execute_playbook('./config/hosts',
'./benchmarks/playbooks/{0}.yaml'.format(benchmark),
- './data/QtipKey', extra_vars)
+ './config/QtipKey', extra_vars)
return self.get_ansible_result(extra_vars['role'], ansible_api.get_detail_playbook_stats())
def drive_bench(self, installer_type, pwd, benchmark, roles, benchmark_fname,
@staticmethod
def write_to_file(role):
- f_name_2 = open('./data/hosts', 'w')
+ f_name_2 = open('./config/hosts', 'w')
print role.items()
for k in role:
f_name_2.write('[' + k + ']\n')
os.system('ssh-keyscan %s >> /root/.ssh/known_hosts' % ip)
time.sleep(2)
- ssh_cmd = './data/qtip_creds.sh %s' % ip
+ ssh_cmd = './scripts/qtip_creds.sh %s' % ip
logger.info("run command: %s " % ssh_cmd)
os.system(ssh_cmd)
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(ip, key_filename='./data/QtipKey')
+ ssh.connect(ip, key_filename='./config/QtipKey')
for attempts in range(100):
try:
if not installer_ip:
raise RuntimeError("undefine environment variable INSTALLER_IP")
- cmd = "bash ./data/fetch_compute_ips.sh -i %s -a %s" % \
+ cmd = "bash ./scripts/fetch_compute_ips.sh -i %s -a %s" % \
(installer_type, installer_ip)
logger.info(cmd)
os.system(cmd)
def heat_template_vm(self, vm_params, installer):\r
Heat_Dic = {}\r
try:\r
- with open('./heat/SampleHeat.yaml', 'r+') as H_temp:\r
+ with open('./config/SampleHeat.yaml', 'r+') as H_temp:\r
Heat_Dic = yaml.safe_load(H_temp)\r
except yaml.YAMLError as exc:\r
if hasattr(exc, 'problem_mark'):\r
mark = exc.problem_mark\r
- print 'Error in qtip/heat/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, mark.column + 1)\r
+ print 'Error in qtip/config/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, mark.column + 1)\r
print 'EXITING PROGRAM. Correct File and restart'\r
sys.exit(1)\r
- fopen = open('./data/QtipKey.pub', 'r')\r
+ fopen = open('./config/QtipKey.pub', 'r')\r
fopenstr = fopen.read()\r
fopenstr = fopenstr.rstrip()\r
scriptcmd = '#!/bin/bash \n echo {0} >> foo.txt \n echo {1} >> /root/.ssh/authorized_keys'.format(\r
if i['output_key'] == 'KeyPair_PublicKey':\r
sshkey = str(i['output_value'])\r
\r
- with open('./data/my_key.pem', 'w') as fopen:\r
+ with open('./config/my_key.pem', 'w') as fopen:\r
fopen.write(sshkey)\r
fopen.close()\r
print Env_setup.ip_pw_list\r
fi
-./data/fetch_os_creds.sh -d ./opnfv-creds.sh
+./scripts/fetch_os_creds.sh -d ./opnfv-creds.sh
py_modules=['qtip'],
version='1.0',
author='opnfv',
- packages=['func', 'data.ref_results', 'data.report'])
+ packages=['func', 'scripts.ref_results', 'utils.report'])
ansible_api = AnsibleApi()
ret = ansible_api.execute_playbook('tests/data/hosts',
'tests/data/test.yml',
- 'data/QtipKey',
+ 'config/QtipKey',
{'keys': 'test'})
assert ret == 3
test_class.fetch_compute_ips = mock_ips
test_class.parse("tests/test_case/bm_without_proxy.yaml")
test_class.update_ansible()
- result = filecmp.cmp('tests/output/hosts', 'data/hosts')
+ result = filecmp.cmp('tests/output/hosts', 'config/hosts')
assert result
def test_ping(self, capfd):