Class: Bcome::Orchestrator
- Inherits:
-
Object
- Object
- Bcome::Orchestrator
- Includes:
- Singleton
- Defined in:
- lib/objects/orchestrator.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #command_output_silenced? ⇒ Boolean
- #get(breadcrumb = nil) ⇒ Object
-
#initialize ⇒ Orchestrator
constructor
A new instance of Orchestrator.
- #is_multi_node? ⇒ Boolean
- #reset! ⇒ Object
- #silence_command_output! ⇒ Object
- #tail_all_command_output!(node) ⇒ Object
- #tail_all_command_output? ⇒ Boolean
Constructor Details
#initialize ⇒ Orchestrator
Returns a new instance of Orchestrator.
8 9 10 |
# File 'lib/objects/orchestrator.rb', line 8 def initialize reset! end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/objects/orchestrator.rb', line 6 def context @context end |
Instance Method Details
#command_output_silenced? ⇒ Boolean
26 27 28 |
# File 'lib/objects/orchestrator.rb', line 26 def command_output_silenced? @silence == true end |
#get(breadcrumb = nil) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/objects/orchestrator.rb', line 39 def get( = nil) context = ::Bcome::Bootup.traverse() raise Bcome::Exception::NoNodeFoundForBreadcrumb, unless context context.load_nodes if context.inventory? && !context.nodes_loaded? context end |
#is_multi_node? ⇒ Boolean
18 19 20 |
# File 'lib/objects/orchestrator.rb', line 18 def is_multi_node? @multi_node == true end |
#reset! ⇒ Object
12 13 14 15 16 |
# File 'lib/objects/orchestrator.rb', line 12 def reset! @silence = false @tail_command_output = false @multi_node = false end |
#silence_command_output! ⇒ Object
22 23 24 |
# File 'lib/objects/orchestrator.rb', line 22 def silence_command_output! @silence = true end |
#tail_all_command_output!(node) ⇒ Object
30 31 32 33 |
# File 'lib/objects/orchestrator.rb', line 30 def tail_all_command_output!(node) @multi_node = node.machines.size > 1 @tail_command_output = true end |
#tail_all_command_output? ⇒ Boolean
35 36 37 |
# File 'lib/objects/orchestrator.rb', line 35 def tail_all_command_output? @tail_command_output == true end |