class Crowbar::Client::Command::Node::Role

Implementation for the node role command

Public Instance Methods

execute() click to toggle source
# File lib/crowbar/client/command/node/role.rb, line 31
def execute
  request.process do |request|
    case request.code
    when 200
      say "Successfully updated role 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/role.rb, line 25
def request
  @request ||= Request::Node::Role.new(
    args
  )
end