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.hpp b/utility.hpp
index 1db17f3..043c3c0 100644
--- a/utility.hpp
+++ b/utility.hpp
@@ -130,6 +130,27 @@
 DbusSubtree getSubTree(sdbusplus::bus_t& bus, const std::string& path,
                        const std::string& interface, int32_t depth);
 
+/** @brief GetAssociatedSubTreePaths wrapper from the object mapper.
+ *
+ * Helper function to find object paths that implement a certain
+ * interface and are also an association endpoint.
+ * See:
+ * https://github.com/openbmc/docs/blob/master/architecture/object-mapper.md
+ *
+ * @param[in] bus - The D-Bus object.
+ * @param[in] associationPath - The association it must be an endpoint of.
+ * @param[in] path - The root of the tree to search.
+ * @param[in] interfaces - The interfaces in the subtree to search for
+ * @param[in] depth - The number of path elements to descend.
+ *
+ * @return std::vector<DbusPath> - The object paths.
+ */
+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);
+
 /**
  * Logs an error and powers off the system.
  *