Class: Dcmgr::PhysicalHostScheduler::FindLast

Inherits:
Object
  • Object
show all
Defined in:
lib/dcmgr/scheduler/find_last.rb

Overview

This is a simple host scheduler which gets back a host found at the top of hosts list.

Instance Method Summary collapse

Instance Method Details

#assign_to_instance(hosts, instance) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/dcmgr/scheduler/find_last.rb', line 7

def assign_to_instance(hosts, instance)
  Dcmgr::logger.debug "assign to instance (%d hosts)" % hosts.length
p 'hosts'
p hosts
  return hosts.last
  raise NoPhysicalHostError.new("can't assign physical host")
end