summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasanori Itoh <itoumsn@nttdata.co.jp>2011-04-01 18:02:29 +0000
committerTarmac <>2011-04-01 18:02:29 +0000
commit78cebece92abc63490595178caa6aaf09fab1545 (patch)
treeb1175fc84c03e031e6835a741e24ab617a0d1d97
parent84dd5b0c94a8fdf3ec906c49de89331a0cb88444 (diff)
parentec3b3d6ae97cddce490c2cbeed2f8f9241704ed1 (diff)
downloadnova-78cebece92abc63490595178caa6aaf09fab1545.tar.gz
nova-78cebece92abc63490595178caa6aaf09fab1545.tar.xz
nova-78cebece92abc63490595178caa6aaf09fab1545.zip
Add checking if the floating_ip is allocated or not before appending to result array in DescribeAddresses.
-rw-r--r--nova/api/ec2/cloud.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 7ba8dfbea..425784e8a 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -757,6 +757,8 @@ class CloudController(object):
iterator = db.floating_ip_get_all_by_project(context,
context.project_id)
for floating_ip_ref in iterator:
+ if floating_ip_ref['project_id'] is None:
+ continue
address = floating_ip_ref['address']
ec2_id = None
if (floating_ip_ref['fixed_ip']