Class: Dcmgr::Scheduler::HostNode::FindFirst

Inherits:
Dcmgr::Scheduler::HostNodeScheduler show all
Defined in:
lib/dcmgr/scheduler/host_node/find_first.rb

Instance Method Summary collapse

Methods inherited from Dcmgr::Scheduler::HostNodeScheduler

#initialize

Constructor Details

This class inherits a constructor from Dcmgr::Scheduler::HostNodeScheduler

Instance Method Details

#schedule(instance) ⇒ Object

Raises:

  • (HostNodeScheduleError)


6
7
8
9
10
# File 'lib/dcmgr/scheduler/host_node/find_first.rb', line 6

def schedule(instance)
  host_node = Models::HostNode.first
  raise HostNodeScheduleError if host_node.nil?
  instance.host_node = host_node
end