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

Implement get/set_lpmode API for SFF8472 #512

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

byu343
Copy link
Contributor

@byu343 byu343 commented Nov 6, 2024

Description

Implement get/set_lpmode API for SFF8472

Motivation and Context

The cli "sfputil show lpmode" depends on this implemenation for SFP+ ports on Arista platform.

How Has This Been Tested?

Run the cli "sfputil show lpmode" on Arista platform, and check the result is Off for SFP+ ports

Additional Information (Optional)

SFF8472 does not support setting lp mode, so both get_lpmode() and set_lpmode() is returned false. This is consistent with the existing implementation for SFF8436 in https://github.com/sonic-net/sonic-platform-common/blob/master/sonic_platform_base/sonic_xcvr/api/public/sff8436.py#L334, for the condition of "if not self.get_lpmode_support() or not self.get_power_override_support()"

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yaqiangz
Copy link

yaqiangz commented Nov 8, 2024

Hi @prgeor could you please help to review this PR?

@prgeor prgeor requested a review from mihirpat1 November 8, 2024 15:32
@prgeor
Copy link
Collaborator

prgeor commented Nov 8, 2024

@mihirpat1 can you please review

Copy link
Contributor

@mihirpat1 mihirpat1 left a comment

Choose a reason for hiding this comment

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

Approving with a minor comment

@@ -37,7 +37,7 @@ def get_transceiver_info(self):
if len > 0:
cable_len = len
cable_type = type

Copy link
Contributor

Choose a reason for hiding this comment

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

@byu343 Please revert this

@prgeor prgeor merged commit bad49e2 into sonic-net:master Nov 11, 2024
5 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-platform-common that referenced this pull request Nov 12, 2024
* Add get/set_lpmode API for SFF8472

The lpmode is not supported by SFF8472

* Add unittest for get/set_lpmode for SFF8472

---------

Co-authored-by: Andy Wong <andywong@arista.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #514

mssonicbld pushed a commit that referenced this pull request Nov 12, 2024
* Add get/set_lpmode API for SFF8472

The lpmode is not supported by SFF8472

* Add unittest for get/set_lpmode for SFF8472

---------

Co-authored-by: Andy Wong <andywong@arista.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants