Skip to content

arista_eos_show_inventory: parse storage, modules, split tables#4

Merged
mjbear merged 5 commits into
mjbear:arista_eos_sh_inv_error-directivefrom
surudhi:error-directive-arista-testing
Jul 2, 2026
Merged

arista_eos_show_inventory: parse storage, modules, split tables#4
mjbear merged 5 commits into
mjbear:arista_eos_sh_inv_error-directivefrom
surudhi:error-directive-arista-testing

Conversation

@surudhi

@surudhi surudhi commented Jun 16, 2026

Copy link
Copy Markdown

addition to networktocode#2323

Validating the error-directive template against `show inventory` from
~143 in-service EOS switches fleet-wide (AMER/EMEA/APAC, ~80 distinct
model+version combinations across the 7010-7500 range, EOS 4.18-4.35)
surfaced several real-world layouts that fell through to Error or were
mis-parsed:

- Trailing whitespace on the "Rev" header line defeated its `$$` anchor
  (the most common failure, 54 of the 143 captures).
- DESCR `(.+)` absorbed inter-column whitespace, so transceiver rows
  with a blank Rev (third-party optics: FS, PROLABS, ...) were silently
  mis-mapped (model/serial shifted into the wrong fields). Anchoring
  DESCR to start non-whitespace (`\S.*`) fixes this without changing any
  existing capture.
- "Not Present" transceiver slots (port + literal only).
- Storage device tables after the transceiver section, including the
  wrapped "Size (GB)" sub-table, multi-device output, and the
  per-supervisor "Supervisor N:" layout on modular systems.
- A second "System has N auxiliary transceiver slots" table following
  the switched transceiver table (7280DR3A).
- 7130 "Subcomponent serial numbers" block in the chassis section.
- "System has N card slots" line-card/supervisor module table
  (7500-series and 7060X6).
- Split Model/Description chassis tables on newer SKUs, which
  previously mis-captured PID/DESCR.

Line-card and supervisor modules (card-slot section) are recorded
(DESCR=slot, PID=model, VID=HW, SN=serial). Subcomponent, storage,
"Not Present", and the chassis/line-card faceplate transceiver rows
("Arista Networks <chassis/linecard>" with no serial, e.g. fixed copper
ports) are consumed without records, keeping the row schema focused on
present pluggable inventory.

Add eight anonymized fixtures covering these layouts; all serial numbers
are replaced with length-preserving fakes.
@mjbear

mjbear commented Jun 21, 2026

Copy link
Copy Markdown
Owner

@surudhi
Thank you for the update.

Seems like some of the raw data is similar in overall structure.
With one commit it isn't apparent which raw files are related to which modification.
Are you able to outline which files are related to storage, modules or "split tables"?

Thank you!

@mjbear mjbear added the WIP label Jun 21, 2026
mjbear added 4 commits June 21, 2026 16:02
Make the separator pattern repeating and more distinct to reduce
the chances it accidentally matches an unintended line.
This line was effectively replaced by another contributor
instead of changing this line. Removing it.
Reducing duplicate lines to keep test data viable, yet compact.
@mjbear mjbear force-pushed the error-directive-arista-testing branch from 91ff7b5 to c9dc58a Compare June 21, 2026 22:22
@surudhi

surudhi commented Jun 24, 2026

Copy link
Copy Markdown
Author

@surudhi Thank you for the update.

Seems like some of the raw data is similar in overall structure. With one commit it isn't apparent which raw files are related to which modification. Are you able to outline which files are related to storage, modules or "split tables"?

Thank you!

Yeah sure, I've listed them below

Fixture Device Parser path
arista_eos_show_inventory3 7280CR3-32D4 Split Model / Description tables (two separate header blocks)
arista_eos_show_inventory4 7130-48LBS Subcomponent serial numbers block
arista_eos_show_inventory5 7504 ModulesSystem has N card slots line-card table; slash port IDs (3/1); line-card faceplate rows consumed
arista_eos_show_inventory6 7280SE-64 Storage — multi-device + wrapped Size (GB) sub-table
arista_eos_show_inventory7 7150S-52-CL Trailing System has precision clock line
arista_eos_show_inventory8 7280DR3A-36 Second System has N auxiliary transceiver slots table
arista_eos_show_inventory9 7060X6-64PE Modules — single Supervisor card slot; storage with per-supervisor Supervisor N: label
arista_eos_show_inventory10 7060SX2-48YC6 Transceiver row with blank Rev (third-party optic, e.g. FS)

@mjbear mjbear removed the WIP label Jul 2, 2026
@mjbear mjbear merged commit 7aef412 into mjbear:arista_eos_sh_inv_error-directive Jul 2, 2026
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.

2 participants