Sha256: 89726050826600b40dd9e6c68fc338f8483b56083447d391de3fd234cdc674a4

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

module Dcmgr
  module PhysicalHostScheduler
    # This is a simple host scheduler which gets back a host found
    # at the top of hosts list.
    class FindRandom
      def assign_to_instance(hosts, instance)
        Dcmgr::logger.debug "assign to instance (%d hosts)" % hosts.length
        hvc_host = hosts[ rand(hosts.length) ]
p 'hvc_host'
p hvc_host
        raise NoPhysicalHostError.new("can't assign physical host")
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
wakame-vdc-agents-11.06.0 lib/dcmgr/scheduler/find_random.rb
wakame-vdc-dcmgr-11.06.0 lib/dcmgr/scheduler/find_random.rb
wakame-vdc-dcmgr-10.12.0 lib/dcmgr/scheduler/find_random.rb
wakame-vdc-agents-10.12.0 lib/dcmgr/scheduler/find_random.rb
wakame-vdc-dcmgr-10.11.0 lib/dcmgr/scheduler/find_random.rb
wakame-vdc-agents-10.11.0 lib/dcmgr/scheduler/find_random.rb