use the recommended opennebula lookup method

This commit is contained in:
Daniel Wallace 2018-04-13 14:44:57 -05:00
parent f3496030cc
commit f913a7859c
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48

View file

@ -4571,7 +4571,7 @@ def _list_nodes(full=False):
pass
vms[name]['id'] = vm.find('ID').text
if vm.find('TEMPLATE').find('TEMPLATE_ID'):
if 'TEMPLATE_ID' in vm.find('TEMPLATE'):
vms[name]['image'] = vm.find('TEMPLATE').find('TEMPLATE_ID').text
vms[name]['name'] = name
vms[name]['size'] = {'cpu': cpu_size, 'memory': memory_size}