Class: MotherBrain::Bootstrap::Worker::Host Private
- Inherits:
-
Object
- Object
- MotherBrain::Bootstrap::Worker::Host
- Defined in:
- lib/mb/bootstrap/worker.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Used internally within the MotherBrain::Bootstrap::Worker to identify hosts which should be partially or fully bootstrapped.
Instance Attribute Summary collapse
-
#hostname ⇒ String
readonly
private
The fully qualified hostname of the machine.
Instance Method Summary collapse
- #full_bootstrap? ⇒ Boolean private
-
#initialize(hostname) ⇒ Host
constructor
private
A new instance of Host.
-
#node_name ⇒ String
private
The name of the machine as seen in Chef.
- #partial_bootstrap? ⇒ Boolean private
- #to_s ⇒ Object private
Constructor Details
#initialize(hostname) ⇒ Host
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Host.
20 21 22 |
# File 'lib/mb/bootstrap/worker.rb', line 20 def initialize(hostname) @hostname = hostname end |
Instance Attribute Details
#hostname ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The fully qualified hostname of the machine
16 17 18 |
# File 'lib/mb/bootstrap/worker.rb', line 16 def hostname @hostname end |
Instance Method Details
#full_bootstrap? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/mb/bootstrap/worker.rb', line 25 def full_bootstrap? node_name.nil? end |
#node_name ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The name of the machine as seen in Chef
35 36 37 |
# File 'lib/mb/bootstrap/worker.rb', line 35 def node_name @node_name ||= NodeQuerier.instance.registered_as(hostname) end |
#partial_bootstrap? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 |
# File 'lib/mb/bootstrap/worker.rb', line 40 def partial_bootstrap? node_name.present? end |
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/mb/bootstrap/worker.rb', line 44 def to_s "#{node_name}(#{hostname})" end |