[tests] grep|cut for IP address in a more robust way

because sometimes these VMs may get an IPv6 address assigned
and we don't want to cut only the first part of it
This commit is contained in:
Alexander Todorov 2019-06-04 12:05:11 +03:00 committed by Martin Pitt
parent eb8ca5b5bf
commit 16fd1a2340
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ __EOF__
rlLogInfo "IP_ADDRESS is not assigned yet ..."
sleep 30
IP_ADDRESS=`python3 $SAMPLES/find_by_uuid.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD \
--uuid $INSTANCE_UUID | grep 'ip address' | tr -d ' ' | cut -f2 -d:`
--uuid $INSTANCE_UUID | grep 'ip address' | tr -d ' ' | cut -f2- -d:`
done
rlLogInfo "Running instance IP_ADDRESS=$IP_ADDRESS"