Class: Command::ClusterCreate
- Inherits:
-
CrowbarNodeCommand
- Object
- BasicCommand
- CrowbarCommand
- CrowbarNodeCommand
- Command::ClusterCreate
- Defined in:
- lib/command/cluster_create.rb
Overview
Allows to create a cluster
Instance Attribute Summary collapse
-
#cluster_name ⇒ Object
readonly
Returns the value of attribute cluster_name.
-
#cpu_weight ⇒ Object
readonly
Returns the value of attribute cpu_weight.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#mask ⇒ Object
readonly
Returns the value of attribute mask.
-
#network_address ⇒ Object
readonly
Returns the value of attribute network_address.
-
#ram ⇒ Object
readonly
Returns the value of attribute ram.
-
#vlan_id ⇒ Object
readonly
Returns the value of attribute vlan_id.
Attributes inherited from BasicCommand
Instance Method Summary collapse
-
#exec ⇒ Object
The method allow to create cluster.
-
#initialize(cluster_name, network_address, network_mask, cpu_weight = nil, ram = nil, vlan_id = nil, description = nil) ⇒ ClusterCreate
constructor
Default constructor.
Constructor Details
#initialize(cluster_name, network_address, network_mask, cpu_weight = nil, ram = nil, vlan_id = nil, description = nil) ⇒ ClusterCreate
Default constructor.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/command/cluster_create.rb', line 28 def initialize(cluster_name, network_address, network_mask, cpu_weight = nil, ram = nil, vlan_id = nil, description = nil) super() @logger.info("Command::ClusterCreate initialize the parameters...") @cluster_name = cluster_name @network_address = network_address @cpu_weight = cpu_weight @ram = ram @description = description @vlan_id = vlan_id @mask = network_mask end |
Instance Attribute Details
#cluster_name ⇒ Object (readonly)
Returns the value of attribute cluster_name.
10 11 12 |
# File 'lib/command/cluster_create.rb', line 10 def cluster_name @cluster_name end |
#cpu_weight ⇒ Object (readonly)
Returns the value of attribute cpu_weight.
13 14 15 |
# File 'lib/command/cluster_create.rb', line 13 def cpu_weight @cpu_weight end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
15 16 17 |
# File 'lib/command/cluster_create.rb', line 15 def description @description end |
#mask ⇒ Object (readonly)
Returns the value of attribute mask.
12 13 14 |
# File 'lib/command/cluster_create.rb', line 12 def mask @mask end |
#network_address ⇒ Object (readonly)
Returns the value of attribute network_address.
11 12 13 |
# File 'lib/command/cluster_create.rb', line 11 def network_address @network_address end |
#ram ⇒ Object (readonly)
Returns the value of attribute ram.
14 15 16 |
# File 'lib/command/cluster_create.rb', line 14 def ram @ram end |
#vlan_id ⇒ Object (readonly)
Returns the value of attribute vlan_id.
16 17 18 |
# File 'lib/command/cluster_create.rb', line 16 def vlan_id @vlan_id end |
Instance Method Details
#exec ⇒ Object
The method allow to create cluster
42 43 44 45 46 47 48 |
# File 'lib/command/cluster_create.rb', line 42 def exec() output = "" output += @receiver.(@cluster_name, @network_address, @mask, @cpu_weight, @ram, @vlan_id, @description) return output end |