Skip to content

fix(netops): align Ansible interface collection with vendor parsers (PLU-43) - #154

Draft
kayodebristol wants to merge 2 commits into
review/plu-43-ansible-role-fail-closed-20261106from
review/plu-43-interface-parser-command-20261107
Draft

kayodebristol wants to merge 2 commits into
review/plu-43-ansible-role-fail-closed-20261106from
review/plu-43-interface-parser-command-20261107

Conversation

@kayodebristol

Copy link
Copy Markdown
Contributor

Why

Source inspection of netops/ansible/modules/netops_facts.py found Cisco collection executing show interfaces status but passing it to parse_interface_errors_cisco, which expects detailed show interfaces records. This mismatch can silently return empty inventory and conceal unsupported collection under a default Cisco fallback.

Proposed correction

  • Cisco IOS/XE/XR: execute show interfaces with existing detailed error parser.
  • Nokia SR-OS: preserve show port inventory parser.
  • Other vendors: explicitly return no inventory rather than sending Cisco commands.
  • Keep transport/command failures as no inventory. Empty inventory does not mean healthy or zero errors.
  • Add 14 parameterized synthetic tests covering command dispatch, real error counters, Nokia status inventory, unsupported vendors, transport failures, and malformed/empty CLI output.

Scope and gates

Stacked on draft PR #153; does not alter protected main and should not be merged without #151/#152/#153 review and qualification. Existing Cisco parser may still emit zero counters when only a header (but no counters) is present; the independently stacked #149 parser proof must be reconciled before calling any interface evidence safety-grade. This PR corrects a transport/parser mismatch only. It is not production health certification.

Molecule, representative vendor CLI fixtures, controlled device tests and peer review remain outstanding. No CDCC physical feasibility or construction authorization credit.

Tracked by PLU-43.

This branch has not been deployed

No deployments
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