Class: Bcome::Orchestrator

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/objects/orchestrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOrchestrator

Returns a new instance of Orchestrator.



6
7
8
# File 'lib/objects/orchestrator.rb', line 6

def initialize
  @silence = false
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



4
5
6
# File 'lib/objects/orchestrator.rb', line 4

def context
  @context
end

Instance Method Details

#command_output_silenced?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/objects/orchestrator.rb', line 14

def command_output_silenced?
  @silence == true
end

#get(breadcrumb = nil) ⇒ Object



18
19
20
21
22
23
# File 'lib/objects/orchestrator.rb', line 18

def get(breadcrumb = nil)
  context = ::Bcome::Bootup.traverse(breadcrumb)
  raise Bcome::Exception::NoNodeFoundForBreadcrumb, breadcrumb unless context
  context.load_nodes if context.inventory? && !context.nodes_loaded?
  context
end

#silence_command_output!Object



10
11
12
# File 'lib/objects/orchestrator.rb', line 10

def silence_command_output!
  @silence = true
end