#
5bfb0dcb |
| 01-May-2021 |
George Liu <liuxiwei@inspur.com> |
Refactor buildFRUTable and update to Association tree
The previous logic is to obtain the entity of the parent by parsing the DBus object path. If the obtaining fails it skipped the current entity
t
Refactor buildFRUTable and update to Association tree
The previous logic is to obtain the entity of the parent by parsing the DBus object path. If the obtaining fails it skipped the current entity
type and continued to obtain the entity of the next parent.
In this commit the code is optimised to not skip the current entity type.
The intent behind this commit is to refactor the buildFRUTable method and their pldm entities need to be created in turn according to the object path and update the association tree.
Tested: There is one CPU, one DIMM, two powersupplies on my system ~# pldmtool platform getpdr -d 6 { "nextRecordHandle": 7, "responseCount": 26, "recordHandle": 6, "PDRHeaderVersion": 1, "PDRType": "Entity Association PDR", "recordChangeNumber": 0, "dataLength": 16, "containerID": 1, "associationType": "Physical", "containerEntityType": "System (logical)", "containerEntityInstanceNumber": 1, "containerEntityContainerID": 0, "containedEntityCount": 1, "containedEntityType[1]": "System chassis (main enclosure)", "containedEntityInstanceNumber[1]": 1, "containedEntityContainerID[1]": 1 }
~# pldmtool platform getpdr -d 7 { "nextRecordHandle": 8, "responseCount": 26, "recordHandle": 7, "PDRHeaderVersion": 1, "PDRType": "Entity Association PDR", "recordChangeNumber": 0, "dataLength": 16, "containerID": 2, "associationType": "Physical", "containerEntityType": "System chassis (main enclosure)", "containerEntityInstanceNumber": 1, "containerEntityContainerID": 1, "containedEntityCount": 1, "containedEntityType[1]": "System Board", "containedEntityInstanceNumber[1]": 1, "containedEntityContainerID[1]": 2 }
~# pldmtool platform getpdr -d 8 { "nextRecordHandle": 9, "responseCount": 44, "recordHandle": 8, "PDRHeaderVersion": 1, "PDRType": "Entity Association PDR", "recordChangeNumber": 0, "dataLength": 34, "containerID": 3, "associationType": "Physical", "containerEntityType": "System Board", "containerEntityInstanceNumber": 1, "containerEntityContainerID": 2, "containedEntityCount": 4, "containedEntityType[1]": "Processor", "containedEntityInstanceNumber[1]": 1, "containedEntityContainerID[1]": 3, "containedEntityType[2]": "Memory chip", "containedEntityInstanceNumber[2]": 1, "containedEntityContainerID[2]": 3, "containedEntityType[3]": "Power Supply", "containedEntityInstanceNumber[3]": 1, "containedEntityContainerID[3]": 3, "containedEntityType[4]": "Power Supply", "containedEntityInstanceNumber[4]": 2, "containedEntityContainerID[4]": 3 }
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ie375ea448d850450101c85fa818498db0b67cc1f
show more ...
|
#
a137f903 |
| 04-Jun-2021 |
Jayashankar Padath <jayashankar.padath@in.ibm.com> |
fru: Add new inventory items in the fru parser
Add new inventory items to the FRU list like Drive backplane, Card, Fan, Battery, Connector and Slot. This generates new FRU Record Set PDRs and Entity
fru: Add new inventory items in the fru parser
Add new inventory items to the FRU list like Drive backplane, Card, Fan, Battery, Connector and Slot. This generates new FRU Record Set PDRs and Entity Association PDRs and updates the existing ones.
Test Results:
1. RTC FRU Record Set PDR o/p
pldmtool platform GetPDR -d 23 { "nextRecordHandle": 24, "responseCount": 20, "recordHandle": 23, "PDRHeaderVersion": 1, "PDRType": "FRU Record Set PDR", "recordChangeNumber": 0, "dataLength": 10, "PLDMTerminusHandle": 0, "FRURecordSetIdentifier": 23, "entityType": "Battery", "entityInstanceNumber": 1, "containerID": 3 }
2. Entity Association PDR for Card
pldmtool platform GetPDR -d 33 { "nextRecordHandle": 34, "responseCount": 32, "recordHandle": 33, "PDRHeaderVersion": 1, "PDRType": "Entity Association PDR", "recordChangeNumber": 0, "dataLength": 22, "containerID": 7, "associationType": "Physical", "containerEntityType": "Card", "containerEntityInstanceNumber": 3, "containerEntityContainerID": 3, "containedEntityCount": 2, "containedEntityType[1]": "Connector", "containedEntityInstanceNumber[1]": 1, "containedEntityContainerID[1]": 7, "containedEntityType[2]": "Connector", "containedEntityInstanceNumber[2]": 2, "containedEntityContainerID[2]": 7 }
Signed-off-by: Jayashankar Padath <jayashankar.padath@in.ibm.com> Change-Id: I66aff87f00aa9eb17ea845a71710253cea7c6d83
show more ...
|