From 3790af2195b2e98d5bdbfb515937e32757977aeb Mon Sep 17 00:00:00 2001 From: junchao Date: Mon, 1 Mar 2021 15:30:50 +0800 Subject: [PATCH] Initialize PSU API on both host and docker side --- .../mlnx-platform-api/sonic_platform/platform.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/platform.py b/platform/mellanox/mlnx-platform-api/sonic_platform/platform.py index f2a8af954790..c649224dc6b8 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/platform.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/platform.py @@ -16,17 +16,16 @@ class Platform(PlatformBase): def __init__(self): PlatformBase.__init__(self) + self._chassis = Chassis() + self._chassis.initialize_psu() + self._chassis.initialize_eeprom() if self._is_host(): - self._chassis = Chassis() self._chassis.initialize_components() self._chassis.initizalize_system_led() - self._chassis.initialize_eeprom() else: - self._chassis = Chassis() - self._chassis.initialize_psu() self._chassis.initialize_fan() - self._chassis.initialize_eeprom() self._chassis.initialize_thermals() + def _is_host(self): """