Refactor GetSubTree method

Since the GetSubTree method has been implemented in dbus_utility and
this commit is to integrate all the places where the GetSubTree
method is called, and use the method in dbus_utility uniformly.

Tested: Redfish Validator Passed

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If3852b487d74e7cd8f123e0efffbd4affe92743c
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index c9143de..e953a9f 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -144,7 +144,8 @@
 }
 
 inline void
-    getSubTree(const std::string& path, std::span<std::string> interfaces,
+    getSubTree(const std::string& path, int32_t depth,
+               std::span<const std::string_view> interfaces,
                std::function<void(const boost::system::error_code&,
                                   const MapperGetSubTreeResponse&)>&& callback)
 {
@@ -154,7 +155,8 @@
             const MapperGetSubTreeResponse& subtree) { callback(ec, subtree); },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
-        "xyz.openbmc_project.ObjectMapper", "GetSubTree", path, 0, interfaces);
+        "xyz.openbmc_project.ObjectMapper", "GetSubTree", path, depth,
+        interfaces);
 }
 
 inline void getSubTreePaths(