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

[Mellanox] Fixes issue: CLI sfputil does not work based on sonic platform API #61

Closed
wants to merge 3 commits into from

Conversation

Junchao-Mellanox
Copy link
Owner

@Junchao-Mellanox Junchao-Mellanox commented Mar 5, 2021

Why I did it

Recently, CLI sfputil replace the old sonic platform utils with sonic platform API. However, sonic platform API does not suport SFP low power mode and reset related operation. The PR is to fix it.

The change to replace platform utils with sonic platform API was reverted on 202012, once this PR is merged, we can cherry-pick these two PRs to 202012 together.

How I did it

In low power mode and reset related operation, use "docker exec" if the command is running on host side.

How to verify it

Manual test

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)


return oper_pwr_mode == SX_MGMT_PHY_MOD_PWR_MODE_LOW_E
if utils.is_host():
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(self.index)
Copy link
Collaborator

@keboliu keboliu Mar 6, 2021

Choose a reason for hiding this comment

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

I think the way here should remove the call to the legacy plugins, instead, we should load the platform and call the relevant platform API in pmon docker, like "docker exec pmon python {load platform API and call get API in one line}", is it possible?

Junchao-Mellanox pushed a commit that referenced this pull request Mar 16, 2021
- Adding instructions to build telemetry server/go client inside docker (#68)
- Add RBAC, gNOI, API Versioning and Bulk Set operations. (#61) …
- Support NonTLS option for testing purpose only. (#67) …
- Oc gnmi examples (#62) …
Junchao-Mellanox pushed a commit that referenced this pull request Apr 2, 2021
- Adding instructions to build telemetry server/go client inside docker (#68)
- Add RBAC, gNOI, API Versioning and Bulk Set operations. (#61) …
- Support NonTLS option for testing purpose only. (#67) …
- Oc gnmi examples (#62) …
Junchao-Mellanox pushed a commit that referenced this pull request May 11, 2022
[master][sonic-linkmgrd] submodule updates

df51322 Longxiang Lyu   Fri May 6 10:01:46 2022 +0800   Add `ActiveActiveStateMachine` implementation (#64)
e721ceb Jing Zhang      Wed May 4 10:07:14 2022 -0700   Add doc for default route related changes  (#63)
7bb06fb Jing Zhang      Tue May 3 09:48:28 2022 -0700   Add Cli support to enable or disable default route related feature (#68)
e4b02cb Jing Zhang      Mon May 2 13:27:54 2022 -0700   Reset WaitActiveUp count before switching to active (#70)
212d960 Jing Zhang      Wed Apr 27 10:35:05 2022 -0700  lower log level to warning (#69)
48abc9e Jing Zhang      Thu Apr 14 16:50:04 2022 -0700  Add support to enable switchover time measurement (with link prober interval decreased to 10ms) feature  (#61)
c4858a6 Jing Zhang      Thu Apr 14 11:27:55 2022 -0700  Avoid proactively switching to `active` if default route is missing  (#62)

sign-off: Jing Zhang zhangjing@microsoft.com
Junchao-Mellanox pushed a commit that referenced this pull request Aug 10, 2022
24f505148 [eloop.c]: Increase timeout of signal termination (#62)
2b2c1ad72 [driver_macsec_sonic.c]: Fixbug: a wrong db_wait in delete sa (#61)

Signed-off-by: Ze Gan <ganze718@gmail.com>
Junchao-Mellanox pushed a commit that referenced this pull request Aug 17, 2022
24f505148 [eloop.c]: Increase timeout of signal termination (#62)
2b2c1ad72 [driver_macsec_sonic.c]: Fixbug: a wrong db_wait in delete sa (#61)

Signed-off-by: Ze Gan <ganze718@gmail.com>
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