Class: Crowbar::Client::Command::Database::Create
- Includes:
- Mixin::Database
- Defined in:
- lib/crowbar/client/command/database/create.rb
Overview
Implementation for the database create command
Constant Summary
Constants included from Mixin::Database
Mixin::Database::REGEX_DATABASE, Mixin::Database::REGEX_HOSTNAME, Mixin::Database::REGEX_IPV4, Mixin::Database::REGEX_PASSWORD, Mixin::Database::REGEX_PORT, Mixin::Database::REGEX_USERNAME
Instance Attribute Summary
Attributes inherited from Base
#args, #options, #stderr, #stdin, #stdout
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Crowbar::Client::Command::Base
Instance Method Details
#args_with_options ⇒ Object
29 30 31 32 33 34 |
# File 'lib/crowbar/client/command/database/create.rb', line 29 def args.easy_merge!( db_username: .db_username, db_password: .db_password ) end |
#execute ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# 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 |