Class: Command::NodeReinstall
- Inherits:
-
CrowbarNodeCommand
- Object
- BasicCommand
- CrowbarCommand
- CrowbarNodeCommand
- Command::NodeReinstall
- Defined in:
- lib/command/node_reinstall.rb
Overview
Allows to reinstall a 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 reinstall a node.
-
#initialize(node_name, bios_name = nil, raid_name = nil) ⇒ NodeReinstall
constructor
Default constructor.
Constructor Details
#initialize(node_name, bios_name = nil, raid_name = nil) ⇒ NodeReinstall
Default constructor
20 21 22 23 24 25 26 |
# File 'lib/command/node_reinstall.rb', line 20 def initialize(node_name, bios_name = nil, raid_name = nil) super() @logger.info("Command::NodeReinstall 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_reinstall.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_reinstall.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_reinstall.rb', line 12 def raid_name @raid_name end |
Instance Method Details
#exec ⇒ Object
Method to call crowbar receiver for reinstall a node
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/command/node_reinstall.rb', line 30 def exec() if @raid_name.nil? @receiver.(@node_name, "JBODOnly") else @receiver.(@node_name, @raid_name) end if !@bios_name.nil? @receiver.(@node_name, @bios_name) end @receiver.(@node_name) end |