Skip to content
Commit a9f68bb5 authored by Tony Lee's avatar Tony Lee Committed by Ed Tanous
Browse files

pcie: Fixed return nothing when get PCIeDeviceId



GET /redfish/v1/Systems/system/PCIeDevices/<str> nothing will be
returned if their 'generationInUse' is Unknown.
The original intention is that if it is Unknown, there is no need to
display '"PCIeType"'. But the others still have to show.

After fix:
PCIeType is not Unknown:
GET http://${bmc}/redfish/v1/Systems/system/PCIeDevices/<str>
{
  "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<str>.",
  "@odata.type": "#PCIeDevice.v1_4_0.PCIeDevice",
  "DeviceType": "SingleFunction",
  "Id": "<str>",
  "Manufacturer": "Intel Corporation",
  "Name": "PCIe Device",
  "PCIeFunctions": {
"@odata.id":
"/redfish/v1/Systems/system/PCIeDevices/<str>/PCIeFunctions"
  },
  "PCIeInterface": {
    "PCIeType": "Gen1"
  }
}

PCIeType is Unknown:
GET http://${bmc}/redfish/v1/Systems/system/PCIeDevices/<str>
{
  "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<str>",
  "@odata.type": "#PCIeDevice.v1_4_0.PCIeDevice",
  "DeviceType": "SingleFunction",
  "Id": "<str>",
  "Manufacturer": "Intel Corporation",
  "Name": "PCIe Device",
  "PCIeFunctions": {
    "@odata.id":
    "/redfish/v1/Systems/system/PCIeDevices/<str>/PCIeFunctions"
  }
}

Signed-off-by: default avatarTony Lee <tony.lee@quantatw.com>
Change-Id: I85a97e0370a5789e4526964272381a557ce942a0
parent bbd80db8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment