lib/beaker/hypervisor/abs.rb
def generate_floaty_request_strings(hosts, supported_vm_list)
      vm_list = {}

      hosts.each do |host|
        if supported_vm_list.include?(host[:template])
          if vm_list.include?(host[:template])
            vm_list[host[:template]] = vm_list[host[:template]] + 1
          else
            vm_list[host[:template]] = 1
          end
        else
          raise ArgumentError.new("#{host.name} has a template #{host[:template]} that is not found in vmpooler or nspooler")
        end
      end

      vm_request = ""
      vm_list.each do |key, value|
        vm_request.concat("#{key}=#{value} ")
      end

      vm_request
    end
# Based upon the host file, this method counts the number of each template needed
# and generates the host=Xnum eg redhat-7-x86_64=2 expected by floaty
Based upon the host file, this method counts the number of each template needed
and generates the host=Xnum eg redhat-7-x86_64=2 expected by floaty
Based upon the host file this method counts the number of each template needed and generates the host = Xnum eg redhat - 7 - x86_64 = 2 expected by floaty
def generate_floaty_request_strings(hosts, supported_vm_list)
      vm_list = {}
      hosts.each do |host|
        if supported_vm_list.include?(host[:template])
          if vm_list.include?(host[:template])
            vm_list[host[:template]] = vm_list[host[:template]] + 1
          else
            vm_list[host[:template]] = 1
          end
        else
          raise ArgumentError.new("#{host.name} has a template #{host[:template]} that is not found in vmpooler or nspooler")
        end
      end
      vm_request = ""
      vm_list.each do |key, value|
        vm_request.concat("#{key}=#{value} ")
      end
      vm_request
    end
def generate_floaty_request_strings ( hosts , supported_vm_list ) vm_list = { } hosts . each do | host | if supported_vm_list . include? ( host [ :template ] ) if vm_list . include? ( host [ :template ] ) vm_list [ host [ :template ] ] = vm_list [ host [ :template ] ] + 1 else vm_list [ host [ :template ] ] = 1 end else raise ArgumentError . new ( "#{host.name} has a template #{host[:template]} that is not found in vmpooler or nspooler" ) end end vm_request = "" vm_list . each do | key , value | vm_request . concat ( "#{key}=#{value} " ) end vm_request end
Based upon the host file, this method counts the number of each template needed
and generates the host=Xnum eg redhat-7-x86_64=2 expected by floaty
Based upon the host file this method counts the number of each template needed and generates the host = Xnum eg redhat - 7 - x86_64 = 2 expected by floaty
hosts
supported_vm_list