lib/rubyipmi/freeipmi/connection.rb in rubyipmi-0.6.0 vs lib/rubyipmi/freeipmi/connection.rb in rubyipmi-0.7.0
- old
+ new
@@ -12,19 +12,19 @@
class Connection
attr_accessor :options
- def initialize(user, pass, host)
+ 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
def provider
return "freeipmi"
@@ -42,9 +42,23 @@
@chassis ||= Rubyipmi::Freeipmi::Chassis.new(@options)
end
def sensors
@sensors ||= Rubyipmi::Freeipmi::Sensors.new(@options)
+ end
+
+ 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
end
end
end