kontron / python-ipmi

A pure python IPMI library
GNU Lesser General Public License v2.1
187 stars 74 forks source link

read_fru_data function problem #96

Closed mgdsxhy closed 3 years ago

mgdsxhy commented 3 years ago

env: python 3.7.8 python-ipmi 0.5.1

I want to get the following information through pyipmi image I tried read_fru_data() function, but get the following image How to return a JSON or object object?(Why not return a JSON or object) Is there any other way?

hthiery commented 3 years ago

Hi, try to use get_fru_inventory(). That returns a FruInventory object. Feel free to add a method to return the data as json. Take a look at https://github.com/kontron/python-ipmi/blob/master/pyipmi/ipmitool.py#L210 as an example.

hthiery commented 3 years ago

was your issue solved?