diff options
author | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-05-20 15:56:13 +0800 |
---|---|---|
committer | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-05-23 08:37:48 +0800 |
commit | 1dd916e557d60a05dcedc0e741ab7cbb94f85c64 (patch) | |
tree | f75bdccf86d853f295813cde9b129b1695f2a033 /func/driver.py | |
parent | 4c22b78737cca49bc6459b10e7f7b6e550d56d63 (diff) |
Read the proxy info from testcase, and set it to hosts when dhrystone benchmarks test.
modification:
Write the git_proxy_pbook.yaml to set git proxy info in hosts or vms.
Write the sys_proxy_pbook.yaml to set yum apt wget env proxy info in hosts or vms.
Change the dhrystone.yaml to include proxy and add the zte-pod1 /compute/dhrystone_bm.yaml.Tested and passed.Other playbooks did not include the proxy yet. I will test and push lately.
QTIP-74
Change-Id: Ia820bc32798b9f1f6f4165a111524e04c129a5df
Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
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'): |