- if [[ "$INSTALLER_TYPE" == "apex" ]] ; then
- COMPUTE_USER=${COMPUTE_USER:-heat-admin}
- if [[ "$INSTALLER_IP" == "none" ]] ; then
- instack_mac=$(sudo virsh domiflist instack | awk '/default/{print $5}')
- INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk '{print $1}')
- fi
- COMPUTE_IP=$(sudo ssh $ssh_opts $INSTALLER_IP \
- "source stackrc; \
- nova show $compute_host_in_undercloud \
- | awk '/ ctlplane network /{print \$5}'")
- elif [[ "$INSTALLER_TYPE" == "fuel" ]] ; then
- COMPUTE_USER=${COMPUTE_USER:-root}
- if [[ "$INSTALLER_IP" == "none" ]] ; then
- instack_mac=$(sudo virsh domiflist fuel-opnfv | awk '/pxebr/{print $5}')
- INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk '{print $1}')
- fi
- node_id=$(echo $compute_host_in_undercloud | cut -d "-" -f 2)
- COMPUTE_IP=$(sshpass -p r00tme ssh 2>/dev/null $ssh_opts root@${INSTALLER_IP} \
- "fuel node|awk -F '|' -v id=$node_id '{if (\$1 == id) print \$5}' |xargs")
- elif [[ "$INSTALLER_TYPE" == "local" ]] ; then
- COMPUTE_USER=${COMPUTE_USER:-$(whoami)}
- COMPUTE_IP=$(getent hosts "$COMPUTE_HOST" | awk '{ print $1 }')
- fi