class Crowbar::Client::Command::Node::Identify

Implementation for the node identify command

Public Instance Methods

execute() click to toggle source
# File lib/crowbar/client/command/node/identify.rb, line 35
def execute
  request.process do |request|
    case request.code
    when 200
      say "Successfully triggered identify for #{args.name}"
    when 404
      err "Node does not exist"
    else
      err request.parsed_response["error"]
    end
  end
end
request() click to toggle source
# File lib/crowbar/client/command/node/identify.rb, line 27
def request
  @request ||= Request::Node::Identify.new(
    args.easy_merge(
      action: :identify
    )
  )
end