
21 Feb
2021
21 Feb
'21
8:46 p.m.
Thanks heaps. I've realised that I can use the follow_link method to get a reference to the host as well as below: ... vms_service = connection.system_service().vms_service() vms = vms_service.list() for vm in vms: vm_service = vms_service.vm_service(vm.id) if vm.status == types.VmStatus.UP: vmhost = connection.follow_link(vm.host) print("{0:<30s}{1:<30}{2:<30}".format(vm.name,vmhost.name,host.name)) connection.close() ...