Skip to content

Update urpf_vrf_test.go and align it with the readme file.#5318

Open
nupkanoi wants to merge 24 commits intomainfrom
nupkanoi-patch-3
Open

Update urpf_vrf_test.go and align it with the readme file.#5318
nupkanoi wants to merge 24 commits intomainfrom
nupkanoi-patch-3

Conversation

@nupkanoi
Copy link
Copy Markdown
Contributor

@nupkanoi nupkanoi commented Apr 7, 2026

Correction to the go code align it as per the its Readme:

  • The static routes should be in non-default vrf.
  • No physical interface should be present in non-default vrf.
  • Non-default vrf should also have a static route ATE port1 -- DUT port1 connected interface, which is critical for ATE port1 <> DUT port1 bgp peering to remain functional
  • No decap static route is needed in default vrf, hence removing it from the go code.
  • The dstGUEIP is the ATE port2 IP address.

Readme updates:

  • Correct the baseline urpf FNT readme with a minor update as per the result of testing outcome from a vendor.
    • The readme mentions that Non-default vrf should also have a static route ATE port1 -- DUT port1 connected interface, which is critical for ATE port1 <> DUT port1 bgp peering to remain functional.

Correct the go code align it as per the its Readme
@nupkanoi nupkanoi requested a review from sachendras April 7, 2026 22:27
@nupkanoi nupkanoi requested a review from a team as a code owner April 7, 2026 22:27
@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Apr 7, 2026

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the network instance and routing configurations within the urpf_vrf_test.go file. The primary goal is to ensure the test suite accurately reflects the intended network topology and routing behavior as described in the updated documentation, enhancing the test's robustness and correctness.

Highlights

  • Code Alignment: The Go test code has been updated to align with the latest README file and changes introduced in a related pull request (PR Update urpf README.md #5317).
  • Network Instance Configuration: BGP neighbor configurations for dutPort1 were moved from the non-default network instance to the default network instance. Interface configurations for both dutPort1 and dutPort2 were also updated to use the default network instance.
  • Static Route Configuration: New static routes for both IPv4 and IPv6 prefixes have been added to the default network instance, including specific prefixes for ATE advertised routes and DUT-PORT1.
  • Route Verification Refinement: The route verification logic was updated, including renaming the bgpRouteVerification function to routeInstallVerification and adding the newly configured static routes to the verification process.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the test configuration to move BGP and port settings to the default network instance and adds several static route configurations. However, the changes introduce multiple compilation errors, including the use of an undefined variable, syntax errors in string literals, and incorrect struct field initialization for static routes. The reviewer also recommended using t.Errorf instead of t.Fatalf for better error reporting in tests to align with repository standards.

Comment thread feature/urpf/otg_tests/urpf_vrf_test/urpf_vrf_test.go
Comment thread feature/urpf/otg_tests/urpf_vrf_test/urpf_vrf_test.go Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@nupkanoi nupkanoi mentioned this pull request Apr 7, 2026
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.

3 participants