Add inventory & chassis association to PSU sensors
For PSU sensor object paths, inventory and chassis
associations is missing due to double initialization
of association interface. Due to this PSU information
and PSU sensors are not show up in Redfish under
chassis. Corrected the code to register association
property and initialize it only after filling all
associations.
Tested:
- PowerSupplies information shows up in redfish /<chassisid>/Power
- PSU sensors shows up in redfish /<chassisid>/Thermal
and <chassisid>/sensors
Change-Id: If2a16e55681718d5b21f3d38c5465d36bda65460
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/include/sensor.hpp b/include/sensor.hpp
index 263cbfb..fa35ef5 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
@@ -61,6 +61,7 @@
setInitialProperties(std::shared_ptr<sdbusplus::asio::connection>& conn)
{
createAssociation(association, configurationPath);
+
sensorInterface->register_property("MaxValue", maxValue);
sensorInterface->register_property("MinValue", minValue);
sensorInterface->register_property(