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

[sfpshow] Add dom_capability to transceiver eeprom #1003

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kuanyu99
Copy link
Contributor

- What I did
Show the dom_capability of the transceiver when user asking the EEPROM data.
Decode EEPROM data as UTF-8 preventing character be parsed as ASCII.

- How I did it
Add a additional qsfp_data_map item to get dom_capability from db.

- How to verify it
Run 'show interfaces transceiver eeprom' command.

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

Ethernet31: SFP EEPROM detected
        Connector: Unknown
        Encoding: Unknown
        Extended Identifier: Unknown
        Extended RateSelect Compliance: Unknown
        Identifier: Unknown
        LengthOM3(UnitsOf10m): 75
        Nominal Bit Rate(100Mbs): 75
        Specification compliance:
                10GEthernetComplianceCode: 10G Base-LR
                ESCONComplianceCodes: ESCON MMF, 1310nm LED
                EthernetComplianceCodes: 1000BASE-CX
                FibreChannelLinkLength: Intermediate distance (I)
                FibreChannelSpeed: 100 MBytes/sec
                FibreChannelTechnology: Longwave Laser (LC)
                FibreChannelTransmissionMedia: Multimode, 62.5um (M6)
                InfinibandComplianceCode: 1X Copper Passive
                SFP+CableTechnology: Active Cable
                SONETComplianceCodes: OC-12, single mode, inter reach
        Vendor Date Code(YYYY-MM-DD Lot): 2004-02-02 00
        Vendor Name: KKKKON
        Vendor OUI: 00-00-00
        Vendor PN: SFP-LP2▒0
        Vendor Rev: R01
        Vendor SN: 0000040600000036

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

Ethernet31: SFP EEPROM detected
        Connector: Unknown
        DOM Capability:
                sff8472_dom_support: no
        Encoding: Unknown
        Extended Identifier: Unknown
        Extended RateSelect Compliance: Unknown
        Identifier: Unknown
        LengthOM3(UnitsOf10m): 75
        Nominal Bit Rate(100Mbs): 75
        Specification compliance:
                10GEthernetComplianceCode: 10G Base-LR
                ESCONComplianceCodes: ESCON MMF, 1310nm LED
                EthernetComplianceCodes: 1000BASE-CX
                FibreChannelLinkLength: Intermediate distance (I)
                FibreChannelSpeed: 100 MBytes/sec
                FibreChannelTechnology: Longwave Laser (LC)
                FibreChannelTransmissionMedia: Multimode, 62.5um (M6)
                InfinibandComplianceCode: 1X Copper Passive
                SFP+CableTechnology: Active Cable
                SONETComplianceCodes: OC-12, single mode, inter reach
        Vendor Date Code(YYYY-MM-DD Lot): 2004-02-02 00
        Vendor Name: KKKKON
        Vendor OUI: 00-00-00
        Vendor PN: SFP-LP2▒0
        Vendor Rev: R01
        Vendor SN: 0000040600000036

* Basic dom capability info can be retrieved by "show interfaces transceiver eeprom"
@kuanyu99
Copy link
Contributor Author

Retest this please

@jleveque jleveque requested a review from keboliu July 24, 2020 22:31
* Add dom_capability entry into state_db.json
* Modify expected output of the sfp_test.py
@lguohan
Copy link
Contributor

lguohan commented Aug 12, 2020

can you resolve conflict?

…o ky_modify_sfpshow

* Update the tests/mock_tables/state_db.json
Copy link
Collaborator

@keboliu keboliu left a comment

Choose a reason for hiding this comment

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

do we really need this to be added to the show result explicitly? I mean we can tell from the show result, if the DOM related filled are filled with 'N/A' or '0' values means it not supported.

@kuanyu99
Copy link
Contributor Author

Imaging that, if you are trying to get the DOM sensor value of your SFP transceiver, you get all N/A or 0.
You may start to wonder if the transceiver broken or it just doesn't support DOM sensor feature.
With this, you can make sure the N/A or 0 result is correct if the SFP transceiver show "sff8472_dom_support: no".

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