Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NX-OS show interface transceiver template failure #952

Closed
chipn opened this issue Jul 28, 2021 · 0 comments
Closed

NX-OS show interface transceiver template failure #952

chipn opened this issue Jul 28, 2021 · 0 comments

Comments

@chipn
Copy link
Contributor

chipn commented Jul 28, 2021

ISSUE TYPE
  • Bug Report
TEMPLATE USING
Value INTERFACE (\S+/\S+)
Value MANUFACTURER (\S+)
Value TYPE (.+)
Value SERIAL (\S+)
Value PART_NUMBER (\S+)

Start
  ^${INTERFACE}
  ^\s+transceiver is not -> Clear
  ^\s+type\s+is(\s+${TYPE})?
  ^\s+name\s+is(\s+${MANUFACTURER})?
  ^\s+part\s+number\s+is(\s+${PART_NUMBER})?
  ^\s+serial\s+number\s+is(\s+${SERIAL})?
  ^\s+transceiver\s+
  ^\s+nominal\s+
  ^\s+revision\s+
  ^\s+Link\s+
  ^\s+cisco\s+id
  ^\s+cisco\s+extended
  ^\s*$$ -> Record
  ^. -> Error
SAMPLE COMMAND OUTPUT
Ethernet1/48
    transceiver is present
    type is 10Gbase-SR
    name is CISCO-OEM
    part number is SFP-10GB-SR
    revision is B4
    serial number is GTWG0000
    nominal bitrate is 10300 MBit/sec
    Link length supported for 50/125um OM2 fiber is 82 m
    Link length supported for 62.5/125um fiber is 26 m
    Link length supported for 50/125um OM3 fiber is 300 m
    cisco id is 3
    cisco extended id number is 4
    cisco part number is 10-2415-01
    cisco product id is SFP-10G-SR
SUMMARY

NX-OS 7.0(3)I7(8)
Nexus 9000 93180YC-EX

When parsing the above output, TextFSM reports an error:

TextFSMError: State Error raised. Rule Line: 21. Input Line:     cisco part number is 10-2415-01
STEPS TO REPRODUCE
parsed = parse_output(platform="cisco_nxos", command="show interface transceiver", data=output)
EXPECTED RESULTS
 {'interface': 'Ethernet1/48',
  'manufacturer': 'CISCO-OEM',
  'type': '10Gbase-SR',
  'serial': 'GTWG0000',
  'part_number': 'SFP-10GB-SR'}
ACTUAL RESULTS
TextFSMError: State Error raised. Rule Line: 21. Input Line:     cisco part number is 10-2415-01
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant