+ if [[ $? -ne 0 ]] ; then
+ die $LINENO "Can not ping to computer host"
+ fi
+
+ # verify ssh to target compute host
+ ssh $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP" 'exit'
+ if [[ $? -ne 0 ]] ; then
+ die $LINENO "Can not ssh to computer host"
+ fi
+}
+
+# TODO(r-mibu): update this function to support consumer instance
+# and migrate this function into installer lib
+get_consumer_ip___to_be_removed() {
+ local get_consumer_command="ip route get $COMPUTE_IP | awk '/ src /{print \$NF}'"
+ if is_installer apex; then
+ CONSUMER_IP=$(sudo ssh $ssh_opts root@$INSTALLER_IP \
+ "$get_consumer_command")
+ elif is_installer fuel; then
+ CONSUMER_IP=$(sudo sshpass -p r00tme ssh $ssh_opts root@${INSTALLER_IP} \
+ "$get_consumer_command")
+ elif is_installer local; then
+ CONSUMER_IP=`$get_consumer_command`
+ fi
+ echo "CONSUMER_IP=$CONSUMER_IP"
+
+ die_if_not_set $LINENO CONSUMER_IP "Could not get CONSUMER_IP."