Repository navigation
Conversation
SN was captured with ([\w+\d+]+), which stops at the first character
outside letters, digits, "_" and "+". Serials of Cisco AOC/DAC and
breakout cables carry a suffix such as "-A", "-B" or "-CH1", so
"APF22340C1D-B" parsed as "APF22340C1D", and the four legs of a
breakout cable all got the same serial. SN is now (\S+).
PID was cut at the first space ("Samsung SSD 860 EVO 250GB" parsed as
"Samsung"). PID now takes everything up to the last non-space before
the comma, and may still be empty.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MahakSangwan
requested review from
itdependsnetworks,
jmcgill298,
jvanderaa,
matt852 and
mjbear
as code owners
November 11, 2026 04:29
MahakSangwan
added a commit
to MahakSangwan/NetworkSDK
that referenced
this pull request
Nov 11, 2026
get_inventory() sends only `show inventory`. Neither engine is right as released: Genie crashes or drops items, ntc-templates 9.3 cuts serials at the first "-" and part IDs at a space. We ship a corrected copy of the ntc-templates template (two Value lines changed, sent upstream as networktocode/ntc-templates#2377) and parse_textfsm() gains a template argument. A test fails once the released template is fixed, so the copy gets deleted. Fixtures: 30 genieparser and 2 ntc-templates samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mjbear
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ISSUE TYPE
COMPONENT
cisco_ios_show_inventory (cisco_ios,
show inventory)SUMMARY
Two values were cut short:
([\w+\d+]+), which stops at the first character outside letters, digits,_and+. Serials of Cisco AOC/DAC and breakout cables carry a suffix such as-A,-Bor-CH1, soSN: APF22340C1D-Bparsed asAPF22340C1D. On a QSFP-to-4xSFP breakout cable, all four legs (...-CH1to...-CH4) parsed to the same serial.PID: Samsung SSD 860 EVO 250GB , VID: ...parsed asSamsung(seen on an ASR/ISR disk).Changes:
PID now takes everything up to the last non-space character before the comma. It is still optional, so a blank PID (
PID: , VID: 0xFF, SN: FF1045C5incisco_ios_show_inventory.raw) keeps its SN. The rules are unchanged.The new test
cisco_ios_show_inventory_sn_dash_pid_spacecovers dashed AOC/DAC serials, the four legs of a breakout cable and a PID with spaces, in the IOS XE layout (padded values, trailing spaces after SN). Serials are made up. The existingshow_inventorytests pass unchanged, and so does the full test suite locally.🤖 Generated with Claude Code