aruba_aoscx_show_interface: capture Filtered counters and tolerate L3/VRF/subinterface output#2316
Conversation
…/VRF/subinterface output
matt852
left a comment
There was a problem hiding this comment.
Breaking change, so holding off on merging until ready for a new release.
Would this be a breaking change though? It's backwards compatible (something that used an old template would be oblivious to a new key). It's not like a key name changed or the data type (scalar or string vs list, etc). |
|
Thanks @mjbear — agreed, "breaking" was being over-cautious. The only consumer that'd notice is one snapshot-testing against a fixed key set; anyone indexing by key name is unaffected since no existing key was renamed, retyped, or had its value format changed. Will skip the breaking label on similar additive PRs going forward. @matt852 — happy to drop the release hold then? |
I feel the breaking change label isn't needed on this PR. Letting some time pass so @matt852 has time to review. |
There was a problem hiding this comment.
I am good with dropping the breaking change label. It came from a misunderstanding of one of the existing docs by the AI reviewer agent.
After refining the agentic reviewer further, there are a couple new changes suggested (though not required), along with a test coverage update finding, generated by Claude:
Two of the three new tolerance rules ship without raw fixture coverage. ^\s*VRF\s+name\s+is\s+\S+ is exercised by show_interface6.raw, but the new ^\s*Subinterface\s+count and ^\s*active-gateway\s rules have no .raw line in this PR that exercises them. Project policy is that every template change needs corresponding test data — if you can capture a real-output sample of a parent interface with subinterfaces and an interface with active-gateway (even a small one) and add it as a .raw + .yml pair, that closes the loop. Alternatively, drop those two rules until you have such output captured and add them in a follow-up.
| Value TX_DROPPED (\d+) | ||
| Value TX_FILTERED (\d+) | ||
| Value TX_CRC_FCS (\S+) | ||
| Value TX_COLLISION (\d+) |
There was a problem hiding this comment.
| Value TX_COLLISION (\d+) | |
| Value TX_COLLISION (\d+) | |
| Value VRF (\S+) |
| ^\s*Rate\s+RX\s+TX\s+Total -> Rate | ||
| ^\s*Statistic\s+RX\s+TX\s+Total -> Statistic | ||
| ^\s*active-gateway\s | ||
| ^\s*VRF\s+name\s+is\s+\S+ |
There was a problem hiding this comment.
| ^\s*VRF\s+name\s+is\s+\S+ | |
| ^\s*VRF\s+name\s+is\s+${VRF} |
…subinterface and active-gateway tolerance rules
|
Thanks @matt852 — Bundled both the required coverage and the suggested VRF capture in one push:
All 9 fixtures regenerated; parser tests + meta tests green locally. Pushed. |
matt852
left a comment
There was a problem hiding this comment.
Thanks @julmanglano — looks good to merge.
ISSUE TYPE
COMPONENT
aruba_aoscx,
show interfaceSUMMARY
Three changes to
aruba_aoscx_show_interface:New
Filteredcounters. AddsRX_FILTERED/TX_FILTEREDcapture groups + a matching
^\s*Filteredrule in theStatisticstate. AOS-CX emits these on switches running L3ACLs / classifier policies; the existing template ignored them.
L3 / aggregate / subinterface tolerance. Adds three
no-op match lines so previously-fatal output no longer hits
^. -> Error:^\s*Subinterface\s+count— emitted on parent interfacesthat carry subinterfaces.
^\s*active-gateway\s— emitted on interfaces withactive-gateway/VRRP-style virtual IPs.
^\s*VRF\s+name\s+is\s+\S+— emitted on interfaces bound toa non-default VRF.
Two new fixtures.
show_interface5.{raw,yml}— exercises theFilteredcounters, an L3-routed interface block, an admin-down
header variant, and a
No XCVRtransceiver state.show_interface6.{raw,yml}— two loopbacks in non-defaultVRFs (
VRF_RED/VRF_BLUE), exercising the new VRFswallow rule.
BREAKING CHANGE
The two new
ValuedeclarationsRX_FILTEREDandTX_FILTEREDadd
rx_filtered/tx_filteredkeys to every parsed record.Existing fixtures (
show_interface{,1-4}.yml) have been updatedwith empty-string defaults to reflect the new schema; consumers
already defending against unknown keys are unaffected, but anyone
diffing against a fixed key set will see two new keys.
NOT INCLUDED
VRF capture (turning the VRF line into a
Valuerather than aswallow) is deferred — it would require updating every existing
fixture again and the user does not currently have a captured
data sample for every interface variant. The swallow rule is
sufficient to unblock parsing on VRF-bound interfaces; promoting
to a capture group can be done in a follow-up.