Skip to content
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

[Edgecore][as7726/PDDF] Add needed api to sonic_platform #12848

Closed

Conversation

jostar-yang
Copy link
Contributor

Signed-off-by: jostar-yang jostar_yang@edge-core.com

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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

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)

Signed-off-by: jostar-yang <jostar_yang@edge-core.com>
@jostar-yang jostar-yang requested a review from lguohan as a code owner November 28, 2022 09:13
"""

reboot_cause_path = (HOST_REBOOT_CAUSE_PATH + REBOOT_CAUSE_FILE)
sw_reboot_cause = self._api_helper.read_txt_file(
Copy link
Contributor

@FuzailBrcm FuzailBrcm Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who writes the reboot reason to this file ?
and if the reboot reason is HW_WATCHDOG_TIMEOUT then how it is being detected?

@lgtm-com
Copy link

lgtm-com bot commented Nov 28, 2022

This pull request introduces 4 alerts when merging 8b7ae8c into f3809c2 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for Variable defined multiple times

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(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.

@jostar-yang
Copy link
Contributor Author

Because BRCM pddf frame code has enhance to PR:#12863
So close the PR and create new PR:#12993 to fix issue.

@jostar-yang jostar-yang closed this Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants