diff options
author | Jose Lausuch <jalausuch@suse.com> | 2017-10-16 09:14:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-10-16 09:14:23 +0000 |
commit | ff169618789d264e1ef28205eac362dddc33f57b (patch) | |
tree | 1009ceaa594ca4d0dd28c8069735c00b98ce0e12 | |
parent | e010bb53fed22792a1c025f628623a22cf7e005b (diff) | |
parent | 3da2c957aa30d445f87dd12d300ed3789742e337 (diff) |
Merge "Get daisy installer IP"
-rwxr-xr-x | jjb/functest/functest-env-presetup.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/jjb/functest/functest-env-presetup.sh b/jjb/functest/functest-env-presetup.sh index 7a9b09d2c..cd15d7194 100755 --- a/jjb/functest/functest-env-presetup.sh +++ b/jjb/functest/functest-env-presetup.sh @@ -27,5 +27,23 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then echo "No available installer VM exists and no credentials provided...exiting" exit 1 fi + +elif [[ ${INSTALLER_TYPE} == 'daisy' ]]; then + echo "Gathering IP information for Daisy installer VM" + if sudo virsh list | grep daisy; then + echo "Installer VM detected" + + bridge_name=$(sudo virsh domiflist daisy | grep vnet | awk '{print $3}') + echo "Bridge is $bridge_name" + + installer_mac=$(sudo virsh domiflist daisy | grep vnet | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + export INSTALLER_IP=$(/usr/sbin/arp -e -i $bridge_name | grep ${installer_mac} | awk {'print $1'}) + + echo "Installer ip is ${INSTALLER_IP}" + else + echo "No available installer VM exists...exiting" + exit 1 + fi fi |