Refactor getCollectionMembers

This commit refactors the  getCollectionMembers function into smaller
functions. Additionally, the 'subtree' parameter is no longer a
default parameter but is explicitly required in the function. All
calls to getCollectionMembers have been updated to pass the 'subtree'
parameter.

Tested: Validator passed

'''
curl -k https://$bmc/redfish/v1/Systems/system/Storage
{
  "@odata.id": "/redfish/v1/Systems/system/Storage",
  "@odata.type": "#StorageCollection.StorageCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/system/Storage/1"
    }
  ],
  "Members@odata.count": 1,
  "Name": "Storage Collection"
}

curl -k https://$bmc/redfish/v1/Cables
{
  "@odata.id": "/redfish/v1/Cables",
  "@odata.type": "#CableCollection.CableCollection",
  "Description": "Collection of Cable Entries",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Cables/dp0_cable0"
    },
    {
      "@odata.id": "/redfish/v1/Cables/dp0_cable1"
    },
    {
      "@odata.id": "/redfish/v1/Cables/dp0_cable2"
    },
    {
      "@odata.id": "/redfish/v1/Cables/dp0_cable3"
    }
  ],
  "Members@odata.count": 4,
  "Name": "Cable Collection"
}

curl -k https://$bmc/redfish/v1/Chassis

{
  "@odata.id": "/redfish/v1/Chassis",
  "@odata.type": "#ChassisCollection.ChassisCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Chassis/chassis"
    }
  ],
  "Members@odata.count": 1,
  "Name": "Chassis Collection"
}

curl -k https://$bmc/redfish/v1/Systems/system/Memory
{
  "@odata.id": "/redfish/v1/Systems/system/Memory",
  "@odata.type": "#MemoryCollection.MemoryCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0"
    },
    {
      "@odata.id": "/redfish/v1/Systems/system/Memory/dimm1"
    },
......
    {
      "@odata.id": "/redfish/v1/Systems/system/Memory/dimm31"
    }
  ],
  "Members@odata.count": 32,
  "Name": "Memory Module Collection"
}
'''

Change-Id: If5091431b548f371bff03b2897fd0aaf8b0ef203
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
diff --git a/redfish-core/lib/cable.hpp b/redfish-core/lib/cable.hpp
index 28031e1..a39d00a 100644
--- a/redfish-core/lib/cable.hpp
+++ b/redfish-core/lib/cable.hpp
@@ -210,7 +210,8 @@
         constexpr std::array<std::string_view, 1> interfaces{
             "xyz.openbmc_project.Inventory.Item.Cable"};
         collection_util::getCollectionMembers(
-            asyncResp, boost::urls::url("/redfish/v1/Cables"), interfaces);
+            asyncResp, boost::urls::url("/redfish/v1/Cables"), interfaces,
+            "/xyz/openbmc_project/inventory");
         });
 }