From 6bb8944112f07c3328186f4d2c53c3661d165f9d Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Wed, 18 Jan 2012 14:27:09 -0500 Subject: Fix disassociating of auto assigned floating ips. Also makes adds passing True to the disassociate/deallocate functions use a kwarg so the meaning is more apparent. Fixes bug #918358. Change-Id: Ie88d19456ffe0fa5f7c7bba79b572672db96c766 --- nova/network/manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nova/network/manager.py b/nova/network/manager.py index 68440be2d..9d6009e0d 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -295,10 +295,12 @@ class FloatingIP(object): # disassociate floating ips related to fixed_ip for floating_ip in floating_ips: address = floating_ip['address'] - self.disassociate_floating_ip(context, address, True) + self.disassociate_floating_ip(context, address, + affect_auto_assigned=True) # deallocate if auto_assigned if floating_ip['auto_assigned']: - self.release_floating_ip(context, address, True) + self.deallocate_floating_ip(context, address, + affect_auto_assigned=True) # call the next inherited class's deallocate_for_instance() # which is currently the NetworkManager version -- cgit