diff options
author | wu.zhihui <wu.zhihui1@zte.com.cn> | 2016-10-22 11:58:03 +0800 |
---|---|---|
committer | wu.zhihui <wu.zhihui1@zte.com.cn> | 2016-10-25 12:43:56 +0800 |
commit | 62d00c20476d8e25974c2f78ec9c2bd05d8f2412 (patch) | |
tree | aa1ad21387f45aeb12dcf39bd8f0f295e672530b /func/env_setup.py | |
parent | 36f6aa40ca02ef9ef1d24e61af337a960b8a76cd (diff) |
Remove Qtip private key files in repos
1. Automaticly genegrate private key files.
2. remove the key files in repo at last.
3. remove public key from authorized_keys of compute hosts.
JIRA: QTIP-110
Change-Id: Ie22f3f195edf650e690a2ed69df1af191953068f
Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'func/env_setup.py')
-rw-r--r-- | func/env_setup.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |