diff options
author | Nauman Ahad <nauman.ahad@xflowresearch.com> | 2016-06-01 18:44:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-06-01 18:44:39 +0000 |
commit | 6a75ef2591b93d05c96a9aace7266dcf952fa495 (patch) | |
tree | 911167262797ba3bd23b5fba60e57295a2a48424 /func/driver.py | |
parent | 052df6190466f5b9f2722fa1885cf08f6da1e629 (diff) | |
parent | 1dd916e557d60a05dcedc0e741ab7cbb94f85c64 (diff) |
Merge "Read the proxy info from testcase, and set it to hosts when dhrystone benchmarks test."
Diffstat (limited to 'func/driver.py')
-rw-r--r-- | func/driver.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/func/driver.py b/func/driver.py index 94fc1432..48c09c5d 100644 --- a/func/driver.py +++ b/func/driver.py @@ -21,20 +21,22 @@ class Driver: print os.environ['PWD'] self.dic_json = defaultdict() - def drive_bench(self, benchmark, roles, benchmark_fname, benchmark_detail = None, pip_dict = None): - + def drive_bench(self, benchmark, roles, benchmark_fname, benchmark_detail = None, pip_dict = None, proxy_info = None): roles= sorted(roles) pip_dict = sorted(pip_dict) result_dir = 'results' benchmark_name = benchmark + '.yaml' self.dic_json['Dest_dir'] = str(result_dir) - self.dic_json['ip1']='' - self.dic_json['ip2']='' - self.dic_json['installer']=str(os.environ['INSTALLER_TYPE']) - self.dic_json['workingdir']=str(os.environ['PWD']) - self.dic_json['fname']=str(benchmark_fname) - self.dic_json['username']= str('root') - + self.dic_json['ip1'] = '' + self.dic_json['ip2'] = '' + self.dic_json['installer'] = str(os.environ['INSTALLER_TYPE']) + self.dic_json['workingdir'] = str(os.environ['PWD']) + self.dic_json['fname'] = str(benchmark_fname) + self.dic_json['username'] = str('root') + + for key in proxy_info.keys(): + self.dic_json[key] = proxy_info[key] + if os.environ['INSTALLER_TYPE'] == str('joid'): self.dic_json['username']=str('ubuntu') if os.environ['INSTALLER_TYPE'] == str('apex'): |