parse_interfaces_brief: 0 interfaces when the output has an Intrusion Alert column #3

Closed
opened 2026-09-25 06:52:24 +00:00 by christianmanivong · 0 comments
Owner

Failure signature

A ProCurve switch polled over CLI reports 0 interfaces found, while VLANs and ARP parse fine. show interfaces brief on that switch:

                   | Intrusion                           MDI  Flow Bcast
  Port   Type      | Alert     Enabled Status Mode       Mode Ctrl Limit
  ------ --------- + --------- ------- ------ ---------- ---- ---- -----
  1      100/1000T | No        Yes     Up     1000FDx    MDI  on   0
  3-Trk3 100/1000T | No        Yes     Down   1000FDx    MDI  off  0
  6-Trk6 100/1000T | No        No      Down   1000FDx    NA   off  0
  10     1000SX    | No        Yes     Up     1000FDx    NA   off  0

Root cause

_INTF_BRIEF_RE (parsers.py) expects Enabled directly after the |, then Up|Down. With the Intrusion Alert column in between, Alert=No is read as Enabled and Yes fails the Up|Down group, so no line matches.

Also: trunk members are listed as <port>-Trk<n>. The port name is <port>; the suffix is its trunk group, and show interfaces 3-Trk3 would not work as a per-port detail command.

Expected

Both layouts parse. 3-Trk3 becomes port 3 with trunk_group Trk3.

## Failure signature A ProCurve switch polled over CLI reports `0 interfaces found`, while VLANs and ARP parse fine. `show interfaces brief` on that switch: ``` | Intrusion MDI Flow Bcast Port Type | Alert Enabled Status Mode Mode Ctrl Limit ------ --------- + --------- ------- ------ ---------- ---- ---- ----- 1 100/1000T | No Yes Up 1000FDx MDI on 0 3-Trk3 100/1000T | No Yes Down 1000FDx MDI off 0 6-Trk6 100/1000T | No No Down 1000FDx NA off 0 10 1000SX | No Yes Up 1000FDx NA off 0 ``` ## Root cause `_INTF_BRIEF_RE` (`parsers.py`) expects `Enabled` directly after the `|`, then `Up|Down`. With the `Intrusion Alert` column in between, `Alert=No` is read as Enabled and `Yes` fails the `Up|Down` group, so no line matches. Also: trunk members are listed as `<port>-Trk<n>`. The port name is `<port>`; the suffix is its trunk group, and `show interfaces 3-Trk3` would not work as a per-port detail command. ## Expected Both layouts parse. `3-Trk3` becomes port `3` with `trunk_group` `Trk3`.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-hpe-aruba-procurve#3