diff options
-rwxr-xr-x | tester | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -229,14 +229,14 @@ class OpenstackSystem(System): free_ip = nc.floating_ips.create( nc.floating_ip_pools.list()[0].name) if free_ip != None: - instance = nc.servers.find(name=hostname) + instance = nc.servers.find(name=self.id) # TODO: switch back to cli tool, as python # approach gave error. instance.add_floating_ip(free_ip) self.ip_addr = free_ip.ip break else: - delete_instance_and_image(hostname) + delete_instance_and_image(self.id) raise cliapp.AppException('Could not get a floating IP') print(str(self) + 'Obtained IP address: ' + self.ip_addr) |