class Bcome::Registry::Command::Internal

Public Instance Methods

do_constantize_orch_klass() click to toggle source
# File lib/objects/registry/command/internal.rb, line 23
def do_constantize_orch_klass
  klass_name = "Bcome::Orchestration::#{@data[:orch_klass]}"
  begin
    klass_name.constantize
  rescue NameError
    raise Bcome::Exception::CannotFindInternalRegistryKlass, "'#{@data[:console_command]}'. #{klass_name} does not exist. Make sure you've created this class inside your orchestration folder in bcome/orchestration"
  end
end
execute(node, arguments) click to toggle source

In which the bcome context is an internal (extended framework) call

# File lib/objects/registry/command/internal.rb, line 7
def execute(node, arguments)
  merged_arguments = process_arguments(arguments)
  orchestrator = orch_klass.new(node, merged_arguments)
  orchestrator.do_execute
rescue Interrupt
  puts "\nExiting gracefully from interrupt\n".warning
end
expected_keys() click to toggle source
# File lib/objects/registry/command/internal.rb, line 32
def expected_keys
  super + [:orch_klass]
end
orch_klass() click to toggle source
# File lib/objects/registry/command/internal.rb, line 19
def orch_klass
  @orch_klass ||= do_constantize_orch_klass
end
validate(*params) click to toggle source
Calls superclass method Bcome::Registry::Command::Base#validate
# File lib/objects/registry/command/internal.rb, line 15
def validate(*params)
  super
end