class OSC::Reservations::Node
Provides a way for the developer to view the properties of any given reserved node.
Attributes
@return [String] The ID of this node.
@return [Array<String>] A list of job id’s running on this node.
@return [Fixnum] Number of cores on this node.
@return [Array<String>] A list of properties for this node.
@return [Array<String>] A list of users running on this node.
Public Class Methods
@param opts [Hash] Options used to create a node. @option opts [String] :id The ID of this node. @option opts [Fixnum] :np The number of processors on this node. @option opts [Array<String>] :props An array of properties for this node. @option opts [Array<String>] :jobs An array of job IDs running on this node. @option opts [Array<String>] :users An array of users running on this node.
# File lib/osc/reservations/node.rb, line 27 def initialize(opts) @id = opts[:id] @np = opts[:np] @props = opts[:props] @jobs = opts[:jobs] @users = opts[:users] end
Public Instance Methods
Is this node free to use? @return [Boolean] is node free?
# File lib/osc/reservations/node.rb, line 37 def free? jobs.empty? end