Home
last modified time | relevance | path

Searched hist:d87fdd9e (Results 1 – 1 of 1) sorted by relevance

/openbmc/bmcweb/redfish-core/lib/
H A Dpcie_slots.hppd87fdd9e Tue May 02 16:50:31 CDT 2023 Lakshmi Yadlapati <lakshmiy@us.ibm.com> Fix internal error caused by unknown PCIe SlotType

Previously, when the SlotType field of a PCIeSlot object in D-Bus was
set to xyz.openbmc_project.Inventory.Item.PCIeSlot.SlotTypes.Unknown,
pcie_slots was returning an internal service error. This commit
updates the code to not return the SlotType if it is unknown.

Tested: Validator passed

'''
busctl get-property -j xyz.openbmc_project.Inventory.Manager \
/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane1/nvme5 \
xyz.openbmc_project.Inventory.Item.PCIeSlot SlotType
{
"type" : "s",
"data" : "xyz.openbmc_project.Inventory.Item.PCIeSlot.SlotTypes.Unknown"
}

curl -k https://$bmc/redfish/v1/Chassis/chassis/PCIeSlots
{
"@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots",
"@odata.type": "#PCIeSlots.v1_4_1.PCIeSlots",
"Id": "1",
"Name": "PCIe Slot Information",
"Slots": [
{
"HotPluggable": false,
"Lanes": 0
},
.....
}

busctl get-property -j xyz.openbmc_project.Inventory.Manager \
/xyz/openbmc_project/inventory/system/chassis/motherboard/pcieslot9 \
xyz.openbmc_project.Inventory.Item.PCIeSlot SlotType
{
"type" : "s",
"data" : "xyz.openbmc_project.Inventory.Item.PCIeSlot.SlotTypes.FullLength"
}

curl -k https://$bmc/redfish/v1/Chassis/chassis/PCIeSlots
{
"@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots",
"@odata.type": "#PCIeSlots.v1_4_1.PCIeSlots",
"Id": "1",
"Name": "PCIe Slot Information",
"Slots": [
{
"HotPluggable": false,
"Lanes": 0
"SlotType": "FullLength"
},
.....
}
'''

Change-Id: Ib7399cebcb8dd4f9f19014d4d2154bc77e9dc999
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>