Skip to content

gnmi.Replace call added#5194

Open
gauriwalinjkar91 wants to merge 5 commits intoopenconfig:mainfrom
gauriwalinjkar91:tunnel-interface-ipv4-gre-encap-mod
Open

gnmi.Replace call added#5194
gauriwalinjkar91 wants to merge 5 commits intoopenconfig:mainfrom
gauriwalinjkar91:tunnel-interface-ipv4-gre-encap-mod

Conversation

@gauriwalinjkar91
Copy link

Adding gnmi.Replace to push configuration to DUT

@gauriwalinjkar91 gauriwalinjkar91 requested a review from a team as a code owner March 4, 2026 20:58
@gemini-code-assist
Copy link
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 enhances the test suite by integrating gnmi.Replace operations to ensure that interface configurations are actively and explicitly pushed to the DUT. This change improves the reliability and clarity of the configuration process within the tunnel encapsulation test, moving from implicit configuration application to a more direct and verifiable method.

Highlights

  • gNMI Configuration: Introduced explicit gnmi.Replace calls to push interface configurations to the Device Under Test (DUT) for dutIntf1, dutIntf2, and dutIntf3.
Changelog
  • feature/tunnel/otg_tests/tunnel_interface_based_ipv4_gre_encapsulation_test/tunnel_interface_based_ipv4_gre_encapsulation_test.go
    • Replaced direct ConfigOCInterface calls with gnmi.Replace to apply configurations.
    • Added logging statements to indicate interface configuration for each DUT port.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@OpenConfigBot
Copy link

OpenConfigBot commented Mar 4, 2026

Pull Request Functional Test Report for #5194 / 7428586

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Cisco 8000E status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Cisco XRd status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Juniper ncPTX status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Nokia SR Linux status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Openconfig Lemming status
TUN-1.3: Interface based IPv4 GRE Encapsulation

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Cisco 8808 status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Juniper PTX10008 status
TUN-1.3: Interface based IPv4 GRE Encapsulation
Nokia 7250 IXR-10e status
TUN-1.3: Interface based IPv4 GRE Encapsulation

Help

Copy link
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 adds gnmi.Replace calls to push interface configurations to the DUT. While this is a necessary fix, the current implementation contains a critical bug in the gNMI path construction, using the interface IP address instead of its name. Additionally, the code is repetitive and makes multiple gNMI calls where one would be more efficient. I have provided a single review comment with a suggested refactoring that addresses these issues by using a loop and a gnmi.SetBatch for a more correct, efficient, and maintainable solution.

gauriwalinjkar91 and others added 4 commits March 4, 2026 14:56
…sulation_test/tunnel_interface_based_ipv4_gre_encapsulation_test.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants