Add Location information for PCIeDevice
This commit is to add location information according to the Redfish
PCIeDevice schema. If the
`xyz.openbmc_project.Inventory.Decorator.LocationCode` interface does
not exist, the location information property is not displayed.
The Redfish PCIeDevice schema includes a Location property under Slot.
Get the Location from PCIeSlot.
ref: https://redfish.dmtf.org/schemas/v1/PCIeDevice.v1_19_0.json
Tested: Validator passed
curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices/pcie_card2
```
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card2",
"@odata.type": "#PCIeDevice.v1_19_0.PCIeDevice",
"Id": "pcie_card2",
"Links": {
"Processors": [
{
"@odata.id": "/redfish/v1/Systems/system/Processors/cpu1"
}
],
"Processors@odata.count": 1
},
"Name": "PCIe Device",
"PCIeFunctions": {
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card2/PCIeFunctions"
},
"PCIeInterface": {
"LanesInUse": null
},
"Slot": {
"Location": {
"PartLocation": {
"ServiceLabel": "U78DA.N00.1234567-P0-C2"
}
},
"SlotType": "FullLength"
},
"Status": {
"Health": "OK",
"State": "Absent"
}
}
```
Change-Id: Iba1b98734fdfee43c2995f6c9f1f2660e196814a
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Signed-off-by: Crystal Huang <crzhuang1@gmail.com> C
Crystal Huang committed
d4a74284abc8c74effd7e25ce3cc75d3c44295f3
Parent: f9563f6