Class: Command::CrowbarClusterAllocate
- Inherits:
-
CrowbarCommand
- Object
- BasicCommand
- CrowbarCommand
- Command::CrowbarClusterAllocate
- Defined in:
- lib/command/crowbar_cluster_allocate.rb
Overview
CrowbarCommand implementation for list Crowbar nodes.
Instance Attribute Summary collapse
-
#cluster_name ⇒ Object
readonly
Returns the value of attribute cluster_name.
-
#list_nodes ⇒ Object
readonly
Returns the value of attribute list_nodes.
Attributes inherited from BasicCommand
Instance Method Summary collapse
-
#exec ⇒ Object
Run the command on receiver.
-
#initialize(logger, cluster_name, all_nodes, list_node = nil) ⇒ CrowbarClusterAllocate
constructor
Default constructor.
Constructor Details
#initialize(logger, cluster_name, all_nodes, list_node = nil) ⇒ CrowbarClusterAllocate
Default constructor
23 24 25 26 27 28 29 |
# File 'lib/command/crowbar_cluster_allocate.rb', line 23 def initialize(logger, cluster_name, all_nodes, list_node = nil) super(logger) @logger.info("Command::CrowbarClusterAllocate initialize the parameters...") @list_node = list_node @all_nodes = all_nodes @cluster_name = cluster_name end |
Instance Attribute Details
#cluster_name ⇒ Object (readonly)
Returns the value of attribute cluster_name.
18 19 20 |
# File 'lib/command/crowbar_cluster_allocate.rb', line 18 def cluster_name @cluster_name end |
#list_nodes ⇒ Object (readonly)
Returns the value of attribute list_nodes.
17 18 19 |
# File 'lib/command/crowbar_cluster_allocate.rb', line 17 def list_nodes @list_nodes end |
Instance Method Details
#exec ⇒ Object
Run the command on receiver.
34 35 36 37 38 39 40 |
# File 'lib/command/crowbar_cluster_allocate.rb', line 34 def exec() output = "" output += @receiver.(@cluster_name, @all_nodes, @list_node) return output end |