Add associations to sensors
This adds associations to all the sensors on dbus.
Tested: Mapper has lots of sensor associations now.
Change-Id: I9a1c51d6b139e45a228507d29637c29a84b302d9
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
index 2870d33..b8dd220 100644
--- a/src/IpmbSensor.cpp
+++ b/src/IpmbSensor.cpp
@@ -79,6 +79,9 @@
"/xyz/openbmc_project/sensors/temperature/" + name,
"xyz.openbmc_project.Sensor.Threshold.Critical");
}
+ association = objectServer.add_interface(
+ "/xyz/openbmc_project/sensors/temperature/" + name,
+ "org.openbmc.Associations");
setupPowerMatch(conn);
}
@@ -88,6 +91,7 @@
objectServer.remove_interface(thresholdInterfaceWarning);
objectServer.remove_interface(thresholdInterfaceCritical);
objectServer.remove_interface(sensorInterface);
+ objectServer.remove_interface(association);
}
void IpmbSensor::init(void)