Update CollectionMembers to use UrlFromPieces
Refactor getCollectionMembers to make sure all Url created with dbus
paths are generated via UrlFromPieces helper function. This allow us to
manage all URL generated from dbus in one place and allow us to make
future changes to affect all resources.
We can make changes to all resources easier if they are all managed by
one function.
Tested:
Redfish Validator Passed. All Collections working as expected and match
previous implmentation.
Change-Id: I5d3b2b32f047ce4f20a2287a36a3e099efd6eace
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index dd535f7..f8af707 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -793,7 +793,7 @@
"/redfish/v1/Systems/system/Memory";
collection_util::getCollectionMembers(
- asyncResp, "/redfish/v1/Systems/system/Memory",
+ asyncResp, boost::urls::url("/redfish/v1/Systems/system/Memory"),
{"xyz.openbmc_project.Inventory.Item.Dimm"});
});
}