Skip to content

Commit

Permalink
Fix comments in ComponentBIOS
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Sun <stephens@nvidia.com>
  • Loading branch information
stephenxs committed Mar 9, 2022
1 parent 0678aa5 commit e7fc51d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
11 changes: 5 additions & 6 deletions platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,13 @@ def initialize_components(self):
return
if not self._component_list:
# Initialize component list
from .component import ComponentONIE, ComponentSSD, ComponentBIOS, ComponentCPLD, ComponentBIOSSN2201
from .component import ComponentONIE, ComponentSSD, ComponentBIOS, ComponentCPLD
self._component_list.append(ComponentONIE())
self._component_list.append(ComponentSSD())
# Upgrading BIOS is not supported on SN2201
if DeviceDataManager.get_platform_name() not in ['x86_64-nvidia_sn2201-r0']:
self._component_list.append(ComponentBIOS())
else:
self._component_list.append(ComponentBIOSSN2201())
biosComponent = DeviceDataManager.get_bios_component()
if not biosComponent:
biosComponent = ComponentBIOS()
self._component_list.append(biosComponent)
self._component_list.extend(ComponentCPLD.get_component_list())

def get_num_components(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,12 @@ def get_linecard_max_port_count(cls):
if not sfp_data:
return 0
return sfp_data.get('max_port_per_line_card', 0)

@classmethod
def get_bios_component(cls):
if cls.get_platform_name() in ['x86_64-nvidia_sn2201-r0']:
from .component import ComponentBIOSSN2201
# For SN2201, special chass is required for handle BIOS
# Currently, only fetching BIOS version is supported
return ComponentBIOSSN2201()
return None

0 comments on commit e7fc51d

Please sign in to comment.