Class: Crowbar::Client::Command::Base

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::NumberHelper
Defined in:
lib/crowbar/client/command/base.rb

Overview

Base that provides methods shared between command implementations

Direct Known Subclasses

Crowbar::Client::Command::Backup::Create, Crowbar::Client::Command::Backup::Delete, Crowbar::Client::Command::Backup::Download, Crowbar::Client::Command::Backup::List, Crowbar::Client::Command::Backup::Restore, Crowbar::Client::Command::Backup::Upload, Crowbar::Client::Command::Barclamp::List, Crowbar::Client::Command::Batch::Export, Database::Connect, Database::Create, Database::Test, HostIP::Allocate, HostIP::Deallocate, Installer::Start, Installer::Status, Interface::Disable, Interface::Enable, Node::Allocate, Node::Delete, Node::Group, Node::Hardware, Node::Identify, Node::List, Node::Powercycle, Node::Poweroff, Node::Poweron, Node::Reboot, Node::Reinstall, Node::Rename, Node::Reset, Node::Role, Node::Show, Node::Shutdown, Node::Status, Node::Transition, Proposal::Commit, Proposal::Create, Proposal::Delete, Proposal::Dequeue, Proposal::Edit, Proposal::List, Proposal::Reset, Proposal::Show, Repository::Activate, Repository::ActivateAll, Repository::Deactivate, Repository::DeactivateAll, Repository::List, Restricted::Allocate, Restricted::Ping, Restricted::Show, Restricted::Transition, Role::List, Role::Show, Server::Api, Server::Check, Services::ClearServiceRestart, Services::ListRestartFlags, Services::ListServiceRestarts, Services::SetRestartFlag, Ses::Upload, Upgrade::Admin, Upgrade::Backup, Upgrade::Cancel, Upgrade::Database, Upgrade::Mode, Upgrade::Nodes, Upgrade::Prechecks, Upgrade::Prepare, Upgrade::Repocheck, Upgrade::Services, Upgrade::Status, VirtualIP::Allocate, VirtualIP::Deallocate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdin, stdout, stderr, options = {}, args = {}) ⇒ Base

Returns a new instance of Base.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/crowbar/client/command/base.rb', line 35

def initialize(stdin, stdout, stderr, options = {}, args = {})
  self.stdin = stdin
  self.stdout = stdout
  self.stderr = stderr

  self.options = Hashie::Mash.new(
    options
  )

  self.args = Hashie::Mash.new(
    args
  )

  checks
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



33
34
35
# File 'lib/crowbar/client/command/base.rb', line 33

def args
  @args
end

#optionsObject

Returns the value of attribute options.



32
33
34
# File 'lib/crowbar/client/command/base.rb', line 32

def options
  @options
end

#stderrObject

Returns the value of attribute stderr.



31
32
33
# File 'lib/crowbar/client/command/base.rb', line 31

def stderr
  @stderr
end

#stdinObject

Returns the value of attribute stdin.



29
30
31
# File 'lib/crowbar/client/command/base.rb', line 29

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



30
31
32
# File 'lib/crowbar/client/command/base.rb', line 30

def stdout
  @stdout
end