From 46db9384cb21cc517066cc588d4b6cad51ffb9ff Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 25 Sep 2015 12:02:23 +0000 Subject: Use self.id instead of hostname, which was not declared --- tester | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tester b/tester index 62ec371..9cbb3aa 100755 --- a/tester +++ b/tester @@ -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) -- cgit v1.2.1