Use getPCIeDeviceList in PCIeDeviceCollection
The current implementation of PCIeDeviceCollection uses
getCollectionMembers to obtain the list of PCIe devices, but this method
does not include empty PCIe slots. To address this limitation and to
prepare for future changes that will include PCIe slot information,
this commit updates PCIeDeviceCollection to use getPCIeDeviceList instead.
While getPCIeDeviceList currently does the same as getCollectionMembers,
moving forward it will be expanded to include PCIe slot information.
Tested: Validator passed
Change-Id: I3ef9fbfa45acd782e99d31136469993a64616710
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index d623321..b63c850 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -132,9 +132,7 @@
asyncResp->res.jsonValue["Members"] = nlohmann::json::array();
asyncResp->res.jsonValue["Members@odata.count"] = 0;
- collection_util::getCollectionMembers(
- asyncResp, boost::urls::url("/redfish/v1/Systems/system/PCIeDevices"),
- pcieDeviceInterface);
+ pcie_util::getPCIeDeviceList(asyncResp, "Members");
}
inline void requestRoutesSystemPCIeDeviceCollection(App& app)