Add Turbo Allowed Sensor support
Change-Id: I407e507f79e0491e36b0404a8ba486a5c88469f5
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/obmc/sensors.py b/obmc/sensors.py
index ca7be3c..fe1ff3a 100644
--- a/obmc/sensors.py
+++ b/obmc/sensors.py
@@ -306,3 +306,14 @@
SensorValue.IFACE_NAME, in_signature='v', out_signature='')
def setValue(self, value):
print "Setting Power Supply Redundancy is not allowed"
+
+class TurboAllowedSensor(VirtualSensor):
+ def __init__(self, bus, name):
+ VirtualSensor.__init__(self, bus, name)
+ self.setValue(0)
+
+ ## override setValue method
+ @dbus.service.method(
+ SensorValue.IFACE_NAME, in_signature='b', out_signature='')
+ def setValue(self, value):
+ super(TurboAllowedSensor,self).setValue(value)