Sha256: aa76e4213f64a305d14a95e56b29b1a39fb9d34e47d7807e91504cdac497d3ca

Contents?: true

Size: 1.06 KB

Versions: 23

Compression:

Stored size: 1.06 KB

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: {})
    when ProconBypassMan::RemotePbmAction::ACTION_RESTORE_SETTING
      ProconBypassMan::RemotePbmAction::RestorePbmSettingAction.new(pbm_job_uuid: uuid).run!(job_args: job_args)
    else
      raise "#{action}は対応していないアクションです"
    end
  rescue ProconBypassMan::RemotePbmAction::ActionUnexpectedError => e
    ProconBypassMan::SendErrorCommand.execute(error: e)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.5 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.2.2 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.2.1 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.2.0 lib/procon_bypass_man/remote_pbm_action/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.23 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.22 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.21 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.20.2 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.20.1 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.20 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.19.1 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.19 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb
procon_bypass_man-0.1.18 lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb