Skip to content

Commit

Permalink
Remove TODO comments which are no longer needed (sonic-net#325)
Browse files Browse the repository at this point in the history
Description
Remove TODO comments which are no longer needed

Motivation and Context
Remove TODO comments which are no longer needed

How Has This Been Tested?
Only comment change
  • Loading branch information
Junchao-Mellanox authored Dec 13, 2022
1 parent 9657a26 commit e119b69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 5 additions & 7 deletions sonic-thermalctld/scripts/thermalctld
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@ class FanUpdater(logger.Logger):
format(fan_name, speed_target, speed, speed_tolerance)
)

# TODO: handle invalid fan direction

# We don't set PSU led here, PSU led will be handled in psud
if set_led:
if not is_psu_fan:
Expand Down Expand Up @@ -401,8 +399,8 @@ class FanUpdater(logger.Logger):
fan_drawer.set_status_led(led_color)
except NotImplementedError as e:
self.log_warning('Failed to set status LED for fan {}, set_status_led not implemented'.format(fan_name))
# Set led_initialized to True even if there is NotImplementedError as it is not neccessary to

# Set led_initialized to True even if there is NotImplementedError as it is not neccessary to
# print the warning log again and again. But if there is other exception, we could not
# reach this line, and it will retry setting led color in the next run.
fan_status.led_initialized = True
Expand Down Expand Up @@ -613,7 +611,7 @@ class TemperatureUpdater(logger.Logger):
available_thermals = set()
for module_index, module in enumerate(self.chassis.get_all_modules()):
module_name = try_get(module.get_name, 'Module {}'.format(module_index + 1))

for thermal_index, thermal in enumerate(module.get_all_thermals()):
if self.task_stopping_event.is_set():
return
Expand All @@ -639,12 +637,12 @@ class TemperatureUpdater(logger.Logger):
available_thermals.add((thermal, psu_name, thermal_index))
self._refresh_temperature_status(psu_name, thermal, thermal_index)


thermals_to_remove = self.module_thermals - available_thermals
self.module_thermals = available_thermals
for thermal, parent_name, thermal_index in thermals_to_remove:
self._remove_thermal_from_db(thermal, parent_name, thermal_index)

self.log_debug("End temperature updating")

def _refresh_temperature_status(self, parent_name, thermal, thermal_index):
Expand Down
3 changes: 0 additions & 3 deletions sonic-xcvrd/tests/test_xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ def test_DaemonXcvrd_run(self, mock_task_stop1, mock_task_stop2, mock_task_run1,
xcvrd = DaemonXcvrd(SYSLOG_IDENTIFIER)
xcvrd.stop_event.wait = MagicMock()
xcvrd.run()
# TODO: more check
assert mock_task_stop1.call_count == 1
assert mock_task_stop2.call_count == 1
assert mock_task_run1.call_count == 1
Expand Down Expand Up @@ -1317,8 +1316,6 @@ def test_DaemonXcvrd_init_deinit(self):
xcvrd = DaemonXcvrd(SYSLOG_IDENTIFIER)
xcvrd.init()
xcvrd.deinit()
# TODO: fow now we only simply call xcvrd.init/deinit without any further check, it only makes sure that
# xcvrd.init/deinit will not raise unexpected exception. In future, probably more check will be added


def wait_until(total_wait_time, interval, call_back, *args, **kwargs):
Expand Down

0 comments on commit e119b69

Please sign in to comment.