Add Power Supply Derating Sensor Support.
Change-Id: I328315159d1b7c0287f4af5b69973e2c708a7cb2
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/obmc/sensors.py b/obmc/sensors.py
index fe1ff3a..715ecd0 100644
--- a/obmc/sensors.py
+++ b/obmc/sensors.py
@@ -307,6 +307,17 @@
def setValue(self, value):
print "Setting Power Supply Redundancy is not allowed"
+class PowerSupplyDeratingSensor(VirtualSensor):
+ def __init__(self, bus, name):
+ VirtualSensor.__init__(self, bus, name)
+ super(PowerSupplyDeratingSensor,self).setValue(10)
+
+ ## override setValue method
+ @dbus.service.method(
+ SensorValue.IFACE_NAME, in_signature='v', out_signature='')
+ def setValue(self, value):
+ print "Setting Power Supply Derating is not allowed"
+
class TurboAllowedSensor(VirtualSensor):
def __init__(self, bus, name):
VirtualSensor.__init__(self, bus, name)