From 3aee87d6dc1303a0ace91a95046ece94d1079ca9 Mon Sep 17 00:00:00 2001 From: Aravind Mani <53524901+aravindmani-1@users.noreply.github.com> Date: Tue, 23 Feb 2021 12:56:59 +0530 Subject: [PATCH] Dell S6000,S6100 system health changes (#6788) Needed support for platform system health in Dell platforms --- .../system_health_monitoring_config.json | 11 +++++++++++ .../system_health_monitoring_config.json | 11 +++++++++++ .../s6000/sonic_platform/chassis.py | 3 +++ .../s6100/sonic_platform/chassis.py | 3 +++ .../z9332f/sonic_platform/psu.py | 6 +++--- 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/system_health_monitoring_config.json create mode 100644 device/dell/x86_64-dell_s6100_c2538-r0/system_health_monitoring_config.json diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/system_health_monitoring_config.json b/device/dell/x86_64-dell_s6000_s1220-r0/system_health_monitoring_config.json new file mode 100644 index 0000000000..bb8ffbcd21 --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "blinking green" + } +} diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/system_health_monitoring_config.json b/device/dell/x86_64-dell_s6100_c2538-r0/system_health_monitoring_config.json new file mode 100644 index 0000000000..bb8ffbcd21 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "blinking green" + } +} diff --git a/platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/chassis.py index 7f6e9ec573..08c128d678 100755 --- a/platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/chassis.py +++ b/platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/chassis.py @@ -341,6 +341,9 @@ class Chassis(ChassisBase): return True, ret_dict return False, ret_dict + def initizalize_system_led(self): + return True + def set_status_led(self, color): """ Sets the state of the system LED diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py index f8e009cdbe..4527f69473 100755 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py @@ -372,6 +372,9 @@ class Chassis(ChassisBase): return True, ret_dict + def initizalize_system_led(self): + return True + def set_status_led(self, color): """ Sets the state of the system LED diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py index 0d06c31fcf..afd9c5a26a 100644 --- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py +++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py @@ -113,7 +113,7 @@ class Psu(PsuBase): if not is_valid: return None - return "{:.1f}".format(voltage) + return float(voltage) def get_voltage_low_threshold(self): """ @@ -159,7 +159,7 @@ class Psu(PsuBase): if not is_valid: return None - return "{:.1f}".format(current) + return float(current) def get_power(self): """ @@ -173,7 +173,7 @@ class Psu(PsuBase): if not is_valid: return None - return "{:.1f}".format(power) + return float(power) def get_powergood_status(self): """