Fix PSU threshold mismatch issue
When trying to change thresholds on PSU sensors, PSU service will crash.
Some PSU in entity-manager will have threshold0 to threshodl5 which
contains all labels in one D-Bus path. But in current dbus sensors,
the presist threshold function do not support labels, it only check
severity. So when change a threshold in PSU sensor, it will change some
incorrect threshold in entity-manger. This patch adds label support to
presist threshold function, so that correct theshold in entity-manager
can be changed.
Tested:
After changed PSU1 Temp1 threshold by ipmitool, check the threshold again,
the value should be changed to the value we set. Check entity-manager,
the threshold in entity-manager should also change to the value we set.
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: Ib1c8bb454cd42dff170ae33c4aa768c4b515bb44
diff --git a/include/PSUSensor.hpp b/include/PSUSensor.hpp
index 14b6d96..98ec3d7 100644
--- a/include/PSUSensor.hpp
+++ b/include/PSUSensor.hpp
@@ -18,7 +18,7 @@
std::vector<thresholds::Threshold>&& thresholds,
const std::string& sensorConfiguration,
std::string& sensorTypeName, unsigned int factor, double max,
- double min);
+ double min, const std::string& label, size_t tSize);
~PSUSensor();
private: