class Rubyipmi::Ipmitool::ChassisConfig

Public Class Methods

new(opts = ObservableHash.new) click to toggle source
Calls superclass method Rubyipmi::BaseCommand::new
# File lib/rubyipmi/ipmitool/commands/chassisconfig.rb, line 3
def initialize(opts = ObservableHash.new)
  super("ipmitool", opts)
end

Public Instance Methods

bootbios(persistent = true) click to toggle source

shortcut to boot into bios setup

# File lib/rubyipmi/ipmitool/commands/chassisconfig.rb, line 42
def bootbios(persistent = true)
  bootdevice("bios", persistent)
end
bootcdrom(persistent = true) click to toggle source

shortcut to set boot device to cdrom

# File lib/rubyipmi/ipmitool/commands/chassisconfig.rb, line 37
def bootcdrom(persistent = true)
  bootdevice("cdrom", persistent)
end
bootdevice(device, persistent = false) click to toggle source

Set the boot device

# 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() click to toggle source

Get list of available boot devices

# 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) click to toggle source

shortcut to set boot device to disk

# File lib/rubyipmi/ipmitool/commands/chassisconfig.rb, line 32
def bootdisk(persistent = true)
  bootdevice("disk", persistent)
end
bootpxe(persistent = true) click to toggle source

shortcut to set boot device to pxe

# File lib/rubyipmi/ipmitool/commands/chassisconfig.rb, line 27
def bootpxe(persistent = true)
  bootdevice("pxe", persistent)
end