Class: Command::NodeInstall
- Inherits:
-
CrowbarNodeCommand
- Object
- BasicCommand
- CrowbarCommand
- CrowbarNodeCommand
- Command::NodeInstall
- Defined in:
- lib/command/node_install.rb
Overview
Allows to install node
Instance Attribute Summary collapse
-
#bios_name ⇒ Object
readonly
Returns the value of attribute bios_name.
-
#node_name ⇒ Object
readonly
Returns the value of attribute node_name.
-
#raid_name ⇒ Object
readonly
Returns the value of attribute raid_name.
Attributes inherited from BasicCommand
Instance Method Summary collapse
-
#exec ⇒ Object
Method to call crowbar receiver for install a node.
-
#initialize(node_name, bios_name = nil, raid_name = nil) ⇒ NodeInstall
constructor
Default constructor.
Constructor Details
#initialize(node_name, bios_name = nil, raid_name = nil) ⇒ NodeInstall
Default constructor
20 21 22 23 24 25 26 |
# File 'lib/command/node_install.rb', line 20 def initialize(node_name, bios_name = nil, raid_name = nil) super() @logger.info("Command::NodeInstall initialize the parameters...") @node_name = node_name @bios_name = bios_name @raid_name = raid_name end |
Instance Attribute Details
#bios_name ⇒ Object (readonly)
Returns the value of attribute bios_name.
11 12 13 |
# File 'lib/command/node_install.rb', line 11 def bios_name @bios_name end |
#node_name ⇒ Object (readonly)
Returns the value of attribute node_name.
10 11 12 |
# File 'lib/command/node_install.rb', line 10 def node_name @node_name end |
#raid_name ⇒ Object (readonly)
Returns the value of attribute raid_name.
12 13 14 |
# File 'lib/command/node_install.rb', line 12 def raid_name @raid_name end |
Instance Method Details
#exec ⇒ Object
Method to call crowbar receiver for install a node
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/command/node_install.rb', line 30 def exec() if @raid_name.nil? @raid_name = "JBODOnly" end if !@bios_name.nil? && !@raid_name.nil? @receiver.(@node_name, @bios_name, @raid_name) end if @bios_name.nil? && !@raid_name.nil? @receiver.(@node_name, @raid_name) end @receiver.(@node_name) end |