X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Fci%2Fprepare_env.sh;h=d9f8257ae336c92f4dc535a706f8cf1cbef3020b;hb=782035b1427da1479df79dc2784ecf59a37b69e9;hp=723a04aa1308ed4a4db878456018bdde773dc707;hpb=6da6dd989be8a54a9cf6db4f3d58f3d671692952;p=yardstick.git diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh index 723a04aa1..d9f8257ae 100755 --- a/tests/ci/prepare_env.sh +++ b/tests/ci/prepare_env.sh @@ -55,3 +55,33 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME # Prepare a admin-rc file for StorPerf integration $YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh + +# copy a admin-rc file for StorPerf integration to the deployment location +if [ "$NODE_NAME" == "huawei-pod1" ]; then + bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh +fi + +# Fetching id_rsa file from jump_server..." +verify_connectivity() { + local ip=$1 + echo "Verifying connectivity to $ip..." + for i in $(seq 0 10); do + if ping -c 1 -W 1 $ip > /dev/null; then + echo "$ip is reachable!" + return 0 + fi + sleep 1 + done + error "Can not talk to $ip." +} + +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + +if [ "$INSTALLER_TYPE" == "fuel" ]; then + #ip_fuel="10.20.0.2" + verify_connectivity $INSTALLER_IP + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + sshpass -p r00tme scp 2>/dev/null $ssh_options \ + root@${INSTALLER_IP}:~/.ssh/id_rsa /root/.ssh/id_rsa &> /dev/null +fi +