sonic-buildimage/platform/mellanox/mlnx-platform-api
Junchao-Mellanox e6a08d8638 Fix issue: should not initialize led color in __init__ file as platform API will be called by multiple daemons (#7114)
- Why I did it
The existing Fan led and Psu led object initialize itself to green color in init method. However, there are multiple daemons calls sonic platform API and there could be a case that:

A PSU is removed from system
Reboot switch
psud detects that 1 PSU is missing and set PSU led to red
Other daemon just start up and call sonic platform API, the API set PSU led to green by call PsuLed.init
This PR is a partial fix for the issue. As we also need guarantee that the led is initialized with a correct value. I checked existing psud and thermalctld code. psud always initialize the PSU led color on boot up, thermalcltd need some changes to initialize led color on the first run

- How I did it
Remove the led color initialization code from FanLed.init and PsuLed.init

- How to verify it
Manual test
2021-03-26 17:40:42 +00:00
..
sonic_platform Fix issue: should not initialize led color in __init__ file as platform API will be called by multiple daemons (#7114) 2021-03-26 17:40:42 +00:00
tests Fix dynamic minimum fan table issue caused by python3 (#6690) 2021-02-16 15:28:43 -08:00
.gitignore Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
pytest.ini Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
setup.cfg Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
setup.py [Mellanox] Add python3 support for Mellanox platform API (#6175) 2020-12-11 10:51:31 -08:00