Skip to content

Add FRR structured output for BGP Routes#304

Merged
jdhall75 merged 1 commit into
thatmattlove:mainfrom
chriswiggins:feat/frr-bgp-table
Jun 10, 2025
Merged

Add FRR structured output for BGP Routes#304
jdhall75 merged 1 commit into
thatmattlove:mainfrom
chriswiggins:feat/frr-bgp-table

Conversation

@chriswiggins

Copy link
Copy Markdown
Contributor

Description

Added a new builtin directive to enable BGP Table structured output from FRR.

This does not do structured output for AS Path or Communities, as both of those outputs from FRR follow very different formats.

There have also been some tweaks to the original parsing that was implemented ~4 years ago (but not actually being used anywhere):

  • localpref is now locPrf
  • Some of the values now have defaults (I have routes without med, aggregator info, weight or metrics)

Related Issues

N/A

Motivation and Context

I wanted nice BGP Route table output 😆

Tests

Added in a test_bgp_route_frr.py, and updated the sample to exclude some of the values we expect to have missing.

Tested against FRRouting 10.1.1

@jdhall75 jdhall75 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for all the work!

@jdhall75 jdhall75 merged commit 51c7f9e into thatmattlove:main Jun 10, 2025
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