sonic-platform-common
sonic-platform-common copied to clipboard
Add get_transceiver_status and get_transceiver_pm to API interface
Add get_transceiver_status and get_transceiver_pm to API interface
Description
- Add get_transceiver_status to API interface
- Add get_transceiver_pm API interface in xcvr_api.py
- Ignore if "Rx Signal Power" related fields not existing.
- Fix a typo in get_pm_all()
Motivation and Context
How Has This Been Tested?
Plz refer to parent PR for UT.
Additional Information (Optional)
Note This PR serves as dependency for https://github.com/sonic-net/sonic-platform-daemons/pull/304
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: longhuan-cisco (5752d7ee937bde28edfeab3241ac20f52918ed32, 0736d152da8987babd378749779cbfd246557165)
@prgeor please review. This is dependency of https://github.com/sonic-net/sonic-platform-daemons/pull/304
I think you will also need to modify testing script to improve code coverage since it's less than 80% currently.
Added testcase in test_ccmis.py to cover the case of 'Rx Signal Power [dBm]' not present.
@prgeor @mihirpat1 I took care of the existing comments, can you please review?
Added pm table related change, to use this PR to track changes for both status and pm. @prgeor @mihirpat1 Could you please take another look?
This pull request introduces 1 alert when merging 5261da729f50d64eb0a2602dfc6ecda7d124411f into ce9aacb628c5de7632e533deb008c012e0b9c40d - view on LGTM.com
new alerts:
- 1 for Unnecessary pass
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 :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.
PR https://github.com/sonic-net/sonic-platform-daemons/pull/304 has a dependency on this PR, it has already been included in 202211, this PR shall also be cherry-picked to 202211, otherwise, 202211 will be broken. @prgeor @longhuan-cisco @StormLiangMS