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 vms_in_pool(pool_name)
          vms = []
          @connection_pool.with_metrics do |pool_object|
            connection = ensured_vsphere_connection(pool_object)
            folder_object = find_vm_folder(pool_name, connection)
            return vms if folder_object.nil?
            folder_object.childEntity.each do |vm|
              vms << { 'name' => vm.name } if vm.is_a? RbVmomi::VIM::VirtualMachine
            end
          end
          vms
        end
def vms_in_pool ( pool_name ) vms = [ ] @connection_pool . with_metrics do | pool_object | connection = ensured_vsphere_connection ( pool_object ) folder_object = find_vm_folder ( pool_name , connection ) return vms if folder_object . nil? folder_object . childEntity . each do | vm | vms << { 'name' => vm . name } if vm . is_a? RbVmomi :: VIM :: VirtualMachine end end vms end
The connection_pool method is normally used only for testing
The connection_pool method is normally used only for testing
pool_name