Require Inventory.Item.PCIeDevice for PCIe objects
Currently when bmcweb tries to get PCIe device service it checks only
path and doesn't limit search by any required interface.
This can lead to wrong result if the 'xyz.openbmc_project.ObjectMapper'
for example have object with the same path.
To fix the issue require xyz.openbmc_project.Inventory.Item.PCIeDevice
interface to be present in the object.
Tested:
Patchest was tested on the system with a DBUS service that has objects
with the "xyz.openbmc_project.Inventory.Item.PCIeDevice" interface.
Before the change request to the PCIe device endpoint like
/redfish/v1/Systems/system/PCIeDevices/Bus_00_Device_00
outputs internal error message.
After the change request to the PCIe device endpoint like
/redfish/v1/Systems/system/PCIeDevices/Bus_00_Device_00
outputs detailed PCIe device info including all the relevant links
to its PCIe functions.
Change-Id: I25d60533fa8f7bdda26c81bde1fa0a88c25365f6
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 4415144..3d7f115 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -59,7 +59,7 @@
}
dbus::utility::getDbusObject(
- pcieDevicePath, {},
+ pcieDevicePath, pcieDeviceInterface,
[pcieDevicePath, asyncResp,
callback](const boost::system::error_code& ec,
const dbus::utility::MapperGetObject& object) {