Skip to content

Commit

Permalink
Return host name with object when finding least used compatible host
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkirby committed Nov 16, 2016
1 parent 4d27e46 commit 55e614b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/vmpooler/vsphere_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def find_least_used_compatible_host(vm)
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)
Expand Down

0 comments on commit 55e614b

Please sign in to comment.