Class: Rubyipmi::Ipmitool::ChassisConfig
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- BaseCommand
- Rubyipmi::Ipmitool::ChassisConfig
- Defined in:
- lib/rubyipmi/ipmitool/commands/chassisconfig.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#cmd, #lastcall, #max_retry_count, #options, #passfile, #result
Instance Method Summary collapse
-
#bootbios(persistent = true) ⇒ Object
shortcut to boot into bios setup.
-
#bootcdrom(persistent = true) ⇒ Object
shortcut to set boot device to cdrom.
-
#bootdevice(device, persistent = false) ⇒ Object
Set the boot device.
-
#bootdevices ⇒ Object
Get list of available boot devices.
-
#bootdisk(persistent = true) ⇒ Object
shortcut to set boot device to disk.
-
#bootpxe(persistent = true) ⇒ Object
shortcut to set boot device to pxe.
-
#initialize(opts = ObservableHash.new) ⇒ ChassisConfig
constructor
A new instance of ChassisConfig.
Methods inherited from BaseCommand
#find_fix, #makecommand, #max_retry_count, #setpass
Methods inherited from BaseCommand
#dump_command, #find_fix, #locate_command, #logger, #makecommand, #removepass, #run, #runcmd, #setpass, #update, #validate_status
Constructor Details
#initialize(opts = ObservableHash.new) ⇒ ChassisConfig
Returns a new instance of ChassisConfig.
3 4 5 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 3 def initialize(opts = ObservableHash.new) super("ipmitool", opts) end |
Instance Method Details
#bootbios(persistent = true) ⇒ Object
shortcut to boot into bios setup
42 43 44 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 42 def bootbios(persistent = true) bootdevice("bios", persistent) end |
#bootcdrom(persistent = true) ⇒ Object
shortcut to set boot device to cdrom
37 38 39 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 37 def bootcdrom(persistent = true) bootdevice("cdrom", persistent) end |
#bootdevice(device, persistent = false) ⇒ Object
Set the boot device
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 8 def bootdevice(device, persistent = false) if persistent @options["cmdargs"] = "chassis bootdev #{device}" else @options["cmdargs"] = "chassis bootparam set bootflag force_#{device}" end value = runcmd @options.delete_notify("cmdargs") value end |
#bootdevices ⇒ Object
Get list of available boot devices
20 21 22 23 24 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 20 def bootdevices # ideally we should get this list from the ipmidevice # However ipmitool only has a static list ["pxe", "disk", "safe", "diag", "cdrom", "bios", "floppy"] end |
#bootdisk(persistent = true) ⇒ Object
shortcut to set boot device to disk
32 33 34 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 32 def bootdisk(persistent = true) bootdevice("disk", persistent) end |
#bootpxe(persistent = true) ⇒ Object
shortcut to set boot device to pxe
27 28 29 |
# File 'lib/rubyipmi/ipmitool/commands/chassisconfig.rb', line 27 def bootpxe(persistent = true) bootdevice("pxe", persistent) end |