+function liveMigration {
+ #executing live migration test case on the host machine
+ test_env=$1
+ test_name=livemigration
+ echo "Test Environment ${test_env}"
+ if [ ${test_env} == "peer-peer" ];then
+ echo "live migration is not implemented for peer to peer"
+ elif [ ${test_env} == "local" ];then
+ source $WORKSPACE/ci/cyclicTestTrigger.sh $HOST_IP
+ connect_host
+ #Update pod.yaml with IP
+ cd $WORKSPACE/tests/
+ sed -ri "s/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/${HOST_IP}/" pod.yaml
+ #Cleaning the environment before running Livemigration through yardstick
+ env_clean
+ #Waiting for ssh to be available for the host machine
+ sleep 20
+ if runLiveMigration ${test_env} ${test_name};then
+ livemigration_result=`expr ${livemigration_result} + 0`
+ else
+ echo "live migration test case failed"
+ livemigration_result=`expr ${livemigration_result} + 1`
+ fi
+ else
+ echo "Incorrect test environment for live migration"
+ exit 1
+ fi
+}
+