CC-2870: Create testing infrastructure for testing upgrades
-try multiple times until ip address acquired.
This commit is contained in:
parent
8a737d58f5
commit
cec90ddf70
|
@ -99,11 +99,15 @@ def create_fresh_os(os_version, os_arch):
|
||||||
|
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
|
|
||||||
ret = local('VBoxManage --nologo guestproperty get "%s" /VirtualBox/GuestInfo/Net/0/V4/IP'%vm_name, capture=True)
|
try_again = True
|
||||||
|
while try_again:
|
||||||
|
ret = local('VBoxManage --nologo guestproperty get "%s" /VirtualBox/GuestInfo/Net/0/V4/IP'%vm_name, capture=True)
|
||||||
|
triple = ret.partition(':')
|
||||||
|
ip_addr = triple[2].strip(' \r\n')
|
||||||
|
print "Address found %s"%ip_addr
|
||||||
|
|
||||||
|
try_again = (len(ip_addr) == 0)
|
||||||
|
|
||||||
triple = ret.partition(':')
|
|
||||||
ip_addr = triple[2].strip(' \r\n')
|
|
||||||
print "Address found %s"%ip_addr
|
|
||||||
env.hosts.append(ip_addr)
|
env.hosts.append(ip_addr)
|
||||||
env.host_string = ip_addr
|
env.host_string = ip_addr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue