summaryrefslogtreecommitdiffstats
path: root/func/driver.py
diff options
context:
space:
mode:
authorMofassirArif <Mofassir_Arif@dellteam.com>2016-01-12 03:12:23 -0800
committerNauman Ahad <Nauman_Ahad@dell.com>2016-01-14 11:58:11 +0000
commit63fa71cc462c00f19bc1949f3e2b32f42721388b (patch)
treee7fa95e0b05564d5f3ee2e14a516e8410083a9d6 /func/driver.py
parentc02ac0ea76af8011afaf7241e30999326efe8105 (diff)
error handling for the files being input to the framework.
iperf bug fix for the bare metal testing, renamed all the iperf config files. added more detail to the help. Change-Id: I16cfb1c05599cd0b803e735e6a75083e3e6733ec Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com> (cherry picked from commit 4c06a4ed3b3b22e3dbcddb33dda33ca773dfae11)
Diffstat (limited to 'func/driver.py')
-rw-r--r--func/driver.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/func/driver.py b/func/driver.py
index 2cdddba5..0dc0a6e1 100644
--- a/func/driver.py
+++ b/func/driver.py
@@ -21,6 +21,7 @@ class Driver:
self.dic_json = defaultdict()
def drive_bench(self, benchmark, roles, benchmark_detail= None, pip_dict = None):
+
roles= sorted(roles)
pip_dict = sorted(pip_dict)
result_dir = 'results'
@@ -39,12 +40,11 @@ class Driver:
if k == '1-server':
print values, 'saving IP'
self.dic_json['ip'+str(index)]= str(values)
- self.dic_json['privateip'+str(index)] = pip_dict[0][1]
+ if pip_dict[0][1][0]:
+ self.dic_json['privateip'+str(index)] = pip_dict[0][1]
+ if not pip_dict[0][1][0]:
+ self.dic_json['privateip'+str(index)] = 'NONE'
index= index+1
dic_json = json.dumps(dict(self.dic_json.items()))
- print dic_json
run_play = 'ansible-playbook -s ./benchmarks/playbooks/{0} --private-key=./data/QtipKey -i ./data/hosts --extra-vars \'{1}\' -v '.format(benchmark_name, dic_json)
-# run_play = 'ansible-playbook -s $PWD/benchmarks/playbooks/{0} --extra-vars "Dest_dir={1} role={2}" -vvv'.format(
-# benchmark_name, result_dir, k)
status = os.system(run_play)
-