From cdfc317608eded84b589bb7c8616edb03f282bf3 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 4 Aug 2010 15:53:24 -0700 Subject: [PATCH] fix error on terminate instance relating to elastic ip --- nova/endpoint/cloud.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index 1695e4b0..349007ef 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -611,9 +611,8 @@ class CloudController(object): logging.warning("Instance %s was not found during terminate" % i) continue - address = network_model.get_public_ip_for_instance(i) - if address: - elastic_ip = address['public_ip'] + elastic_ip = network_model.get_public_ip_for_instance(i) + if elastic_ip: logging.debug("Disassociating address %s" % elastic_ip) # NOTE(vish): Right now we don't really care if the ip is # disassociated. We may need to worry about