From: Tim Rozet Date: Mon, 18 Apr 2016 18:09:39 +0000 (-0400) Subject: Apex, Functest: Fixes VM renaming scheme for apex X-Git-Tag: colorado.1.0~569 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=047708d62a425567a1bc7e86eaca2a8e88ebd703;p=releng.git Apex, Functest: Fixes VM renaming scheme for apex In master, the installer VM has been renamed to undercloud. Change-Id: Ic695dd39e481e51e38c8b601cadd497bf2a8bc1d --- diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index c9bf07d8b..d691140f4 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -249,8 +249,16 @@ # labconfig is used only for joid labconfig="" if [[ ${INSTALLER_TYPE} == 'apex' ]]; then - instack_mac=$(sudo virsh domiflist instack | grep default | \ - grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + if virsh list | grep instack; then + instack_mac=$(sudo virsh domiflist instack | grep default | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + elif virsh list | grep undercloud; then + instack_mac=$(sudo virsh domiflist undercloud | grep default | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + else + echo "No available installer VM exists...exiting" + exit 1 + fi INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'}) sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable