[Edgecore][as7726/PDDF] Add needed api to sonic_platform#12848
[Edgecore][as7726/PDDF] Add needed api to sonic_platform#12848jostar-yang wants to merge 1 commit intosonic-net:masterfrom
Conversation
Signed-off-by: jostar-yang <[email protected]>
| """ | ||
|
|
||
| reboot_cause_path = (HOST_REBOOT_CAUSE_PATH + REBOOT_CAUSE_FILE) | ||
| sw_reboot_cause = self._api_helper.read_txt_file( |
There was a problem hiding this comment.
Who writes the reboot reason to this file ?
and if the reboot reason is HW_WATCHDOG_TIMEOUT then how it is being detected?
|
This pull request introduces 4 alerts when merging 8b7ae8c into f3809c2 - view on LGTM.com new alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog. |
| or -1 if cannot determine the position | ||
| """ | ||
| return (self.fan_index) \ | ||
| if not self.is_psu_fan else (self.fans_psu_index+1) |
There was a problem hiding this comment.
(self.fans_psu_index+1)
This is wrong.
fans_psu_index = PSU index (1-based) of the PSU-fan.
so,
For PSU1 it will calculate to 2 and for PSU2 it will be 3.
Signed-off-by: jostar-yang [email protected]
Why I did it
We run pytest and find sonic_platform lack of some api. Check sonic_platform_base and add these api.
How I did it
Add needed api.
How to verify it
Run pytest
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)