diff options
author | zhifeng jiang <jiang.zhifeng@zte.com.cn> | 2016-10-26 05:25:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-26 05:25:44 +0000 |
commit | ee12d3e19d914d5d7c4a750ab8ddb93b74d242dc (patch) | |
tree | 25bb1f6f01b15ae4758335275bc152b9185d38af /func | |
parent | c9dc8ffa175f8aac4ced5ac43c189c60d403d4f9 (diff) | |
parent | 62d00c20476d8e25974c2f78ec9c2bd05d8f2412 (diff) |
Merge "Remove Qtip private key files in repos"
Diffstat (limited to 'func')
-rw-r--r-- | func/args_handler.py | 10 | ||||
-rw-r--r-- | func/env_setup.py | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/func/args_handler.py b/func/args_handler.py index 2f7c8957..624f90c4 100644 --- a/func/args_handler.py +++ b/func/args_handler.py @@ -59,10 +59,12 @@ def prepare_ansible_env(benchmark_test_case): def run_benchmark(installer_type, pwd, benchmark, benchmark_details, proxy_info, env_setup, benchmark_test_case): driver = Driver() - return driver.drive_bench(installer_type, pwd, benchmark, - env_setup.roles_dict.items(), - _get_f_name(benchmark_test_case), - benchmark_details, env_setup.ip_pw_dict.items(), proxy_info) + result = driver.drive_bench(installer_type, pwd, benchmark, + env_setup.roles_dict.items(), + _get_f_name(benchmark_test_case), + benchmark_details, env_setup.ip_pw_dict.items(), proxy_info) + env_setup.cleanup_authorized_keys() + return result def prepare_and_run_benchmark(installer_type, pwd, benchmark_test_case): diff --git a/func/env_setup.py b/func/env_setup.py index 9e21a5b6..6027f904 100644 --- a/func/env_setup.py +++ b/func/env_setup.py @@ -208,3 +208,9 @@ class Env_setup: def call_ssh_test(self): self.ssh_test(self.ip_pw_list) + + def cleanup_authorized_keys(self): + for ip, pw in self.ip_pw_list: + cmd = './scripts/cleanup_creds.sh %s' % ip + logger.info("cleanup authorized_keys: %s " % cmd) + os.system(cmd) |