diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py index aad4f01c1d27..9fcfacc82c49 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py @@ -15,7 +15,6 @@ from sonic_daemon_base.daemon_base import Logger from os import listdir from os.path import isfile, join - from glob import glob import sys import io import re @@ -97,7 +96,6 @@ def initialize_fan(self): drawer_num = fan_data['drawer_num'] drawer_type = fan_data['drawer_type'] fan_num_per_drawer = fan_data['fan_num_per_drawer'] - support_fan_direction = fan_data['support_fan_direction'] drawer_ctor = RealDrawer if drawer_type == 'real' else VirtualDrawer fan_index = 0 for drawer_index in range(drawer_num): diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py b/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py index c7cffe299438..c2ed259445ac 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py @@ -12,7 +12,7 @@ try: from sonic_platform_base.fan_base import FanBase - from .led import FanLed, VirtualLed, PsuLed + from .led import FanLed, VirtualLed except ImportError as e: raise ImportError (str(e) + "- required module not found") @@ -27,7 +27,7 @@ class Fan(FanBase): """Platform-specific Fan class""" def __init__(self, fan_index, fan_drawer, psu_fan = False): - super(FanBase, self).__init__() + super(Fan, self).__init__() # API index is starting from 0, Mellanox platform index is starting from 1 self.index = fan_index + 1 self.fan_drawer = fan_drawer @@ -252,29 +252,3 @@ def get_speed_tolerance(self): """ # The tolerance value is fixed as 20% for all the Mellanox platform return 20 - - -class PsuFan(FanBase): - def __init__(self): - super(FanBase, self).__init__() - - def get_direction(self): - """ - Retrieves the fan's direction - - Returns: - A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST - depending on fan direction - - Notes: - What Mellanox calls forward: - Air flows from fans side to QSFP side, for example: MSN2700-CS2F - which means intake in community - What Mellanox calls reverse: - Air flow from QSFP side to fans side, for example: MSN2700-CS2R - which means exhaust in community - According to hw-mgmt: - 1 stands for forward, in other words intake - 0 stands for reverse, in other words exhaust - """ - return self.FAN_DIRECTION_NOT_APPLICABLE diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/led.py b/platform/mellanox/mlnx-platform-api/sonic_platform/led.py index 55415fd1ff6d..d25deb572705 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/led.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/led.py @@ -1,8 +1,4 @@ import os -try: - from sonic_platform_base.fan_base import FanBase -except ImportError as e: - raise ImportError (str(e) + "- required module not found") class Led(object):