# File lib/rubyipmi/freeipmi/commands/bmcinfo.rb, line 11 def guid options["get-device-guid"] = false status = runcmd options.delete_notify("get-device-guid") if not status raise @result else @result.chomp.strip end end
# File lib/rubyipmi/freeipmi/commands/bmcinfo.rb, line 23 def retrieve bmcinfo = {} status = runcmd subkey = nil if not status raise @result else @result.lines.each do |line| # clean up the data from spaces item = line.split(':') key = item.first.strip value = item.last.strip # if the following condition is met we have subvalues if key == value and not subkey subkey = key bmcinfo[subkey] = [] elsif key == value and subkey # subvalue found bmcinfo[subkey] << value.gsub(/\[|\]/, "") else # Normal key/value pair with no subkeys subkey = nil bmcinfo[key] = value end end return bmcinfo end end
Generated with the Darkfish Rdoc Generator 2.