class MotherBrain::Bootstrap::Worker::Host

Used internally within the {Bootstrap::Worker} to identify hosts which should be partially or fully bootstrapped.

@api private

Attributes

hostname[R]

The fully qualified hostname of the machine

@example

"reset.riotgames.com"

@return [String]

Public Class Methods

new(hostname) click to toggle source

@param [String] hostname

A fully qualified hostname for a machine
# File lib/mb/bootstrap/worker.rb, line 20
def initialize(hostname)
  @hostname = hostname
end

Public Instance Methods

full_bootstrap?() click to toggle source

@return [Boolean]

# File lib/mb/bootstrap/worker.rb, line 25
def full_bootstrap?
  node_name.nil?
end
node_name() click to toggle source

The name of the machine as seen in Chef

@example

"reset"

@return [String]

# File lib/mb/bootstrap/worker.rb, line 35
def node_name
  @node_name ||= NodeQuerier.instance.registered_as(hostname)
end
partial_bootstrap?() click to toggle source

@return [Boolean]

# File lib/mb/bootstrap/worker.rb, line 40
def partial_bootstrap?
  node_name.present?
end
to_s() click to toggle source
# File lib/mb/bootstrap/worker.rb, line 44
def to_s
  "#{node_name}(#{hostname})"
end