Skip to content

schema: add index_filter to get_interface_statistics (#272) - #387

Draft
AdamRickards wants to merge 1 commit into
mainfrom
review/272-index-filter
Draft

AdamRickards wants to merge 1 commit into
mainfrom
review/272-index-filter

Conversation

@AdamRickards

Copy link
Copy Markdown
Owner

Draft for sidecar live proof; do not merge.

Adds method-level index_filter: '^\d+/\d+$' to get_interface_statistics (schema YAML only), aiming for physical-only rows across protocols (#272).

Offline (tested): method index_filter is applied only in _resolve_intent when index is a list; _pipeline_egress / _shape_table_output do not read it. An OfflineHIOS fixture with cpu/* and vlan/* ifTable rows returns the same rows before and after this change, so offline shows the filter is not applied on reads.

Live (untested, pending): sidecar get_interface_statistics.read mops/snmp/ssh row counts and parity_diffs on this head vs main.

  • pytest tests/: pass
  • scripts/ci_offline.sh: pass
  • generate_floors_board.py --check: pass

Related #272

Adds method-level index_filter '^\d+/\d+$' to get_interface_statistics,
mirroring get_optics, aiming for physical-only rows on all protocols.

Offline (tested): the engine applies method index_filter only in intent
resolution when index is a list; the read (egress) path does not read it.
A fixture with cpu/vlan ifTable rows returns the same rows before and
after this change. Live sidecar proof: untested (pending).

Schema YAML only. Draft for sidecar live proof; do not merge.

Related #272
@AdamRickards

Copy link
Copy Markdown
Owner Author

Sidecar live proof — get_interface_statistics.read trace:true, head 22ae25a vs main 9ee450d.

protocol main this PR
mops ok, n=36 (incl. 1 cpu + 7 vlan rows) ok, n=36 (same rows)
snmp ok, n=36 (incl. 1 cpu + 7 vlan rows) ok, n=36 (same rows)
ssh ok, n=28 (physical only) ok, n=28
parity_diffs 27 (utilization_interval mops vs snmp, capped) 27 (same)

Result: fail vs #272 floor (all protocols physical-only). Live matches offline: method index_filter is not applied on reads. No change from this PR. Needs an Engine read-side filter (see park row), not schema YAML.

Draft; do not merge.

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.

1 participant