Merge "Update rally version"
[functest.git] / testcases / features / sfc / compute_presetup_CI.bash
1 #!/bin/bash
2
3 # This script must be use with vxlan-gpe + nsh. Once we have eth + nsh support
4 # in ODL, we will not need it anymore
5
6 set -e
7 ssh_options='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
8 BASEDIR=`dirname $0`
9 INSTALLER_IP=${INSTALLER_IP:-10.20.0.2}
10
11 pushd $BASEDIR
12 #ip=`sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'fuel node'|grep compute|\
13 #awk '{print $10}' | head -1`
14
15 ip=$1
16 echo $ip
17 #sshpass -p r00tme scp $ssh_options correct_classifier.bash ${INSTALLER_IP}:/root
18 #sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'scp correct_classifier.bash '"$ip"':/root'
19
20 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ifconfig br-int up'
21 output=$(sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route | \
22 cut -d" " -f1 | grep 11.0.0.0' ; exit 0)
23
24 if [ -z "$output" ]; then
25 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route add 11.0.0.0/24 \
26 dev br-int'
27 fi