Merge "Always attempt to delete entire floating IP range."

This commit is contained in:
Jenkins 2012-07-13 23:34:13 +00:00 committed by Gerrit Code Review
commit b9478a33bb

View File

@ -372,8 +372,11 @@ class FloatingIpCommands(object):
def delete(self, ip_range):
"""Deletes floating ips by range"""
for address in self.address_to_hosts(ip_range):
db.floating_ip_destroy(context.get_admin_context(),
str(address))
try:
db.floating_ip_destroy(context.get_admin_context(),
str(address))
except exception.FloatingIpNotFoundForAddress as ex:
print "Warning: %s" % ex
@args('--host', dest="host", metavar='<host>', help='Host')
def list(self, host=None):