From 9e21a2228c191896223daae2379fcf1352cc736c Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 10 Jan 2012 15:18:07 -0600 Subject: nova-manage floating ip fixes * Add pool, interface to 'floating list' output These columns were added to the floating_ips table in https://review.openstack.org/2892 and are not visible elsewhere * Fix 'floating delete' to skip network/broadcast addresses Makes the delete command match the create command behaviour introduced in https://review.openstack.org/2663 * Address changes listed in bug 817281 Change host column in output to project ID, change hostname column to uuid Change-Id: Ibbfbe9ed5543927a6b2a1e676f5617901a32f897 --- bin/nova-manage | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/nova-manage b/bin/nova-manage index 79683fef7..6147b1202 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -708,7 +708,7 @@ class FloatingIpCommands(object): @args('--ip_range', dest="ip_range", metavar='', help='IP range') def delete(self, ip_range): """Deletes floating ips by range""" - for address in netaddr.IPNetwork(ip_range): + for address in netaddr.IPNetwork(ip_range).iter_hosts(): db.floating_ip_destroy(context.get_admin_context(), str(address)) @@ -724,10 +724,12 @@ class FloatingIpCommands(object): for floating_ip in floating_ips: instance = None if floating_ip['fixed_ip']: - instance = floating_ip['fixed_ip']['instance']['hostname'] - print "%s\t%s\t%s" % (floating_ip['host'], - floating_ip['address'], - instance) + instance = floating_ip['fixed_ip']['instance']['uuid'] + print "%s\t%s\t%s\t%s\t%s" % (floating_ip['project_id'], + floating_ip['address'], + instance, + floating_ip['pool'], + floating_ip['interface']) class NetworkCommands(object): -- cgit