Sha256: 4c948c69d0151c3a03d2982c430d539fc6d9211258a74b07f038711db88b2943

Contents?: true

Size: 954 Bytes

Versions: 1

Compression:

Stored size: 954 Bytes

Contents

class ProconBypassMan::RunRemotePbmActionDispatchCommand
  # @param [String] action
  # @param [String] uuid
  # @return [void]
  def self.execute(action: , uuid: , job_args: )
    case action
    when ProconBypassMan::RemotePbmAction::ACTION_CHANGE_PBM_VERSION
      ProconBypassMan::RemotePbmAction::ChangePbmVersionAction.new(pbm_job_uuid: uuid).run!(job_args: job_args)
    when ProconBypassMan::RemotePbmAction::ACTION_STOP_PBM
      ProconBypassMan::RemotePbmAction::StopPbmAction.new(pbm_job_uuid: uuid).run!(job_args: {})
    when ProconBypassMan::RemotePbmAction::ACTION_REBOOT_OS
      ProconBypassMan::RemotePbmAction::RebootOsAction.new(pbm_job_uuid: uuid).run!(job_args: {})
    else
      ProconBypassMan::SendErrorCommand.execute(error: "#{action}は対応していないアクションです")
    end
  rescue ProconBypassMan::RemotePbmAction::ActionUnexpectedError => e
    ProconBypassMan::SendErrorCommand.execute(error: e)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
procon_bypass_man-0.1.14 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb