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

Changed Cisco NXOS show interface transceiver command parser to fix error with vendor ID #1614

Conversation

SaschaSchwarzK
Copy link
Contributor

The parsing of a Nexus3500 C3548P-10GX version 7.0(3)I7(7) failed with the error below:

Ethernet1/2
    transceiver is present
    type is SFP-H10GB-CU1M
    name is CISCO-MOLEX
    part number is 74752-9519
    revision is 09
    serial number is MOCxxxxxxxxB
    nominal bitrate is 10300 MBit/sec
    Link length supported for copper is 1 m
    cisco id is 3
    cisco extended id number is 4
    cisco part number is 37-0960-03
    cisco product id is SFP-H10GB-CU1M
    cisco vendor id is V03   -> Error



    raise TextFSMError('State Error raised. Rule Line: %s. Input Line: %s'
textfsm.parser.TextFSMError: State Error raised. Rule Line: 25. Input Line:     cisco vendor id is V03

This change will fix this issue, but also add two new fields "status" and "product_id".

The "status" field can not only be used to determine if a transceiver is present or not, but also if the port does support transceivers or not("not applicable"). This can help to identify fixed copper ports on Fabric extenders or 1/10GBaseT ports on Nexus 9k. This change will produce more results as no item was generated when an SFP was not present, but that could easily be sorted out by matching on the value for the status.

The "product_id" field is helpful to get a Cisco like Part ID for a non Cisco transceiver like in the examples below.

Ethernet1/14
    transceiver is present
    type is 10Gbase-LR
    name is CISCO-FINISAR
    part number is FTLX1475D3BCL-C2
    revision is A
    serial number is FNSxxxxxxx
    nominal bitrate is 10300 MBit/sec
    Link length supported for 9/125um fiber is 10 km
    cisco id is 3
    cisco extended id number is 4
    cisco part number is 10-2457-02
    cisco product id is SFP-10G-LR
    cisco vendor id is V02

Ethernet1/19
    transceiver is present
    type is 1000base-LH
    name is CISCO
    part number is SFCT-5716PZ-CS1
    revision is 002
    serial number is AVxxxxxxx
    nominal bitrate is 1300 MBit/sec
    Link length supported for 9/125um fiber is 10 km
    cisco id is 3
    cisco extended id number is 4
    cisco part number is 10-2625-01
    cisco product id is GLC-LH-SMD
    cisco vendor id is V01

@jvanderaa jvanderaa merged commit b9272c7 into networktocode:master Feb 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants