From e9f2de6f2a9ff522473cf0efaba04c22973a90e3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 24 Sep 2015 17:46:18 +0100 Subject: More hacking. --- tester | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tester b/tester index 58a04f2..e70e002 100755 --- a/tester +++ b/tester @@ -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) -- cgit v1.2.1