summaryrefslogtreecommitdiffstats
path: root/qtip/scripts
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2017-03-11 10:19:21 +0800
committerzhihui wu <zhihui.wu2006+zte@gmail.com>2017-03-11 04:40:16 +0000
commit855ac41c1220daf85717bb48ce2d4d2828109aa5 (patch)
treec856652fad879f5719b79efaa8b25136ab890025 /qtip/scripts
parentc5f64d5114be98cbe6a74c2078b22b741ae984a4 (diff)
env cleanup
If IF_DEBUG is True, there is not cleanup step. If IF_DEBUG is False, host file and keypair will be deleted on local and public key will be removed from remote nodes in the end of test. Change-Id: I4a88acc2d428e41e4abaedacb011e27468b2cb57 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn> (cherry picked from commit d37dad746e504e833abcf2ae058f2b81e2a9d365)
Diffstat (limited to 'qtip/scripts')
-rwxr-xr-xqtip/scripts/cleanup_creds.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/qtip/scripts/cleanup_creds.sh b/qtip/scripts/cleanup_creds.sh
new file mode 100755
index 00000000..b4eee924
--- /dev/null
+++ b/qtip/scripts/cleanup_creds.sh
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+DEST_IP=$1
+HOSTNAME=$(hostname)
+sshoptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
+
+case "$INSTALLER_TYPE" in
+ fuel)
+ ssh $sshoptions -i ./config/QtipKey root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys"
+ ;;
+esac