Fix up Function to Populate collection Members
Added Doxygen comments, renamed the funciton, renamed several
variables, and made more generic.
Tested: Top commit passes validator and resources look good.
Change-Id: I9a13176b7f4c8611ae38c6563b0e119e0f66edf2
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index a172233..4fa7c11 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -765,8 +765,9 @@
res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system/Memory";
auto asyncResp = std::make_shared<AsyncResp>(res);
- collection_util::getResourceList(
- asyncResp, "Memory", {"xyz.openbmc_project.Inventory.Item.Dimm"});
+ collection_util::getCollectionMembers(
+ asyncResp, "/redfish/v1/Systems/system/Memory",
+ {"xyz.openbmc_project.Inventory.Item.Dimm"});
}
};
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 5c98684..4c9b1dc 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -469,8 +469,8 @@
res.jsonValue["@odata.id"] = "/redfish/v1/Systems/system/Processors/";
auto asyncResp = std::make_shared<AsyncResp>(res);
- collection_util::getResourceList(
- asyncResp, "Processors",
+ collection_util::getCollectionMembers(
+ asyncResp, "/redfish/v1/Systems/system/Processors",
{"xyz.openbmc_project.Inventory.Item.Cpu",
"xyz.openbmc_project.Inventory.Item.Accelerator"});
}