[Mellanox] Remove TODO comments which are no longer needed (#13023)

- Why I did it
Remove TODO comments which are no longer needed

- How I did it
Remove TODO comments which are no longer needed

- How to verify it
Only comment change
This commit is contained in:
Junchao-Mellanox 2022-12-14 15:57:48 +08:00 committed by GitHub
parent dfc73fc8bd
commit 9590339d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 21 deletions

View File

@ -93,7 +93,7 @@ class Module(ModuleBase):
def is_replaceable(self):
return True
def get_oper_status(self): # TODO: read from DB?
def get_oper_status(self):
if utils.read_int_from_file('/run/hw-management/system/lc{}_active'.format(self.slot_id)) == 1:
return ModuleBase.MODULE_STATUS_ONLINE
elif utils.read_int_from_file('/run/hw-management/system/lc{}_present'.format(self.slot_id)) == 1:
@ -105,7 +105,7 @@ class Module(ModuleBase):
def _check_state(self):
"""Check Module status change:
1. If status sysfs file value has been changed TODO: read from DB?
1. If status sysfs file value has been changed
2. If sequence NO has been changed which means line card has been removed and inserted again.
"""
seq_no = self._get_seq_no()
@ -140,7 +140,7 @@ class Module(ModuleBase):
self._check_state()
if self.current_state == Module.STATE_ACTIVATED and not self._thermal_list:
from .thermal import initialize_linecard_thermals
self._thermal_list = initialize_linecard_thermals(self.get_name(), self.slot_id) # TODO: add presence_cb?
self._thermal_list = initialize_linecard_thermals(self.get_name(), self.slot_id)
def get_num_thermals(self):
"""

View File

@ -340,8 +340,6 @@ class Psu(FixedPsu):
e.g. 12.1
"""
if self.get_powergood_status() and self.psu_voltage:
# TODO: should we put log_func=None here? If not do this, when a PSU is back to power, some PSU related
# sysfs may not ready, read_int_from_file would encounter exception and log an error.
voltage = utils.read_int_from_file(self.psu_voltage, log_func=logger.log_info)
return float(voltage) / 1000
return None