diff options
| author | Anthony Young <sleepsonthefloor@gmail.com> | 2011-09-07 16:38:41 -0700 |
|---|---|---|
| committer | Anthony Young <sleepsonthefloor@gmail.com> | 2011-09-07 16:38:41 -0700 |
| commit | b6d454762d7fdf9b202d8a580dd9bfdf069a5e80 (patch) | |
| tree | f54b0c38c6c94e19fdfca442d33bba6561fe318a /nova/api | |
| parent | ede50666215d38f037d9783556647889bc88c6bc (diff) | |
| download | nova-b6d454762d7fdf9b202d8a580dd9bfdf069a5e80.tar.gz nova-b6d454762d7fdf9b202d8a580dd9bfdf069a5e80.tar.xz nova-b6d454762d7fdf9b202d8a580dd9bfdf069a5e80.zip | |
fix for lp844364: improve check for fixed_ip association
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/contrib/floating_ips.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/openstack/contrib/floating_ips.py b/nova/api/openstack/contrib/floating_ips.py index d1add8f83..9ceb5858f 100644 --- a/nova/api/openstack/contrib/floating_ips.py +++ b/nova/api/openstack/contrib/floating_ips.py @@ -107,7 +107,7 @@ class FloatingIPController(object): context = req.environ['nova.context'] floating_ip = self.network_api.get_floating_ip(context, id) - if 'fixed_ip' in floating_ip: + if floating_ip['fixed_ip']: self.network_api.disassociate_floating_ip(context, floating_ip['address']) @@ -161,7 +161,7 @@ class Floating_ips(extensions.ExtensionDescriptor): raise webob.exc.HTTPBadRequest(explanation=msg) floating_ip = self.network_api.get_floating_ip_by_ip(context, address) - if 'fixed_ip' in floating_ip: + if floating_ip['fixed_ip']: self.network_api.disassociate_floating_ip(context, address) return webob.Response(status_int=202) |
