lib/vmpooler/providers/vsphere.rb
# The connection_pool method is normally used only for testing
The connection_pool method is normally used only for testing
The connection_pool method is normally used only for testing
def find_least_used_host(cluster, connection, datacentername)
          cluster_object = find_cluster(cluster, connection, datacentername)
          target_hosts = get_cluster_host_utilization(cluster_object)
          raise("There is no host candidate in vcenter that meets all the required conditions, check that the cluster has available hosts in a 'green' status, not in maintenance mode and not overloaded CPU and memory'") if target_hosts.empty?
          target_hosts.min[1]
        end
def find_least_used_host ( cluster , connection , datacentername ) cluster_object = find_cluster ( cluster , connection , datacentername ) target_hosts = get_cluster_host_utilization ( cluster_object ) raise ( "There is no host candidate in vcenter that meets all the required conditions, check that the cluster has available hosts in a 'green' status, not in maintenance mode and not overloaded CPU and memory'" ) if target_hosts . empty? target_hosts . min [ 1 ] end
The connection_pool method is normally used only for testing
The connection_pool method is normally used only for testing
cluster
connection
datacentername