Sha256: 6d76deb4b8555e1211ba3e1dcd4c9e9bec3bb00c3a9ded11fa9790e593ef2dbb

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

module Rubyipmi::Freeipmi

  class BmcDevice < Rubyipmi::Freeipmi::BaseCommand

    def initialize(opts = ObservableHash.new)
      super("bmc-device", opts)
    end

    # runs a command like bmc-device --cold-reset
    def command(opt)
      @options[opt] = false
      value = runcmd
      @options.delete_notify(opt)
      return value
    end

    # reset the bmc device, useful for debugging and troubleshooting
    def reset(type='cold')
      if ['cold', 'warm'].include?(type)
        key = "#{type}-reset"
        command(key)
      else
        raise "reset type: #{type} is not a valid choice, use warm or cold"
      end
    end



  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyipmi-0.8.1 lib/rubyipmi/freeipmi/commands/bmcdevice.rb
rubyipmi-0.7.0 lib/rubyipmi/freeipmi/commands/bmcdevice.rb
rubyipmi-0.6.0 lib/rubyipmi/freeipmi/commands/bmcdevice.rb