Return host name with object when finding least used compatible host

This commit is contained in:
kirby@puppetlabs.com 2016-11-16 03:18:52 -08:00
parent f8bd79a8d9
commit 12c2c4a09b

View file

@ -254,7 +254,8 @@ module Vmpooler
host_usage = get_host_utilization(host, model)
target_hosts << host_usage if host_usage
end
target_hosts.sort[0][1]
target_host = target_hosts.sort[0][1]
[target_host, target_host.name]
end
def find_pool(poolname)