summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-09-25 12:02:23 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-09-25 12:02:23 +0000
commit46db9384cb21cc517066cc588d4b6cad51ffb9ff (patch)
treed4325d02fb5c0139a31c6e71119155c608996f8d
parentd232ffa70d000d784ba4f55c52e46e20ed5a7a81 (diff)
downloadciat-tester-46db9384cb21cc517066cc588d4b6cad51ffb9ff.tar.gz
Use self.id instead of hostname, which was not declared
-rwxr-xr-xtester4
1 files 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)