Class: Wakame::Command::StartService

Inherits:
Object
  • Object
show all
Includes:
Wakame::Command
Defined in:
lib/wakame/command/start_service.rb

Instance Method Summary collapse

Methods included from Wakame::Command

included, #options=, #params

Instance Method Details

#runObject



6
7
8
9
10
11
12
13
# File 'lib/wakame/command/start_service.rb', line 6

def run
  svc = service_cluster.find_service(params[:service_id])
  if svc.nil?
    raise "Unknown Service ID: #{params[:service_id]}"
  end

  trigger_action(Wakame::Actions::StartService.new(svc))
end