-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for fan_drawer class in PDDF common platform APIs #10213
Conversation
This pull request introduces 2 alerts when merging 2ebb078 into 9cdf812 - view on LGTM.com new alerts:
|
@pettershao-ragilenetworks Thanks |
2 new LGTM alerts can be ignored. These alerts are related to Fan() and Thermal() class initialization. Different platforms uses different number of arguments in the init func. |
@geans-pin |
It is fine to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is ok
it looks good. |
Why I did it Support for show platform temp/fan for psu-temp and fan. Original code doesn't has fan_drawer to support these information. How I did it Support for show platform temp/fan for psu-temp and fan. Add fan_drawer.py and update thermal.py to add needed code. It need PDDF common code to support . (Refer to #10213) How to verify it Test show platform temp and show platform fan. root@as7726-32x-2:~# show platform fan Drawer LED FAN Speed Direction Presence Status Timestamp Fantray1 green Fantray1_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray1 green Fantray1_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray2 green Fantray2_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray2 green Fantray2_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray3 green Fantray3_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray3 green Fantray3_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray4 green Fantray4_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray4 green Fantray4_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray5 green Fantray5_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray5 green Fantray5_2 38% EXHAUST Present OK 20220311 08:13:04 Fantray6 green Fantray6_1 38% EXHAUST Present OK 20220311 08:13:04 Fantray6 green Fantray6_2 38% EXHAUST Present OK 20220311 08:13:04 N/A green PSU1_FAN1 23% EXHAUST Present OK 20220311 08:13:04 N/A green PSU2_FAN1 22% EXHAUST Present OK 20220311 08:13:04 root@as7726-32x-2:~# show platform temp Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp PSU1_TEMP1 28 N/A N/A N/A N/A False 20220311 08:13:04 PSU2_TEMP1 25 N/A N/A N/A N/A False 20220311 08:13:04 TEMP1 23.5 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP2 27 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP3 24 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP4 27 80.0 N/A N/A N/A False 20220311 08:13:04 TEMP5 24 80.0 N/A N/A N/A False 20220311 08:13:04 Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
Why I did it
How I did it
Added a common class pddf_fan_drawer.py. This class uses the PDDF JSON to fetch the platform specific data. A platform which uses PDDF would follow the below hierarchy.
How to verify it
Run the 'show platform fan' and 'show platform temperature' commands and check the o/p.
o/p on AS7326:
o/p on AS7726:
Platform specific changes would be submitted using another PR.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)