class Crowbar::Client::Command::Installer::Start

Implementation for the installer start command

Public Instance Methods

execute() click to toggle source
# File lib/crowbar/client/command/installer/start.rb, line 35
def execute
  request.process do |request|
    case request.code
    when 200
      say "Triggered installation process"
    when 226
      say "Crowbar already installing"
    when 412
      say "Network validation failed"
    when 410
      say "Installation is already done"
    when 501
      err "Platform is not supported"
    else
      err request.parsed_response["error"]
    end
  end
end
request() click to toggle source
# File lib/crowbar/client/command/installer/start.rb, line 27
def request
  @request ||= Request::Installer::Start.new(
    args.easy_merge(
      force: options.force
    )
  )
end