psu-ng: Fix chassis association call

The association name from a power supply to its chassis changed from
'chassis' to 'powering', so change that in the code.

Also update the code to find the association using the new
GetAssociatedSubTreePaths mapper method which is like the existing
GetSubTreePaths but also ensures the results are an endpoint of the
passed in association path.  This way if the 'powering' association is
used to show the power supply powers other things it will still work.

Change-Id: I9076a6b1502ba43a29404a191bd8bc56a9c5df45
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/utility.cpp b/utility.cpp
index ad8e232..0082d36 100644
--- a/utility.cpp
+++ b/utility.cpp
@@ -103,6 +103,27 @@
     return response;
 }
 
+std::vector<DbusPath> getAssociatedSubTreePaths(
+    sdbusplus::bus_t& bus,
+    const sdbusplus::message::object_path& associationPath,
+    const sdbusplus::message::object_path& path,
+    const std::vector<std::string>& interfaces, int32_t depth)
+{
+    auto mapperCall =
+        bus.new_method_call(MAPPER_BUSNAME, MAPPER_PATH, MAPPER_INTERFACE,
+                            "GetAssociatedSubTreePaths");
+    mapperCall.append(associationPath);
+    mapperCall.append(path);
+    mapperCall.append(depth);
+    mapperCall.append(interfaces);
+
+    auto reply = bus.call(mapperCall);
+
+    std::vector<DbusPath> response;
+    reply.read(response);
+    return response;
+}
+
 json loadJSONFromFile(const char* path)
 {
     std::ifstream ifs(path);