Parent

Rubyipmi::Freeipmi::Connection

Attributes

options[RW]

Public Class Methods

new(user, pass, host,debug=false) click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 17
def initialize(user, pass, host,debug=false)
  @options = Rubyipmi::ObservableHash.new
  raise("Must provide a host to connect to") unless host
  @options["hostname"] = host
  # Credentials can also be stored in the freeipmi configuration file
  # So they are not required
  @options["username"] = user if user
  @options["password"] = pass if pass
  #@options["driver-type"] = 'LAN_2_0'
  #getWorkArounds
end

Public Instance Methods

bmc() click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 37
def bmc
  @bmc ||= Rubyipmi::Freeipmi::Bmc.new(@options)
end
chassis() click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 41
def chassis
  @chassis ||= Rubyipmi::Freeipmi::Chassis.new(@options)
end
fru() click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 33
def fru
  @fru ||= Rubyipmi::Freeipmi::Fru.new(@options)
end
get_diag() click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 49
def get_diag
  data = {}
  data['provider'] = provider
  if @fru
    data['frus'] = @fru.getfrus
  end
  if @sensors
    data['sensors'] = @sensors.getsensors
  end
  if @bmc
    data['bmc_info'] = @bmc.info
  end
end
provider() click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 29
def provider
  return "freeipmi"
end
sensors() click to toggle source
# File lib/rubyipmi/freeipmi/connection.rb, line 45
def sensors
  @sensors ||= Rubyipmi::Freeipmi::Sensors.new(@options)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.