Skip to content

feat(nxos): add show ip ospf neighbors parser - #1003

Open
behrang-t wants to merge 2 commits into
CiscoTestAutomation:mainfrom
behrang-t:feat/nxos-ospf-neighbors-summary
Open

behrang-t wants to merge 2 commits into
CiscoTestAutomation:mainfrom
behrang-t:feat/nxos-ospf-neighbors-summary

Conversation

@behrang-t

Copy link
Copy Markdown

NX-OS show ip ospf neighbors summary output needs a dedicated parser for structured neighbor data.

This PR adds ShowIpOspfNeighbors with its schema, parser registry entry, fixtures, regression tests and changelog.

The parser extracts the process, VRF, total neighbor count, interface, neighbor router ID, priority, state, role, uptime and address. Neighbors are grouped by interface so the same router ID on separate links is preserved.

An explicit zero-neighbor summary produces structured output. Completely empty input raises SchemaEmptyParserError. Missing counts, duplicate neighbors on the same interface and mismatches between the declared count and parsed rows raise errors rather than returning incomplete results.

Validation:

  • All 9 focused regression tests passed, including command-based parser lookup.
  • The official folder-based runner passed all 5 golden fixtures and 1 empty fixture.
  • Successfully parsed 20 recorded NX-OS outputs from 7 lab devices.
  • git diff --cached --check passed.

make json was executed. The committed registry diff retains only the new OSPF command entry, excluding unrelated generator changes.

@behrang-t
behrang-t requested a review from a team as a code owner September 11, 2026 07:59
Comment thread src/genie/libs/parser/nxos/show_ospf.py Outdated
Comment thread src/genie/libs/parser/nxos/show_ospf.py Outdated

@Sripadvallabh Sripadvallabh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix comments & click re-review

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