From a1a2b6873d2f8df92b0506a26f29a5dfe417ffa5 Mon Sep 17 00:00:00 2001 From: orfar1994 Date: Mon, 18 Jul 2022 08:47:38 +0300 Subject: [PATCH] add psu input voltage and current Signed-off-by: orfar1994 --- sonic_platform_base/psu_base.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sonic_platform_base/psu_base.py b/sonic_platform_base/psu_base.py index 2f1ae601c..63b1a7ef2 100644 --- a/sonic_platform_base/psu_base.py +++ b/sonic_platform_base/psu_base.py @@ -244,3 +244,22 @@ def set_status_master_led(cls, color): """ cls._psu_master_led_color = color return True + + def get_input_voltage(self): + """ + Retrieves current PSU voltage input + + Returns: + A float number, the input voltage in volts, + e.g. 12.1 + """ + raise NotImplementedError + + def get_input_current(self): + """ + Retrieves the input current draw of the power supply + + Returns: + A float number, the electric current in amperes, e.g 15.4 + """ + raise NotImplementedError