OS-EXT-IPS:type is not always defined on addresses

In novaclient servers
This commit is contained in:
Daniel Wallace 2016-03-14 12:04:25 -06:00
parent 849e269a75
commit 90fe817bde

View File

@ -148,7 +148,7 @@ class NovaServer(object):
self.public_ips.append(addr['addr'])
else:
self.private_ips.append(addr['addr'])
if addr['OS-EXT-IPS:type'] == 'floating':
if addr.get('OS-EXT-IPS:type') == 'floating':
self.floating_ips.append(addr['addr'])
else:
self.fixed_ips.append(addr['addr'])