-
Notifications
You must be signed in to change notification settings - Fork 664
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
Improve the way to check port type of RJ45 port #2249
Conversation
Present/Not present => Link Up/Link Down Use the new platform API to test whether the port is an RJ45 port Signed-off-by: Stephen Sun <[email protected]>
…esent status accordingly Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
…util Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: stephens <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: stephens <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
This pull request introduces 3 alerts when merging b30ab63 into 7070794 - view on LGTM.com new alerts:
|
PR checker failed because the depending PR has not been in. |
Signed-off-by: Stephen Sun <[email protected]>
This pull request introduces 3 alerts when merging 5fa3e79 into 7070794 - view on LGTM.com new alerts:
|
…sence Signed-off-by: Stephen Sun <[email protected]>
This pull request introduces 3 alerts when merging a3f6ee7 into c7389bd - view on LGTM.com new alerts:
|
Signed-off-by: Stephen Sun <[email protected]>
This pull request introduces 3 alerts when merging edc5116 into 3600639 - view on LGTM.com new alerts:
|
Signed-off-by: Stephen Sun <[email protected]>
This pull request introduces 3 alerts when merging 6369527 into df54138 - view on LGTM.com new alerts:
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Stephen Sun <[email protected]>
@stephenxs can you test this change on a platform having non-RJ45 ports? sfputil, intfutil and sfpshow command? |
Yes, I tested it. I will provide the results next Wednesday. |
Hi @prgeor This is the test results of a platform without RJ45 ports. show interface status
show interfaces transceiver presence
show interfaces transceiver lpmode
sfpshow presence
sfpshow eeprom
sudo sfputil show presence
sudo sfputil show eeprom
|
@stephenxs can you add the result of "sfputil show eeprom -d" |
Hi @prgeor sfputil show eeprom -d
|
* Update the presence state of RJ45 port Present/Not present => Link Up/Link Down Use the new platform API to test whether the port is an RJ45 port Signed-off-by: Stephen Sun <[email protected]> * Use new platform API to check whether a port is RJ45 and represent present status accordingly Signed-off-by: Stephen Sun <[email protected]> * Adjust sfputil and testcases Signed-off-by: Stephen Sun <[email protected]> * Adjust sfpshow Signed-off-by: Stephen Sun <[email protected]> * Exact is_rj45_port to a common module shared between sfpshow and intfutil Signed-off-by: Stephen Sun <[email protected]> * Fall back to old way for checking RJ45 port Signed-off-by: Stephen Sun <[email protected]> * Move RJ45 part to platform_sfputil_helper Signed-off-by: Stephen Sun <[email protected]> * Remove fallback mechanism in is_rj45_port Signed-off-by: Stephen Sun <[email protected]> * Remove get_child_ports which is not used Signed-off-by: Stephen Sun <[email protected]> * Temporarily commit Signed-off-by: Stephen Sun <[email protected]> * Update unit test Signed-off-by: stephens <[email protected]> * Adjust unit test Signed-off-by: Stephen Sun <[email protected]> * Commit missed files Signed-off-by: Stephen Sun <[email protected]> * Add missing files Signed-off-by: stephens <[email protected]> * Fix typo Signed-off-by: Stephen Sun <[email protected]> * Remove code that was committed by mistake. Signed-off-by: Stephen Sun <[email protected]> * Fix an issue: the ports should be in nature order in sfputil show presence Signed-off-by: Stephen Sun <[email protected]> * Fix present state for RJ45: Link Up/Down => Port Up/Down Signed-off-by: Stephen Sun <[email protected]> * LGTM warning supression Signed-off-by: Stephen Sun <[email protected]> * LGTM warning supression Signed-off-by: Stephen Sun <[email protected]> * Move present state part into another PR Signed-off-by: Stephen Sun <[email protected]> * Fix review comments Signed-off-by: Stephen Sun <[email protected]> Co-authored-by: stephens <[email protected]> Conflicts: scripts/intfutil scripts/sfpshow sfputil/main.py tests/mock_platform_sfputil/mock_platform_sfputil.py tests/sfputil_test.py
@stephenxs this change cannot be cherry-picked to 202205 cleanly, can you create separate PR? |
Update sonic-utilities submodule pointer to include the following: * Fix GCU bug when backend service modifying config ([sonic-net#2295](sonic-net/sonic-utilities#2295)) * Fix issues for sonic_installer upgrade-docker and sonic_installer rollback-docker ([sonic-net#2278](sonic-net/sonic-utilities#2278)) * [crm] add checking for CRM interval range ([sonic-net#2293](sonic-net/sonic-utilities#2293)) * Fix the issue that sonic_platform is not installed on vs image ([sonic-net#2300](sonic-net/sonic-utilities#2300)) * Add FEC correctable and uncorrectable port stats ([sonic-net#2027](sonic-net/sonic-utilities#2027)) * Add CLI to configure YANG config validation ([sonic-net#2147](sonic-net/sonic-utilities#2147)) * Add override testcase to verify removal ([sonic-net#2288](sonic-net/sonic-utilities#2288)) * Fix version in db_migrator for ([sonic-net#2289](sonic-net/sonic-utilities#2289)) * [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB ([sonic-net#2223](sonic-net/sonic-utilities#2223)) * Transfer organization from Azure to sonic-net ([sonic-net#2284](sonic-net/sonic-utilities#2284)) * [watermarkstat] Fix CLI script for unconfigured PG counters ([sonic-net#2239](sonic-net/sonic-utilities#2239)) * Improve the way to check port type of RJ45 port ([sonic-net#2249](sonic-net/sonic-utilities#2249)) Signed-off-by: dprital <[email protected]>
* Update the presence state of RJ45 port Present/Not present => Link Up/Link Down Use the new platform API to test whether the port is an RJ45 port Signed-off-by: Stephen Sun <[email protected]> * Use new platform API to check whether a port is RJ45 and represent present status accordingly Signed-off-by: Stephen Sun <[email protected]> * Adjust sfputil and testcases Signed-off-by: Stephen Sun <[email protected]> * Adjust sfpshow Signed-off-by: Stephen Sun <[email protected]> * Exact is_rj45_port to a common module shared between sfpshow and intfutil Signed-off-by: Stephen Sun <[email protected]> * Fall back to old way for checking RJ45 port Signed-off-by: Stephen Sun <[email protected]> * Move RJ45 part to platform_sfputil_helper Signed-off-by: Stephen Sun <[email protected]> * Remove fallback mechanism in is_rj45_port Signed-off-by: Stephen Sun <[email protected]> * Remove get_child_ports which is not used Signed-off-by: Stephen Sun <[email protected]> * Temporarily commit Signed-off-by: Stephen Sun <[email protected]> * Update unit test Signed-off-by: stephens <[email protected]> * Adjust unit test Signed-off-by: Stephen Sun <[email protected]> * Commit missed files Signed-off-by: Stephen Sun <[email protected]> * Add missing files Signed-off-by: stephens <[email protected]> * Fix typo Signed-off-by: Stephen Sun <[email protected]> * Remove code that was committed by mistake. Signed-off-by: Stephen Sun <[email protected]> * Fix an issue: the ports should be in nature order in sfputil show presence Signed-off-by: Stephen Sun <[email protected]> * Fix present state for RJ45: Link Up/Down => Port Up/Down Signed-off-by: Stephen Sun <[email protected]> * LGTM warning supression Signed-off-by: Stephen Sun <[email protected]> * LGTM warning supression Signed-off-by: Stephen Sun <[email protected]> * Move present state part into another PR Signed-off-by: Stephen Sun <[email protected]> * Fix review comments Signed-off-by: Stephen Sun <[email protected]> Co-authored-by: stephens <[email protected]>
Update sonic-utilities submodule pointer to include the following: * Fix test failure in dump table test in 202205 ([sonic-net#2307](sonic-net/sonic-utilities#2307)) * Convert IPv6 addresses to lowercase in apply-patch ([sonic-net#2299](sonic-net/sonic-utilities#2299)) * [config][muxcable] add support to enable/disable ycable telemetry ([sonic-net#2297](sonic-net/sonic-utilities#2297)) * Fix GCU bug when backend service modifying config ([sonic-net#2295](sonic-net/sonic-utilities#2295)) * [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB ([sonic-net#2223](sonic-net/sonic-utilities#2223)) * Improve the way to check port type of RJ45 port ([sonic-net#2249](sonic-net/sonic-utilities#2249)) * sonic-utils: initial support for link-training ([sonic-net#2071](sonic-net/sonic-utilities#2071)) * Support to enable fips for the command sonic_installer (sonic-net#2154) ([sonic-net#2303](sonic-net/sonic-utilities#2303)) Signed-off-by: dprital <[email protected]>
…"" This reverts commit 0df3ba8.
* Update the presence state of RJ45 port Present/Not present => Link Up/Link Down Use the new platform API to test whether the port is an RJ45 port Signed-off-by: Stephen Sun <[email protected]> * Use new platform API to check whether a port is RJ45 and represent present status accordingly Signed-off-by: Stephen Sun <[email protected]> * Adjust sfputil and testcases Signed-off-by: Stephen Sun <[email protected]> * Adjust sfpshow Signed-off-by: Stephen Sun <[email protected]> * Exact is_rj45_port to a common module shared between sfpshow and intfutil Signed-off-by: Stephen Sun <[email protected]> * Fall back to old way for checking RJ45 port Signed-off-by: Stephen Sun <[email protected]> * Move RJ45 part to platform_sfputil_helper Signed-off-by: Stephen Sun <[email protected]> * Remove fallback mechanism in is_rj45_port Signed-off-by: Stephen Sun <[email protected]> * Remove get_child_ports which is not used Signed-off-by: Stephen Sun <[email protected]> * Temporarily commit Signed-off-by: Stephen Sun <[email protected]> * Update unit test Signed-off-by: stephens <[email protected]> * Adjust unit test Signed-off-by: Stephen Sun <[email protected]> * Commit missed files Signed-off-by: Stephen Sun <[email protected]> * Add missing files Signed-off-by: stephens <[email protected]> * Fix typo Signed-off-by: Stephen Sun <[email protected]> * Remove code that was committed by mistake. Signed-off-by: Stephen Sun <[email protected]> * Fix an issue: the ports should be in nature order in sfputil show presence Signed-off-by: Stephen Sun <[email protected]> * Fix present state for RJ45: Link Up/Down => Port Up/Down Signed-off-by: Stephen Sun <[email protected]> * LGTM warning supression Signed-off-by: Stephen Sun <[email protected]> * LGTM warning supression Signed-off-by: Stephen Sun <[email protected]> * Move present state part into another PR Signed-off-by: Stephen Sun <[email protected]> * Fix review comments Signed-off-by: Stephen Sun <[email protected]> Co-authored-by: stephens <[email protected]>
Use the new platform API to check whether a port is RJ45 when it is absent
Depends on sonic-net/sonic-platform-common#288, and sonic-net/sonic-buildimage#11401
Signed-off-by: Stephen Sun [email protected]
What I did
How I did it
How to verify it
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)