Add chassis association to sensors
Add an association to the chassis for each sensor so that the Redfish
code can find them. The forward association is 'chassis', and the
reverse association is 'all_sensors'. This matches what other sensor
applications do and is documented in sensors-architecture.md in the docs
repository.
Tested: Checked the associations were present in the mapper and that the
sensors now show up on the sensors page in the web UI.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iefb6d4dc2e5c9399d919e9e1b7c8dd04f20e7a3e
diff --git a/utils.hpp b/utils.hpp
index 9b78cd1..67d7a31 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -54,6 +54,19 @@
const std::string& interface,
const std::string& propertyName);
+/** @brief Get subtree paths
+ *
+ * @param[in] interfaces - D-Bus interfaces
+ * @param[in] path - D-Bus object path
+ *
+ * @return The D-Bus paths from the GetSubTree method
+ *
+ * @throw sdbusplus::exception::exception when it fails
+ */
+std::vector<std::string>
+ getSubtreePaths(const std::vector<std::string>& interfaces,
+ const std::string& path = "/");
+
} // namespace utils
} // namespace occ
} // namespace open_power