Enhance FGNHG CLI to filter by and show vnet + prefix#4510
Open
NavdhaJindal wants to merge 6 commits into
Open
Enhance FGNHG CLI to filter by and show vnet + prefix#4510NavdhaJindal wants to merge 6 commits into
NavdhaJindal wants to merge 6 commits into
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances the show fgnhg CLI to surface VRF/VNET context (by adding a VNET/VRF column) and introduces a new 2-argument filter mode intended to query FGNHG data by (vrf, prefix).
Changes:
- Added FG_ROUTE_TABLE key parsing and reused hash-bucket formatting logic to support VRF-aware output.
- Updated
show fgnhg {hash-view,active-hops}output to includeVNET/VRFand added(vrf, prefix)filtering via positional args. - Extended unit-test mock STATE_DB data and updated/added pytest expectations for the new output and filter behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
show/fgnhg.py |
Adds VRF-aware key parsing/formatting and new positional-argument filtering modes for hash-view and active-hops. |
tests/fgnhg_test.py |
Updates expected CLI output to include VNET/VRF and adds tests for (vrf, prefix) filtering and invalid VRF handling. |
tests/mock_tables/state_db.json |
Adds a VRF/VNET-scoped `FG_ROUTE_TABLE |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
anish-n
approved these changes
May 15, 2026
|
@NavdhaJindal, Please fix PR checks |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Navdha Jindal <navdhajindal@microsoft.com>
Signed-off-by: Navdha Jindal <navdhajindal@microsoft.com>
Contributor
|
Changes lgtm, Please fix PR checker failures |
Signed-off-by: Navdha Jindal <navdhajindal@microsoft.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
prsunny
approved these changes
May 28, 2026
Contributor
|
@qiluo-msft , would you help with merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
CLI enhancement for fine grained ecmp routes, to show fg routes by specifying vnet and prefix.
New CLI added:
How I did it
Accept 2 positional args instead of 1. Depending on number of args, filter for:
How to verify it
Usage:
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)