diff options
author | MofassirArif <Mofassir_Arif@dellteam.com> | 2016-01-12 03:12:23 -0800 |
---|---|---|
committer | MofassirArif <Mofassir_Arif@dellteam.com> | 2016-01-12 03:15:02 -0800 |
commit | 4c06a4ed3b3b22e3dbcddb33dda33ca773dfae11 (patch) | |
tree | e7fa95e0b05564d5f3ee2e14a516e8410083a9d6 /func/driver.py | |
parent | 90eb79018b459c1aa6606168f1ee592da535643c (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>
Diffstat (limited to 'func/driver.py')
-rw-r--r-- | func/driver.py | 10 |
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) - |