diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-03-28 07:15:29 -0500 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-03-28 07:15:52 -0500 |
commit | 7a57f95bb8b44d008748307446c1b11757c1ae70 (patch) | |
tree | 86cc63840eac1a4f0558daa1df83e51685406e16 | |
parent | 93daccf77f24c8d8f0b9fdc739e102a662eef8df (diff) | |
download | pyphosphor-7a57f95bb8b44d008748307446c1b11757c1ae70.tar.gz pyphosphor-7a57f95bb8b44d008748307446c1b11757c1ae70.zip |
Add Turbo Allowed Sensor support
Change-Id: I407e507f79e0491e36b0404a8ba486a5c88469f5
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
-rw-r--r-- | obmc/sensors.py | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ class PowerSupplyRedundancySensor(VirtualSensor): 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) |