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

[show] Add and rename 'show interfaces transceiver' subcommands (eeprom, lpmode, presence) #182

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Dec 21, 2017

- What I did

  • Remove show interfaces transceiver basic and show interfaces transceiver details and combine the functionality into show interfaces transceiver eeprom [-d/--dom]

  • Add show interfaces transceiver lpmode and show interfaces transceiver presence commands to give show command access to new sfputil functionality

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

admin@sonic:~$ show interfaces transceiver basic Ethernet0
Command: sudo sfputil show eeprom -p Ethernet0
Ethernet0: SFP EEPROM detected
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Unknown
        Extended RateSelect Compliance: QSFP+ Rate Select Version 1
        Identifier: QSFP+
        Length Cable Assembly(m): 1
        Specification compliance:
                10/40G Ethernet Compliance Code: 40GBASE-CR4
                Fibre Channel Speed: 1200 Mbytes/Sec
                Fibre Channel link length/Transmitter Technology: Electrical inter-enclosure (EL)
                Fibre Channel transmission media: Twin Axial Pair (TW)
        Vendor Date Code(YYYY-MM-DD Lot): 2015-11-03 
        Vendor Name: Molex Inc.
        Vendor OUI: 00-09-3a
        Vendor PN: 1110401104
        Vendor Rev: 
        Vendor SN: 530736557
admin@sonic:~$ show interfaces transceiver details Ethernet0     
Command: sudo sfputil show eeprom --dom -p Ethernet0
Ethernet0: SFP EEPROM detected
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Unknown
        Extended RateSelect Compliance: QSFP+ Rate Select Version 1
        Identifier: QSFP+
        Length Cable Assembly(m): 1
        Specification compliance:
                10/40G Ethernet Compliance Code: 40GBASE-CR4
                Fibre Channel Speed: 1200 Mbytes/Sec
                Fibre Channel link length/Transmitter Technology: Electrical inter-enclosure (EL)
                Fibre Channel transmission media: Twin Axial Pair (TW)
        Vendor Date Code(YYYY-MM-DD Lot): 2015-11-03 
        Vendor Name: Molex Inc.
        Vendor OUI: 00-09-3a
        Vendor PN: 1110401104
        Vendor Rev: 
        Vendor SN: 530736557
        ChannelMonitorValues:
                RX1Power: -infdBm
                RX2Power: -infdBm
                RX3Power: -infdBm
                RX4Power: -infdBm
                TX1Bias: 0.0000mA
                TX2Bias: 0.0000mA
                TX3Bias: 0.0000mA
                TX4Bias: 0.0000mA
        ModuleMonitorValues:
                Temperature: 1.5039C
                Vcc: 0.0000Volts

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

admin@sonic:~$ show interfaces transceiver basic Ethernet0
Usage: show interfaces transceiver [OPTIONS] COMMAND [ARGS]...

Error: No such command "basic".
admin@sonic:~$ show interfaces transceiver details Ethernet0
Usage: show interfaces transceiver [OPTIONS] COMMAND [ARGS]...

Error: No such command "details".
admin@sonic:~$ show interfaces transceiver eeprom Ethernet0
Command: sudo sfputil show eeprom -p Ethernet0
Ethernet0: SFP EEPROM detected
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Unknown
        Extended RateSelect Compliance: QSFP+ Rate Select Version 1
        Identifier: QSFP+
        Length Cable Assembly(m): 1
        Specification compliance:
                10/40G Ethernet Compliance Code: 40GBASE-CR4
                Fibre Channel Speed: 1200 Mbytes/Sec
                Fibre Channel link length/Transmitter Technology: Electrical inter-enclosure (EL)
                Fibre Channel transmission media: Twin Axial Pair (TW)
        Vendor Date Code(YYYY-MM-DD Lot): 2016-05-08 
        Vendor Name: Molex Inc.
        Vendor OUI: 00-09-3a
        Vendor PN: 1110401054
        Vendor Rev: 
        Vendor SN: 612930553
admin@sonic:~$ show interfaces transceiver eeprom Ethernet0 --dom
Command: sudo sfputil show eeprom --dom -p Ethernet0
Ethernet0: SFP EEPROM detected
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Unknown
        Extended RateSelect Compliance: QSFP+ Rate Select Version 1
        Identifier: QSFP+
        Length Cable Assembly(m): 1
        Specification compliance:
                10/40G Ethernet Compliance Code: 40GBASE-CR4
                Fibre Channel Speed: 1200 Mbytes/Sec
                Fibre Channel link length/Transmitter Technology: Electrical inter-enclosure (EL)
                Fibre Channel transmission media: Twin Axial Pair (TW)
        Vendor Date Code(YYYY-MM-DD Lot): 2016-05-08 
        Vendor Name: Molex Inc.
        Vendor OUI: 00-09-3a
        Vendor PN: 1110401054
        Vendor Rev: 
        Vendor SN: 612930553
        ChannelMonitorValues:
                RX1Power: -infdBm
                RX2Power: -infdBm
                RX3Power: -infdBm
                RX4Power: -infdBm
                TX1Bias: 0.0000mA
                TX2Bias: 0.0000mA
                TX3Bias: 0.0000mA
                TX4Bias: 0.0000mA
        ModuleMonitorValues:
                Temperature: 1.5039C
                Vcc: 0.0000Volts
admin@sonic:~$ show interfaces transceiver lpmode      
Command: sudo sfputil show lpmode
Port         Low-power Mode
-----------  ----------------
Ethernet0    On
Ethernet4    On
Ethernet8    On
Ethernet12   On
Ethernet16   On
Ethernet20   On
Ethernet24   On
Ethernet28   On
Ethernet32   On
Ethernet36   On
Ethernet40   On
Ethernet44   On
Ethernet48   On
Ethernet52   On
Ethernet56   On
Ethernet60   On
Ethernet64   On
Ethernet68   On
Ethernet72   On
Ethernet76   On
Ethernet80   On
Ethernet84   On
Ethernet88   On
Ethernet92   On
Ethernet96   On
Ethernet100  On
Ethernet104  On
Ethernet108  On
Ethernet112  On
Ethernet116  On
Ethernet120  On
Ethernet124  On
admin@sonic:~$ show interfaces transceiver presence
Command: sudo sfputil show presence
Port         Presence
-----------  ----------
Ethernet0    Present
Ethernet4    Present
Ethernet8    Present
Ethernet12   Present
Ethernet16   Present
Ethernet20   Present
Ethernet24   Present
Ethernet28   Present
Ethernet32   Present
Ethernet36   Present
Ethernet40   Present
Ethernet44   Present
Ethernet48   Present
Ethernet52   Present
Ethernet56   Present
Ethernet60   Present
Ethernet64   Present
Ethernet68   Present
Ethernet72   Present
Ethernet76   Present
Ethernet80   Present
Ethernet84   Present
Ethernet88   Present
Ethernet92   Present
Ethernet96   Present
Ethernet100  Present
Ethernet104  Present
Ethernet108  Present
Ethernet112  Present
Ethernet116  Present
Ethernet120  Present
Ethernet124  Present

@jleveque jleveque self-assigned this Dec 21, 2017
@jleveque jleveque requested a review from lguohan December 21, 2017 22:58
Copy link
Contributor

@nikos-github nikos-github left a comment

Choose a reason for hiding this comment

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

Please provide output from all show commands you are changing/removing, before and after.

@nikos-github
Copy link
Contributor

nikos-github commented Jan 8, 2018

Do not merge this please, until the requested output has been provided and the changes have received an explicit sign off by all reviewers.

@nikos-github
Copy link
Contributor

nikos-github commented Jan 8, 2018

We would like to request modifying 'show interface status' to include the output for 'show interfaces transceiver presence' and to not introduce 'show interfaces transceiver presence'. That way we can figure out the basic things out of one command rather than typing two. We shouldn't need to introduce 'show interfaces transceiver presence'.

@jleveque
Copy link
Contributor Author

@Nikos-Li: Requested output has been provided.

Regarding your request to include transceiver presence in the output of show interface status, please open an issue in this repo requesting that modification. That request will not be handled as part of this PR. We can discuss reorganizing the commands and their output in the separate issue. For now, all transceiver-related data will be found under show interfaces transceiver with this PR.

@jleveque jleveque merged commit 94e2bb0 into sonic-net:master Jan 11, 2018
@jleveque jleveque deleted the show_sfp branch January 11, 2018 17:07
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
…onic-net#182)

Signed-off-by: vaibhav-dahiya [email protected]
This PR refactors the get_firmware_version output to return the following fields for each target.

{
"version_active": "",
"version_inactive": "",
"version_next": "",
}

Signed-off-by: vaibhav-dahiya <[email protected]>
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.

3 participants