From 0b609825e021431872069ae26ef7cd5fa944ddc3 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Mon, 22 Mar 2021 22:18:08 +0200 Subject: [PATCH] [thermal_base] Add setter functions for critical thresholds (#180) Two new functions have been added to thermal_base.py for setting critical temperature thresholds. Signed-off-by: d-dashkov --- sonic_platform_base/thermal_base.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sonic_platform_base/thermal_base.py b/sonic_platform_base/thermal_base.py index 5f4a5117c764..ee33524fdea3 100644 --- a/sonic_platform_base/thermal_base.py +++ b/sonic_platform_base/thermal_base.py @@ -92,6 +92,32 @@ def get_low_critical_threshold(self): """ raise NotImplementedError + def set_high_critical_threshold(self, temperature): + """ + Sets the critical high threshold temperature of thermal + + Args : + temperature: A float number up to nearest thousandth of one degree Celsius, + e.g. 30.125 + + Returns: + A boolean, True if threshold is set successfully, False if not + """ + raise NotImplementedError + + def set_low_critical_threshold(self, temperature): + """ + Sets the critical low threshold temperature of thermal + + Args : + temperature: A float number up to nearest thousandth of one degree Celsius, + e.g. 30.125 + + Returns: + A boolean, True if threshold is set successfully, False if not + """ + raise NotImplementedError + def get_minimum_recorded(self): """ Retrieves the minimum recorded temperature of thermal