update storperf installation in Yardstick
[yardstick.git] / tests / ci / scp_storperf_files.sh
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 # Copy storperf_admin-rc to deployment location.
13
14 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
15
16 scp_files(){
17     export JUMP_HOST_IP
18     sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \
19             root@${JUMP_HOST_IP}:/root/ &> /dev/null
20     sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/docker-compose.yaml \
21             root@${JUMP_HOST_IP}:/root/ &> /dev/null
22 }
23
24 case "$NODE_NAME" in
25     "huawei-pod1")
26         JUMP_HOST_IP='192.168.10.6'
27         scp_files
28         ;;
29     "huawei-pod2")
30         JUMP_HOST_IP='192.168.11.2'
31         scp_files
32         ;;
33     *)
34         # no node name, exit
35         echo "storperf test case will not run on this pod, skipping scp files..."
36         ;;
37 esac