Merge pull request #31107 from techhat/nebulaprivip

Don't try to add a non-existent IP address
This commit is contained in:
Mike Place 2016-02-10 14:52:42 -07:00
commit 825b510030

View file

@ -204,7 +204,11 @@ def list_nodes(call=None):
vms[vm.find('NAME').text]['state'] = vm.find('STATE').text
private_ips = []
for nic in vm.find('TEMPLATE').findall('NIC'):
private_ips.append(nic.find('IP').text)
try:
private_ips.append(nic.find('IP').text)
except AttributeError:
# There is no private IP; skip it
pass
vms[vm.find('NAME').text]['private_ips'] = private_ips
vms[vm.find('NAME').text]['public_ips'] = []