diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2015-09-24 17:46:18 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2015-09-24 17:46:18 +0100 |
commit | e9f2de6f2a9ff522473cf0efaba04c22973a90e3 (patch) | |
tree | a5f9abaf7b9a204a82132db8345ee0424dd2b7dd | |
parent | 0a580c84382710bd9a4c598652c7f07a34df1966 (diff) | |
download | ciat-tester-e9f2de6f2a9ff522473cf0efaba04c22973a90e3.tar.gz |
More hacking.
-rwxr-xr-x | tester | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -361,12 +361,23 @@ class ReleaseApp(cliapp.Application): for system in self.systems: self.systems[system].wait_for_ssh() + print('[Local] Building IP address prefix:') + ip_addrs = {} + for system in self.systems: + sanitised = 'IP__' + system.replace('-','_').upper() + ip_addrs[sanitised] = self.systems[system].ip_addr + prefix = '' + for entry in ip_addrs: + prefix = prefix + entry + '=' + ip_addrs[entry] + ' ' + print(' ' + prefix) + for test in self.tests: print('[Local] Running test: ' + test) for step in self.tests[test]: for cmd in step['commands']: for system in step['systems']: # TODO: Get user for each command from test file + # TODO: Pass prefix, so systems can talk to each other s = self.systems[system] s.runcmd(['sh', '-c', cmd], 'root') @@ -375,6 +386,10 @@ class ReleaseApp(cliapp.Application): for host in self.hosts: self.hosts[host].cleanup_systems(self.images) + # Sleep for a bit, or nova silently fails to delete the image + # TODO: Test whether the image has been deleted in a retry loop. + time.sleep(20) + print('[Local] Remove images from remote hosts:') for host in self.hosts: self.hosts[host].delete_images(self.images) |