Fix nova-manage floating list (fixes bug 918804)
https://review.openstack.org/2922 broke nova-manage floating list * Restore db.floating_ip_get_all * Update instance display in nova-manage Change-Id: I526237401371a21eafbd9b571f9b4a17a534c1c6
This commit is contained in:
@@ -722,12 +722,14 @@ class FloatingIpCommands(object):
|
|||||||
else:
|
else:
|
||||||
floating_ips = db.floating_ip_get_all_by_host(ctxt, host)
|
floating_ips = db.floating_ip_get_all_by_host(ctxt, host)
|
||||||
for floating_ip in floating_ips:
|
for floating_ip in floating_ips:
|
||||||
instance = None
|
instance_id = None
|
||||||
if floating_ip['fixed_ip']:
|
if floating_ip['fixed_ip_id']:
|
||||||
instance = floating_ip['fixed_ip']['instance']['uuid']
|
fixed_ip = db.fixed_ip_get(ctxt, floating_ip['fixed_ip_id'])
|
||||||
|
instance = db.instance_get(ctxt, fixed_ip['instance_id'])
|
||||||
|
instance_id = instance.get('uuid', "none")
|
||||||
print "%s\t%s\t%s\t%s\t%s" % (floating_ip['project_id'],
|
print "%s\t%s\t%s\t%s\t%s" % (floating_ip['project_id'],
|
||||||
floating_ip['address'],
|
floating_ip['address'],
|
||||||
instance,
|
instance_id,
|
||||||
floating_ip['pool'],
|
floating_ip['pool'],
|
||||||
floating_ip['interface'])
|
floating_ip['interface'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user