Merge "Enable Copper functest under JOID"
[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 echo $ip
16 sshpass -p r00tme scp $ssh_options correct_classifier.bash ${INSTALLER_IP}:/root
17 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'scp correct_classifier.bash '"$ip"':/root'
18
19 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ifconfig br-int up'
20 sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'ssh root@'"$ip"' ip route add 11.0.0.0/24 \
21 dev br-int'