diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-03-27 08:25:45 -0500 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-03-28 23:22:02 -0500 |
commit | 857e4b834f4bcece8d1006a1fbaef7c2847681d4 (patch) | |
tree | e2aeb2513a728ef51b5cf8166b8fbba87b2a3969 | |
parent | 7a57f95bb8b44d008748307446c1b11757c1ae70 (diff) | |
download | pyphosphor-857e4b834f4bcece8d1006a1fbaef7c2847681d4.tar.gz pyphosphor-857e4b834f4bcece8d1006a1fbaef7c2847681d4.zip |
Add Power Supply Derating Sensor Support.
Change-Id: I328315159d1b7c0287f4af5b69973e2c708a7cb2
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 fe1ff3a..715ecd0 100644 --- a/obmc/sensors.py +++ b/obmc/sensors.py @@ -307,6 +307,17 @@ class PowerSupplyRedundancySensor(VirtualSensor): 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) |