Inventory update for Fru

Vijay Khemka vijaykhemka at fb.com
Sat Oct 27 04:17:23 AEDT 2018


Hi,
I am trying to read FRU information from our system. I don’t see all fields updated in the destination files. Specially I don’t see custom field at all. I debug through code and found that we read eeprom and create object based on config.yaml which has all the information in terms of key-value pair. But I have no clue after this object is sent to dbus and finally printed in output file. I am unable to find source who does this object and write to output file. Any advice here would be appreciated. Also please send me some examples from your own implementations. Below are config and output files and some debug prints.

Config.yaml:
==========

0x56:

  /system/chassis/motherboard:

    entityID: 7

    entityInstance: 1

    interfaces:

      xyz.openbmc_project.Inventory.Decorator.Asset:

        BuildDate:

          IPMIFruProperty: Mfg Date

          IPMIFruSection: Board

        PartNumber:

          IPMIFruProperty: Part Number

          IPMIFruSection: Board

        Manufacturer:

          IPMIFruProperty: Manufacturer

          IPMIFruSection: Board

        SerialNumber:

          IPMIFruProperty: Serial Number

          IPMIFruSection: Board

      xyz.openbmc_project.Inventory.Item:

        PrettyName:

          IPMIFruProperty: Name

          IPMIFruSection: Board

        CustomField1:

          IPMIFruProperty: Custom Field 1

          IPMIFruSection: Board

        CustomField2:

          IPMIFruProperty: Custom Field 2

          IPMIFruSection: Board

  /system/chassis:

    entityID: 23

    entityInstance: 1

    interfaces:

      xyz.openbmc_project.Inventory.Decorator.Asset:

        SerialNumber:

          IPMIFruProperty: Serial Number

          IPMIFruSection: Chassis

        PartNumber:

          IPMIFruProperty: Part Number

          IPMIFruSection: Chassis

        Model:

          IPMIFruProperty: Type

          IPMIFruSection: Chassis

        CustomField1:

          IPMIFruProperty: Custom Field 1

          IPMIFruSection: Chassis

        CustomField2:

          IPMIFruProperty: Custom Field 2

          IPMIFruSection: Chassis

  /system:

    entityID: 3

    entityInstance: 1

    interfaces:

      xyz.openbmc_project.Inventory.Decorator.Asset:

        SerialNumber:

          IPMIFruProperty: Serial Number

          IPMIFruSection: Product

        Manufacturer:

          IPMIFruProperty: Manufacturer

          IPMIFruSection: Product

        Model:

          IPMIFruProperty: Model Number

          IPMIFruSection: Product

        PrettyName:

          IPMIFruProperty: Name

          IPMIFruSection: Product

        Version:

          IPMIFruProperty: Version

          IPMIFruSection: Product

        AssetTag:

          IPMIFruProperty: Asset Tag

          IPMIFruSection: Product

        CustomField1:

          IPMIFruProperty: Custom Field 1

          IPMIFruSection: Product

        CustomField2:

          IPMIFruProperty: Custom Field 2

          IPMIFruSection: Product

Output files:
============
/var/lib/phosphor-inventory-manager/xyz/openbmc_project/inventory/system/xyz.openbmc_project.Inventory.Decorator.Asset
{
    "value0": {
        "cereal_class_version": 1,
        "value0": "",
        "value1": "WTF17370D2MA1",
        "value2": "Wiwynn",
        "value3": "",
        "value4": "B81.00X01.0104"
    }
}
/var/lib/phosphor-inventory-manager/xyz/openbmc_project/inventory/system/chassis/xyz.openbmc_project.Inventory.Decorator.Asset
{
    "value0": {
        "cereal_class_version": 1,
        "value0": "B81.00X01.0104",
        "value1": "WTF17370D2MA1",
        "value2": "",
        "value3": "",
        "value4": "23"
    }
}
/var/lib/phosphor-inventory-manager/xyz/openbmc_project/inventory/system/chassis/motherboard/xyz.openbmc_project.Inventory.Decorator.Asset
{
    "value0": {
        "cereal_class_version": 1,
        "value0": "B81.00X10.0109",
        "value1": "WTH1734038ZSA",
        "value2": "Wistron",
        "value3": "2017-08-26 - 19:17:00",
        "value4": ""
    }
}

I don’t see all field populated and when I debug and found that It takes all field from config and populate everything in object before sending to dbus. Please see below.

Product:Name:Type6 Tioga Pass Single Side
Product:Asset Tag:3718452
Product:Serial Number:WTF17370D2MA1
Product:Version:PVT
Product:Custom Field 1:01-002572
Product:Model Number:B81.00X01.0104
Product:Custom Field 2:1505546857
Product:Manufacturer:Wiwynn
Board:Part Number:B81.00X10.0109
Board:Serial Number:WTH1734038ZSA
Board:Mfg Date:2017-08-26 - 19:17:00
Board:Manufacturer:Wistron
Board:Custom Field 1:02-000243
Board:Custom Field 2:LBG-1G
Board:Name:Tioga Pass Single Side
Chassis:Custom Field 1:M7MX546700026
Chassis:Part Number:B81.00X01.0104
Chassis:Custom Field 2:M71C9N5700774
Chassis:Serial Number:WTF17370D2MA1
Chassis:Type:23

Please advise if I am missing anything and location of source who is writing finally to output file and what is driving to restrict number of fields.

Regards
-Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20181026/f291b8a7/attachment-0001.html>


More information about the openbmc mailing list