class Crowbar::Client::Command::Database::Create

Implementation for the database create command

Public Instance Methods

args_with_options() click to toggle source
# File lib/crowbar/client/command/database/create.rb, line 29
def args_with_options
  args.easy_merge!(
    db_username: options.db_username,
    db_password: options.db_password
  )
end
execute() click to toggle source
# File lib/crowbar/client/command/database/create.rb, line 42
def execute
  request.process do |request|
    case request.code
    when 200
      say "Successfully created database"
    else
      err request.parsed_response["error"]
    end
  end
end
request() click to toggle source
# File lib/crowbar/client/command/database/create.rb, line 36
def request
  @request ||= Request::Database::Create.new(
    args_with_options
  )
end