summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2012-01-10 15:18:07 -0600
committerDean Troyer <dtroyer@gmail.com>2012-01-10 16:51:06 -0600
commit9e21a2228c191896223daae2379fcf1352cc736c (patch)
tree1b38c359858680cb8591e516a43ba290e5e642ee /bin
parent5165320257b18ca1917727c1ae1d3cdde366d85d (diff)
downloadnova-9e21a2228c191896223daae2379fcf1352cc736c.tar.gz
nova-9e21a2228c191896223daae2379fcf1352cc736c.tar.xz
nova-9e21a2228c191896223daae2379fcf1352cc736c.zip
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage12
1 files changed, 7 insertions, 5 deletions
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='<range>', 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):