Fixes nova-manage bug. When a nova-network host has allocated floating ips *AND* some associated, the nova-manage floating list <host> would throw exception because was expecting hash with 'ec2_id' key , however, the obj returned is a sqlalchemy obj and the attr we need is 'hostname'.
This commit is contained in:
commit
78093e8101
@ -536,7 +536,7 @@ class FloatingIpCommands(object):
|
||||
for floating_ip in floating_ips:
|
||||
instance = None
|
||||
if floating_ip['fixed_ip']:
|
||||
instance = floating_ip['fixed_ip']['instance']['ec2_id']
|
||||
instance = floating_ip['fixed_ip']['instance']['hostname']
|
||||
print "%s\t%s\t%s" % (floating_ip['host'],
|
||||
floating_ip['address'],
|
||||
instance)
|
||||
|
Loading…
x
Reference in New Issue
Block a user