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

Add transceiver status CLI to show output from TRANSCEIVER_STATUS table #2772

Merged
merged 13 commits into from
Jun 1, 2023

Conversation

longhuan-cisco
Copy link
Contributor

@longhuan-cisco longhuan-cisco commented Apr 3, 2023

What I did

Add transceiver status CLI to show output from TRANSCEIVER_STATUS table

(info for TRANSCEIVER_STATUS table and CLI can be found in hld: https://github.com/sonic-net/SONiC/blob/master/doc/platform_api/CMIS_and_C-CMIS_support_for_ZR.md)

How I did it

  1. add 'show interface transceiver status' CLI for TRANSCEIVER_STATUS table
  2. add test cases for in tests/sfp_test.py
  3. update Command-Reference.md

Note
tx_disable and tx_disabled_channel are supposed to be added to TRANSCEIVER_STATUS table per se. their support will be added in separate PR along with changing sonic-platform-common repo. sonic-net/sonic-platform-common#359

How to verify it

verified on 400G regular and ZR optics (CMIS/C-CMIS) and 100G optics, that the status output was displayed properly for single interface as well as for all interfaces, and not applicable message was shown up properly for optics whose status table is missing.

Previous command output (if the output of a command-line utility has changed)

N/A

New command output (if the output of a command-line utility has changed)

For non-CMIS/C-CMIS optics (e.g. 100G):

cisco@sonic:~$ show interface transceiver status Ethernet280 -n asic2
Ethernet280: 
        Tx fault flag on media lane 1: False
        Tx fault flag on media lane 2: False
        Tx fault flag on media lane 3: False
        Tx fault flag on media lane 4: False
        Rx loss of signal flag on media lane 1: False
        Rx loss of signal flag on media lane 2: False
        Rx loss of signal flag on media lane 3: False
        Rx loss of signal flag on media lane 4: False
        TX disable status on lane 1: False
        TX disable status on lane 2: False
        TX disable status on lane 3: False
        TX disable status on lane 4: False
        Disabled TX channels: 0

For CMIS optics (non-ZR 400G):

cisco@sonic:~$ show interface transceiver status Ethernet0 -n asic0
Ethernet0: 
        Tx fault flag on media lane 1: False
        Tx fault flag on media lane 2: False
        Tx fault flag on media lane 3: False
        Tx fault flag on media lane 4: False
        Tx fault flag on media lane 5: False
        Tx fault flag on media lane 6: False
        Tx fault flag on media lane 7: False
        Tx fault flag on media lane 8: False
        Rx loss of signal flag on media lane 1: False
        Rx loss of signal flag on media lane 2: False
        Rx loss of signal flag on media lane 3: False
        Rx loss of signal flag on media lane 4: False
        Rx loss of signal flag on media lane 5: False
        Rx loss of signal flag on media lane 6: False
        Rx loss of signal flag on media lane 7: False
        Rx loss of signal flag on media lane 8: False
        TX disable status on lane 1: False
        TX disable status on lane 2: False
        TX disable status on lane 3: False
        TX disable status on lane 4: False
        TX disable status on lane 5: False
        TX disable status on lane 6: False
        TX disable status on lane 7: False
        TX disable status on lane 8: False
        Disabled TX channels: 0
        Current module state: ModuleReady
        Reason of entering the module fault state: No Fault detected
        Datapath firmware fault: False
        Module firmware fault: False
        Module state changed: False
        Data path state indicator on host lane 1: DataPathActivated
        Data path state indicator on host lane 2: DataPathActivated
        Data path state indicator on host lane 3: DataPathActivated
        Data path state indicator on host lane 4: DataPathActivated
        Data path state indicator on host lane 5: DataPathActivated
        Data path state indicator on host lane 6: DataPathActivated
        Data path state indicator on host lane 7: DataPathActivated
        Data path state indicator on host lane 8: DataPathActivated
        Tx output status on media lane 1: False
        Tx output status on media lane 2: False
        Tx output status on media lane 3: False
        Tx output status on media lane 4: False
        Tx output status on media lane 5: False
        Tx output status on media lane 6: False
        Tx output status on media lane 7: False
        Tx output status on media lane 8: False
        Rx output status on host lane 1: False
        Rx output status on host lane 2: False
        Rx output status on host lane 3: False
        Rx output status on host lane 4: False
        Rx output status on host lane 5: False
        Rx output status on host lane 6: False
        Rx output status on host lane 7: False
        Rx output status on host lane 8: False
        Tx loss of signal flag on host lane 1: False
        Tx loss of signal flag on host lane 2: False
        Tx loss of signal flag on host lane 3: False
        Tx loss of signal flag on host lane 4: False
        Tx loss of signal flag on host lane 5: False
        Tx loss of signal flag on host lane 6: False
        Tx loss of signal flag on host lane 7: False
        Tx loss of signal flag on host lane 8: False
        Tx clock and data recovery loss of lock on host lane 1: False
        Tx clock and data recovery loss of lock on host lane 2: False
        Tx clock and data recovery loss of lock on host lane 3: False
        Tx clock and data recovery loss of lock on host lane 4: False
        Tx clock and data recovery loss of lock on host lane 5: False
        Tx clock and data recovery loss of lock on host lane 6: False
        Tx clock and data recovery loss of lock on host lane 7: False
        Tx clock and data recovery loss of lock on host lane 8: False
        Rx clock and data recovery loss of lock on media lane 1: False
        Rx clock and data recovery loss of lock on media lane 2: False
        Rx clock and data recovery loss of lock on media lane 3: False
        Rx clock and data recovery loss of lock on media lane 4: False
        Rx clock and data recovery loss of lock on media lane 5: False
        Rx clock and data recovery loss of lock on media lane 6: False
        Rx clock and data recovery loss of lock on media lane 7: False
        Rx clock and data recovery loss of lock on media lane 8: False
        Configuration status for the data path of host line 1: ConfigSuccess
        Configuration status for the data path of host line 2: ConfigSuccess
        Configuration status for the data path of host line 3: ConfigSuccess
        Configuration status for the data path of host line 4: ConfigSuccess
        Configuration status for the data path of host line 5: ConfigSuccess
        Configuration status for the data path of host line 6: ConfigSuccess
        Configuration status for the data path of host line 7: ConfigSuccess
        Configuration status for the data path of host line 8: ConfigSuccess
        Data path configuration updated on host lane 1: False
        Data path configuration updated on host lane 2: False
        Data path configuration updated on host lane 3: False
        Data path configuration updated on host lane 4: False
        Data path configuration updated on host lane 5: False
        Data path configuration updated on host lane 6: False
        Data path configuration updated on host lane 7: False
        Data path configuration updated on host lane 8: False
        Temperature high alarm flag: False
        Temperature high warning flag: False
        Temperature low warning flag: False
        Temperature low alarm flag: False
        Vcc high alarm flag: False
        Vcc high warning flag: False
        Vcc low warning flag: False
        Vcc low alarm flag: False
        Tx power high alarm flag on lane 1: False
        Tx power high alarm flag on lane 2: False
        Tx power high alarm flag on lane 3: False
        Tx power high alarm flag on lane 4: False
        Tx power high alarm flag on lane 5: False
        Tx power high alarm flag on lane 6: False
        Tx power high alarm flag on lane 7: False
        Tx power high alarm flag on lane 8: False
        Tx power high warning flag on lane 1: False
        Tx power high warning flag on lane 2: False
        Tx power high warning flag on lane 3: False
        Tx power high warning flag on lane 4: False
        Tx power high warning flag on lane 5: False
        Tx power high warning flag on lane 6: False
        Tx power high warning flag on lane 7: False
        Tx power high warning flag on lane 8: False
        Tx power low warning flag on lane 1: False
        Tx power low warning flag on lane 2: False
        Tx power low warning flag on lane 3: False
        Tx power low warning flag on lane 4: False
        Tx power low warning flag on lane 5: False
        Tx power low warning flag on lane 6: False
        Tx power low warning flag on lane 7: False
        Tx power low warning flag on lane 8: False
        Tx power low alarm flag on lane 1: False
        Tx power low alarm flag on lane 2: False
        Tx power low alarm flag on lane 3: False
        Tx power low alarm flag on lane 4: False
        Tx power low alarm flag on lane 5: False
        Tx power low alarm flag on lane 6: False
        Tx power low alarm flag on lane 7: False
        Tx power low alarm flag on lane 8: False
        Rx power high alarm flag on lane 1: False
        Rx power high alarm flag on lane 2: False
        Rx power high alarm flag on lane 3: False
        Rx power high alarm flag on lane 4: False
        Rx power high alarm flag on lane 5: False
        Rx power high alarm flag on lane 6: False
        Rx power high alarm flag on lane 7: False
        Rx power high alarm flag on lane 8: False
        Rx power high warning flag on lane 1: False
        Rx power high warning flag on lane 2: False
        Rx power high warning flag on lane 3: False
        Rx power high warning flag on lane 4: False
        Rx power high warning flag on lane 5: False
        Rx power high warning flag on lane 6: False
        Rx power high warning flag on lane 7: False
        Rx power high warning flag on lane 8: False
        Rx power low warning flag on lane 1: False
        Rx power low warning flag on lane 2: False
        Rx power low warning flag on lane 3: False
        Rx power low warning flag on lane 4: False
        Rx power low warning flag on lane 5: False
        Rx power low warning flag on lane 6: False
        Rx power low warning flag on lane 7: False
        Rx power low warning flag on lane 8: False
        Rx power low alarm flag on lane 1: False
        Rx power low alarm flag on lane 2: False
        Rx power low alarm flag on lane 3: False
        Rx power low alarm flag on lane 4: False
        Rx power low alarm flag on lane 5: False
        Rx power low alarm flag on lane 6: False
        Rx power low alarm flag on lane 7: False
        Rx power low alarm flag on lane 8: False
        Tx bias high alarm flag on lane 1: False
        Tx bias high alarm flag on lane 2: False
        Tx bias high alarm flag on lane 3: False
        Tx bias high alarm flag on lane 4: False
        Tx bias high alarm flag on lane 5: False
        Tx bias high alarm flag on lane 6: False
        Tx bias high alarm flag on lane 7: False
        Tx bias high alarm flag on lane 8: False
        Tx bias high warning flag on lane 1: False
        Tx bias high warning flag on lane 2: False
        Tx bias high warning flag on lane 3: False
        Tx bias high warning flag on lane 4: False
        Tx bias high warning flag on lane 5: False
        Tx bias high warning flag on lane 6: False
        Tx bias high warning flag on lane 7: False
        Tx bias high warning flag on lane 8: False
        Tx bias low warning flag on lane 1: False
        Tx bias low warning flag on lane 2: False
        Tx bias low warning flag on lane 3: False
        Tx bias low warning flag on lane 4: False
        Tx bias low warning flag on lane 5: False
        Tx bias low warning flag on lane 6: False
        Tx bias low warning flag on lane 7: False
        Tx bias low warning flag on lane 8: False
        Tx bias low alarm flag on lane 1: False
        Tx bias low alarm flag on lane 2: False
        Tx bias low alarm flag on lane 3: False
        Tx bias low alarm flag on lane 4: False
        Tx bias low alarm flag on lane 5: False
        Tx bias low alarm flag on lane 6: False
        Tx bias low alarm flag on lane 7: False
        Tx bias low alarm flag on lane 8: False
        Laser temperature high alarm flag: False
        Laser temperature high warning flag: False
        Laser temperature low warning flag: False
        Laser temperature low alarm flag: False

For C-CMIS optics (ZR):

cisco@sonic:~$ show interface transceiver status Ethernet272 -n asic2
Ethernet272: 
          Tx fault flag on media lane 1: False
          Tx fault flag on media lane 2: False
          Tx fault flag on media lane 3: False
          Tx fault flag on media lane 4: False
          Tx fault flag on media lane 5: False
          Tx fault flag on media lane 6: False
          Tx fault flag on media lane 7: False
          Tx fault flag on media lane 8: False
          Rx loss of signal flag on media lane 1: False
          Rx loss of signal flag on media lane 2: False
          Rx loss of signal flag on media lane 3: False
          Rx loss of signal flag on media lane 4: False
          Rx loss of signal flag on media lane 5: False
          Rx loss of signal flag on media lane 6: False
          Rx loss of signal flag on media lane 7: False
          Rx loss of signal flag on media lane 8: False
          TX disable status on lane 1: False
          TX disable status on lane 2: False
          TX disable status on lane 3: False
          TX disable status on lane 4: False
          TX disable status on lane 5: False
          TX disable status on lane 6: False
          TX disable status on lane 7: False
          TX disable status on lane 8: False
          Disabled TX channels: 0
          Current module state: ModuleReady
          Reason of entering the module fault state: No Fault detected
          Datapath firmware fault: False
          Module firmware fault: False
          Module state changed: False
          Data path state indicator on host lane 1: DataPathActivated
          Data path state indicator on host lane 2: DataPathActivated
          Data path state indicator on host lane 3: DataPathActivated
          Data path state indicator on host lane 4: DataPathActivated
          Data path state indicator on host lane 5: DataPathActivated
          Data path state indicator on host lane 6: DataPathActivated
          Data path state indicator on host lane 7: DataPathActivated
          Data path state indicator on host lane 8: DataPathActivated
          Tx output status on media lane 1: False
          Tx output status on media lane 2: False
          Tx output status on media lane 3: False
          Tx output status on media lane 4: False
          Tx output status on media lane 5: False
          Tx output status on media lane 6: False
          Tx output status on media lane 7: False
          Tx output status on media lane 8: False
          Rx output status on host lane 1: True
          Rx output status on host lane 2: True
          Rx output status on host lane 3: True
          Rx output status on host lane 4: True
          Rx output status on host lane 5: True
          Rx output status on host lane 6: True
          Rx output status on host lane 7: True
          Rx output status on host lane 8: True
          Tx loss of signal flag on host lane 1: False
          Tx loss of signal flag on host lane 2: False
          Tx loss of signal flag on host lane 3: False
          Tx loss of signal flag on host lane 4: False
          Tx loss of signal flag on host lane 5: False
          Tx loss of signal flag on host lane 6: False
          Tx loss of signal flag on host lane 7: False
          Tx loss of signal flag on host lane 8: False
          Tx clock and data recovery loss of lock on host lane 1: False
          Tx clock and data recovery loss of lock on host lane 2: False
          Tx clock and data recovery loss of lock on host lane 3: False
          Tx clock and data recovery loss of lock on host lane 4: False
          Tx clock and data recovery loss of lock on host lane 5: False
          Tx clock and data recovery loss of lock on host lane 6: False
          Tx clock and data recovery loss of lock on host lane 7: False
          Tx clock and data recovery loss of lock on host lane 8: False
          Rx clock and data recovery loss of lock on media lane 1: False
          Rx clock and data recovery loss of lock on media lane 2: False
          Rx clock and data recovery loss of lock on media lane 3: False
          Rx clock and data recovery loss of lock on media lane 4: False
          Rx clock and data recovery loss of lock on media lane 5: False
          Rx clock and data recovery loss of lock on media lane 6: False
          Rx clock and data recovery loss of lock on media lane 7: False
          Rx clock and data recovery loss of lock on media lane 8: False
          Configuration status for the data path of host line 1: ConfigSuccess
          Configuration status for the data path of host line 2: ConfigSuccess
          Configuration status for the data path of host line 3: ConfigSuccess
          Configuration status for the data path of host line 4: ConfigSuccess
          Configuration status for the data path of host line 5: ConfigSuccess
          Configuration status for the data path of host line 6: ConfigSuccess
          Configuration status for the data path of host line 7: ConfigSuccess
          Configuration status for the data path of host line 8: ConfigSuccess
          Data path configuration updated on host lane 1: False
          Data path configuration updated on host lane 2: False
          Data path configuration updated on host lane 3: False
          Data path configuration updated on host lane 4: False
          Data path configuration updated on host lane 5: False
          Data path configuration updated on host lane 6: False
          Data path configuration updated on host lane 7: False
          Data path configuration updated on host lane 8: False
          Temperature high alarm flag: False
          Temperature high warning flag: False
          Temperature low warning flag: False
          Temperature low alarm flag: False
          Vcc high alarm flag: False
          Vcc high warning flag: False
          Vcc low warning flag: False
          Vcc low alarm flag: False
          Tx power high alarm flag on lane 1: False
          Tx power high alarm flag on lane 2: False
          Tx power high alarm flag on lane 3: False
          Tx power high alarm flag on lane 4: False
          Tx power high alarm flag on lane 5: False
          Tx power high alarm flag on lane 6: False
          Tx power high alarm flag on lane 7: False
          Tx power high alarm flag on lane 8: False
          Tx power high warning flag on lane 1: False
          Tx power high warning flag on lane 2: False
          Tx power high warning flag on lane 3: False
          Tx power high warning flag on lane 4: False
          Tx power high warning flag on lane 5: False
          Tx power high warning flag on lane 6: False
          Tx power high warning flag on lane 7: False
          Tx power high warning flag on lane 8: False
          Tx power low warning flag on lane 1: False
          Tx power low warning flag on lane 2: False
          Tx power low warning flag on lane 3: False
          Tx power low warning flag on lane 4: False
          Tx power low warning flag on lane 5: False
          Tx power low warning flag on lane 6: False
          Tx power low warning flag on lane 7: False
          Tx power low warning flag on lane 8: False
          Tx power low alarm flag on lane 1: False
          Tx power low alarm flag on lane 2: False
          Tx power low alarm flag on lane 3: False
          Tx power low alarm flag on lane 4: False
          Tx power low alarm flag on lane 5: False
          Tx power low alarm flag on lane 6: False
          Tx power low alarm flag on lane 7: False
          Tx power low alarm flag on lane 8: False
          Rx power high alarm flag on lane 1: False
          Rx power high alarm flag on lane 2: False
          Rx power high alarm flag on lane 3: False
          Rx power high alarm flag on lane 4: False
          Rx power high alarm flag on lane 5: False
          Rx power high alarm flag on lane 6: False
          Rx power high alarm flag on lane 7: False
          Rx power high alarm flag on lane 8: False
          Rx power high warning flag on lane 1: False
          Rx power high warning flag on lane 2: False
          Rx power high warning flag on lane 3: False
          Rx power high warning flag on lane 4: False
          Rx power high warning flag on lane 5: False
          Rx power high warning flag on lane 6: False
          Rx power high warning flag on lane 7: False
          Rx power high warning flag on lane 8: False
          Rx power low warning flag on lane 1: False
          Rx power low warning flag on lane 2: False
          Rx power low warning flag on lane 3: False
          Rx power low warning flag on lane 4: False
          Rx power low warning flag on lane 5: False
          Rx power low warning flag on lane 6: False
          Rx power low warning flag on lane 7: False
          Rx power low warning flag on lane 8: False
          Rx power low alarm flag on lane 1: False
          Rx power low alarm flag on lane 2: False
          Rx power low alarm flag on lane 3: False
          Rx power low alarm flag on lane 4: False
          Rx power low alarm flag on lane 5: False
          Rx power low alarm flag on lane 6: False
          Rx power low alarm flag on lane 7: False
          Rx power low alarm flag on lane 8: False
          Tx bias high alarm flag on lane 1: False
          Tx bias high alarm flag on lane 2: False
          Tx bias high alarm flag on lane 3: False
          Tx bias high alarm flag on lane 4: False
          Tx bias high alarm flag on lane 5: False
          Tx bias high alarm flag on lane 6: False
          Tx bias high alarm flag on lane 7: False
          Tx bias high alarm flag on lane 8: False
          Tx bias high warning flag on lane 1: False
          Tx bias high warning flag on lane 2: False
          Tx bias high warning flag on lane 3: False
          Tx bias high warning flag on lane 4: False
          Tx bias high warning flag on lane 5: False
          Tx bias high warning flag on lane 6: False
          Tx bias high warning flag on lane 7: False
          Tx bias high warning flag on lane 8: False
          Tx bias low warning flag on lane 1: False
          Tx bias low warning flag on lane 2: False
          Tx bias low warning flag on lane 3: False
          Tx bias low warning flag on lane 4: False
          Tx bias low warning flag on lane 5: False
          Tx bias low warning flag on lane 6: False
          Tx bias low warning flag on lane 7: False
          Tx bias low warning flag on lane 8: False
          Tx bias low alarm flag on lane 1: False
          Tx bias low alarm flag on lane 2: False
          Tx bias low alarm flag on lane 3: False
          Tx bias low alarm flag on lane 4: False
          Tx bias low alarm flag on lane 5: False
          Tx bias low alarm flag on lane 6: False
          Tx bias low alarm flag on lane 7: False
          Tx bias low alarm flag on lane 8: False
          Laser temperature high alarm flag: False
          Laser temperature high warning flag: False
          Laser temperature low warning flag: False
          Laser temperature low alarm flag: False
          Prefec ber high alarm flag: False
          Prefec ber high warning flag: False
          Prefec ber low warning flag: False
          Prefec ber low alarm flag: False
          Postfec ber high alarm flag: False
          Postfec ber high warning flag: False
          Postfec ber low warning flag: False
          Postfec ber low alarm flag: False
          Tuning in progress status: False
          Laser unlocked status: False
          Target output power out of range flag: False
          Fine tuning out of range flag: False
          Tuning not accepted flag: False
          Invalid channel number flag: False
          Tuning complete flag: False
          Bias xi high alarm flag: False
          Bias xi high warning flag: False
          Bias xi low warning flag: False
          Bias xi low alarm flag: False
          Bias xq high alarm flag: False
          Bias xq high warning flag: False
          Bias xq low warning flag: False
          Bias xq low alarm flag: False
          Bias xp high alarm flag: False
          Bias xp high warning flag: False
          Bias xp low warning flag: False
          Bias xp low alarm flag: False
          Bias yi high alarm flag: False
          Bias yi high warning flag: False
          Bias yi low warning flag: False
          Bias yi low alarm flag: False
          Bias yq high alarm flag: False
          Bias yq high warning flag: False
          Bias yq low warning flag: False
          Bias yq low alarm flag: False
          Bias yp high alarm flag: False
          Bias yp high warning flag: False
          Bias yp low warning flag: False
          Bias yp low alarm flag: False
          CD short high alarm flag: False
          CD short high warning flag: False
          CD short low warning flag: False
          CD short low alarm flag: False
          CD long high alarm flag: False
          CD long high warning flag: False
          CD long low warning flag: False
          CD long low alarm flag: False
          DGD high alarm flag: False
          DGD high warning flag: False
          DGD low warning flag: False
          DGD low alarm flag: False
          PDL high alarm flag: False
          PDL high warning flag: False
          PDL low warning flag: False
          PDL low alarm flag: False
          OSNR high alarm flag: False
          OSNR high warning flag: False
          OSNR low warning flag: False
          OSNR low alarm flag: False
          ESNR high alarm flag: False
          ESNR high warning flag: False
          ESNR low warning flag: False
          ESNR low alarm flag: False
          CFO high alarm flag: False
          CFO high warning flag: False
          CFO low warning flag: False
          CFO low alarm flag: False
          Txcurrpower high alarm flag: False
          Txcurrpower high warning flag: False
          Txcurrpower low warning flag: False
          Txcurrpower low alarm flag: False
          Rxtotpower high alarm flag: False
          Rxtotpower high warning flag: False
          Rxtotpower low warning flag: False
          Rxtotpower low alarm flag: False

@longhuan-cisco
Copy link
Contributor Author

@prgeor @shyam77git @jaganbal-a @mihirpat1 could you please take a look at the PR?

Moved tx_disable/tx_disabled_channel to STATUS table as requested by @mihirpat1. Raised the following additional PRs, please review as well:
sonic-net/sonic-platform-common#359
sonic-net/SONiC#1316

doc/Command-Reference.md Outdated Show resolved Hide resolved
@prgeor
Copy link
Contributor

prgeor commented Apr 12, 2023

@longhuan-cisco can you point to the corresponding HLD for this PR in the PR description

utilities_common/sfp_helper.py Outdated Show resolved Hide resolved
utilities_common/sfp_helper.py Show resolved Hide resolved
@mihirpat1
Copy link
Contributor

@longhuan-cisco - Are you planning to open a separate PR for non CMIS transceivers?

@mihirpat1
Copy link
Contributor

@longhuan-cisco - Can you please help in looking into the built failure for sonic-utilities?

@longhuan-cisco
Copy link
Contributor Author

@longhuan-cisco - Are you planning to open a separate PR for non CMIS transceivers?

Sorry for the delay on responding, was on PTO for past couple weeks. will add support for non CMIS transceivers on existing PRs (including PR of platform-common repo). And will address the comments along with updated diffs.

@longhuan-cisco longhuan-cisco changed the title Add transceiver status CLI to show output from TRANSCEIVER_STATUS table for CMIS/C-CMIS Add transceiver status CLI to show output from TRANSCEIVER_STATUS table May 10, 2023
@longhuan-cisco
Copy link
Contributor Author

@longhuan-cisco can you point to the corresponding HLD for this PR in the PR description

yes, added the HLD link in the description.

@longhuan-cisco
Copy link
Contributor Author

@longhuan-cisco - Can you please help in looking into the built failure for sonic-utilities?

yes, addressed it.

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.

  1. Please ensure the the CLI displays common fields for all transceivers are displayed at the top followed by CMIS specific fields followed by C_CMIS specific fields.
  2. Please help in attaching CLI o/p for all types of transceivers after addressing Move tx_disable/tx_disabled_channel/rx_los/tx_fault to get_transceiver_status API sonic-platform-common#359 (comment)

@longhuan-cisco
Copy link
Contributor Author

Addressed both.
Made sure it follows the proper order.
Added output for all types (non-CMIS/CMIS/C-CMIS) after unifying the format in the other PR.

mihirpat1
mihirpat1 previously approved these changes May 24, 2023
@longhuan-cisco
Copy link
Contributor Author

@prgeor I've addressed the comments, could you take a look plz?

@prgeor
Copy link
Contributor

prgeor commented Jun 1, 2023

@longhuan-cisco can u check why Page 0h Byte 3 to 14 flags are missing For eg RX LOL, TX CDR LOL etc.

@longhuan-cisco
Copy link
Contributor Author

longhuan-cisco commented Jun 1, 2023

@longhuan-cisco can u check why Page 0h Byte 3 to 14 flags are missing For eg RX LOL, TX CDR LOL etc.

For CMIS/C-CMIS,
They are there in the CMIS output:
TX CDR LOL as Tx clock and data recovery loss of lock
RX CDR LOL as Rx clock and data recovery loss of lock

For 100G,
previously, there was no get_transceiver_status API implementation for non-CMIS at all. I was told to add get_transceiver_status API implementation for non-CMIS (including 100G) with only these four fields tx_disable/tx_disabled_channel/rx_los/tx_fault via sonic-net/sonic-platform-common#359. If we want to add more fields for 100G (in terms of, support in eeprom parsing and get_transceiver_status API/etc), we may better to track it as separate git issue/PR in another repo https://github.com/sonic-net/sonic-platform-common

@prgeor prgeor merged commit b316fc2 into sonic-net:master Jun 1, 2023
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jun 5, 2023
Update sonic-utilities submodule pointer to include the following:
* 5c9b2177 Fix issue: out of range sflow polling interval is accepted and stored in config_db ([sonic-net#2847](sonic-net/sonic-utilities#2847))
* 72ca4848 Add CLI configuration options for teamd retry count feature ([sonic-net#2642](sonic-net/sonic-utilities#2642))
* 359dfc0c [Clock] Implement clock CLI ([sonic-net#2793](sonic-net/sonic-utilities#2793))
* b316fc27 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table ([sonic-net#2772](sonic-net/sonic-utilities#2772))
* dc59dbd2 Replace pickle by json ([sonic-net#2849](sonic-net/sonic-utilities#2849))
* a66f41c4 [show] replace shell=True, replace xml by lxml, replace exit by sys.exit ([sonic-net#2666](sonic-net/sonic-utilities#2666))
* 57500572 [utilities_common] replace shell=True ([sonic-net#2718](sonic-net/sonic-utilities#2718))
* 6e0ee3e7 [CRM][DASH] Extend CRM utility to support DASH resources. ([sonic-net#2800](sonic-net/sonic-utilities#2800))
* b2c29b0b [config] Generate sysinfo in single asic ([sonic-net#2856](sonic-net/sonic-utilities#2856))

Signed-off-by: dprital <drorp@nvidia.com>
StormLiangMS pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 5, 2023
…nic-utilities submodule on master (#15193)

Dependency:
sonic-net/sonic-utilities#2718

Why I did it
This PR sonic-net/sonic-utilities#2718 reduce shell=True usage in utilities_common.cli.run_command() function.

Work item tracking
Microsoft ADO (number only): 15022050
How I did it
Replace strings commands using utilities_common.cli.run_command() function to list of strings

due to circular dependency, advance sonic-utilities submodule
72ca4848 (HEAD -> master, upstream/master, upstream/HEAD) Add CLI configuration options for teamd retry count feature (sonic-net/sonic-utilities#2642)
359dfc0c [Clock] Implement clock CLI (sonic-net/sonic-utilities#2793)
b316fc27 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table (sonic-net/sonic-utilities#2772)
dc59dbd2 Replace pickle by json (sonic-net/sonic-utilities#2849)
a66f41c4 [show] replace shell=True, replace xml by lxml, replace exit by sys.exit (sonic-net/sonic-utilities#2666)
57500572 [utilities_common] replace shell=True (sonic-net/sonic-utilities#2718)
6e0ee3e7 [CRM][DASH] Extend CRM utility to support DASH resources. (sonic-net/sonic-utilities#2800)
b2c29b0b [config] Generate sysinfo in single asic (sonic-net/sonic-utilities#2856)
@mihirpat1
Copy link
Contributor

mihirpat1 commented Jul 18, 2023

@yxieca @StormLiangMS - Can you please help with cherry-pick for this to 202205 and 202211
ADO - 24559363

@StormLiangMS
Copy link
Contributor

@prgeor this is already in 202305.

longhuan-cisco added a commit to longhuan-cisco/sonic-utilities that referenced this pull request Aug 21, 2023
pdhruv-marvell pushed a commit to pdhruv-marvell/sonic-utilities that referenced this pull request Aug 23, 2023
…le (sonic-net#2772)

* Add transceiver status CLI to display TRANSCEIVER_STATUS table for CMIS/C-CMIS

* Fix typo in command-ref

* Add tx_disable

* Update tx_disabled_channel's discription

* Remove redundant code

* addressed comments

* Fix typo for tx power low warning

* Separate CMIS and CCMIS status map

* code cleanup

* Unify display format and update display order

* Fix after merge from master
yxieca pushed a commit that referenced this pull request Aug 23, 2023
…le (cherry-pick to 202205) (#2950)

* Add transceiver status CLI to show output from TRANSCEIVER_STATUS table (#2772)

* Correct Command-Reference.md

* Use double quote
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
…nic-utilities submodule on master (sonic-net#15193)

Dependency:
sonic-net/sonic-utilities#2718

Why I did it
This PR sonic-net/sonic-utilities#2718 reduce shell=True usage in utilities_common.cli.run_command() function.

Work item tracking
Microsoft ADO (number only): 15022050
How I did it
Replace strings commands using utilities_common.cli.run_command() function to list of strings

due to circular dependency, advance sonic-utilities submodule
72ca4848 (HEAD -> master, upstream/master, upstream/HEAD) Add CLI configuration options for teamd retry count feature (sonic-net/sonic-utilities#2642)
359dfc0c [Clock] Implement clock CLI (sonic-net/sonic-utilities#2793)
b316fc27 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table (sonic-net/sonic-utilities#2772)
dc59dbd2 Replace pickle by json (sonic-net/sonic-utilities#2849)
a66f41c4 [show] replace shell=True, replace xml by lxml, replace exit by sys.exit (sonic-net/sonic-utilities#2666)
57500572 [utilities_common] replace shell=True (sonic-net/sonic-utilities#2718)
6e0ee3e7 [CRM][DASH] Extend CRM utility to support DASH resources. (sonic-net/sonic-utilities#2800)
b2c29b0b [config] Generate sysinfo in single asic (sonic-net/sonic-utilities#2856)
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.

4 participants