class TestLab::Node
Node
Class
@author Zachary Patten <zachary AT jovelabs DOT com>
Constants
- STATUS_KEYS
Public Class Methods
by_priority(priority)
click to toggle source
# File lib/testlab/node.rb, line 89 def by_priority(priority) self.all.select{ |n| n.priority == priority } end
new(*args)
click to toggle source
Calls superclass method
# File lib/testlab/node.rb, line 54 def initialize(*args) @ui = TestLab.ui @ui.logger.debug { "Loading Node" } super(*args) self.config.merge!(:node => { :id => self.id.dup }) @provider = self.provider.new(self.config, @ui) raise NodeError, "You must specify a provider class!" if self.provider.nil? @ui.logger.debug { "Node '#{self.id}' Loaded" } end
priority_groups()
click to toggle source
# File lib/testlab/node.rb, line 85 def priority_groups self.all.map(&:priority).sort.uniq.reverse end
Public Instance Methods
config_dir()
click to toggle source
# File lib/testlab/node.rb, line 70 def config_dir self.labfile.config_dir end
domain()
click to toggle source
# File lib/testlab/node.rb, line 78 def domain self.config[:bind] ||= Hash.new self.config[:bind][:domain] ||= 'tld.invalid' end
repo_dir()
click to toggle source
# File lib/testlab/node.rb, line 74 def repo_dir self.labfile.repo_dir end