Skip to content

Deviation DecapNHWithoutNextHopNIUnsupported proposal#5637

Open
snaragund wants to merge 6 commits into
openconfig:mainfrom
nokia:SND-TE14dot2Dev
Open

Deviation DecapNHWithoutNextHopNIUnsupported proposal#5637
snaragund wants to merge 6 commits into
openconfig:mainfrom
nokia:SND-TE14dot2Dev

Conversation

@snaragund

Copy link
Copy Markdown
Contributor

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."

…se in TE-14.2

- As mentioned in https://partnerissuetracker.corp.google.com/issues/529388485 proposing deviation name DecapNHWithoutNextHopNIUnsupported.

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
@snaragund snaragund requested review from a team as code owners June 30, 2026 09:55
@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 introduces a new device deviation to support specific vendor behaviors regarding decapsulation next-hop configurations. By adding this flag to the metadata and updating the relevant test logic, the change ensures that the encap/decap scale tests can correctly adapt to platforms that do not support certain next-hop network instance settings.

Highlights

  • New Deviation Added: Introduced a new deviation 'DecapNHWithoutNextHopNIUnsupported' to handle specific platform requirements regarding decapsulation next-hop configurations.
  • Metadata Update: Updated the metadata protobuf definition to include the new deviation flag.
  • Test Logic Adjustment: Modified the encap/decap scale test to utilize the new deviation flag for conditional next-hop network instance configuration.
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 the 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 counterproductive. 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.

@OpenConfigBot

OpenConfigBot commented Jun 30, 2026

Copy link
Copy Markdown

Pull Request Functional Test Report for #5637 / ea9f866

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
TE-14.2: encap and decap scale
Cisco 8000E status
TE-14.2: encap and decap scale
Cisco XRd status
TE-14.2: encap and decap scale
Juniper ncPTX status
TE-14.2: encap and decap scale
Nokia SR Linux status
TE-14.2: encap and decap scale
Openconfig Lemming status
TE-14.2: encap and decap scale

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
TE-14.2: encap and decap scale
Cisco 8808 status
TE-14.2: encap and decap scale
Juniper PTX10008 status
TE-14.2: encap and decap scale
Nokia 7250 IXR-10e status
TE-14.2: encap and decap scale

Help

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a new deviation decap_nh_without_nexthop_ni_unsupported to handle platforms that do not support Decap NH without NextHopNetworkInstance. However, there are two issues: first, the new deviation accessor in deviations.go incorrectly calls the getter for a different deviation (GetDecapNhWithNexthopNiUnsupported instead of GetDecapNhWithoutNexthopNiUnsupported); second, the logic change in encap_decap_scale_test.go alters the default behavior for other platforms, disabling the configuration of WithNextHopNetworkInstance when it should be enabled by default.

Comment thread internal/deviations/deviations.go Outdated
// DecapNHWithoutNextHopNIUnsupported returns true if Decap NH without NextHopNetworkInstance is not supported
// Nokia: https://partnerissuetracker.corp.google.com/issues/529388485
func DecapNHWithoutNextHopNIUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetDecapNhWithNexthopNiUnsupported()

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.

high

The function DecapNHWithoutNextHopNIUnsupported is incorrectly calling GetDecapNhWithNexthopNiUnsupported() instead of GetDecapNhWithoutNexthopNiUnsupported(). This will cause it to return the value of the wrong deviation field (decap_nh_with_nexthop_ni_unsupported instead of decap_nh_without_nexthop_ni_unsupported). Additionally, please ensure this deviation accessor function includes a comment with a URL link to an issue tracker to document and track the behavior.

Suggested change
return lookupDUTDeviations(dut).GetDecapNhWithNexthopNiUnsupported()
return lookupDUTDeviations(dut).GetDecapNhWithoutNexthopNiUnsupported()
References
  1. Every deviation accessor function, including those for permanent deviations, must include a comment with a URL link to an issue tracker (e.g., a tracking FR) to document and track the behavior.

Comment on lines +600 to 602
if deviations.DecapNHWithoutNextHopNIUnsupported(args.dut) {
decapNH.WithNextHopNetworkInstance(deviations.DefaultNetworkInstance(args.dut))
}

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.

medium

By changing the condition from !deviations.DecapNHWithNextHopNIUnsupported(args.dut) to deviations.DecapNHWithoutNextHopNIUnsupported(args.dut), you are disabling the configuration of WithNextHopNetworkInstance by default for all other platforms where DecapNHWithoutNextHopNIUnsupported is false/unset.

If the standard/preferred behavior is to configure WithNextHopNetworkInstance unless unsupported, we should keep the original logic. The original logic already correctly configures it for Nokia (since DecapNHWithNextHopNIUnsupported is false for Nokia) and omits it for Arista (where it is true).

Suggested change
if deviations.DecapNHWithoutNextHopNIUnsupported(args.dut) {
decapNH.WithNextHopNetworkInstance(deviations.DefaultNetworkInstance(args.dut))
}
if !deviations.DecapNHWithNextHopNIUnsupported(args.dut) {
decapNH.WithNextHopNetworkInstance(deviations.DefaultNetworkInstance(args.dut))
}
References
  1. When using the gribigo fluent builder API in Go, it is not necessary to reassign the builder variable when calling its methods, as the builder modifies the state in-place.

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28436196097

Coverage decreased (-0.002%) to 8.645%

Details

  • Coverage decreased (-0.002%) from the base build.
  • Patch coverage: 8 uncovered changes across 2 files (0 of 8 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
proto/metadata_go_proto/metadata.pb.go 5 0 0.0%
internal/deviations/deviations.go 3 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 26664
Covered Lines: 2305
Line Coverage: 8.64%
Coverage Strength: 0.1 hits per line

💛 - Coveralls

@gggsmith gggsmith requested a review from AmrNJ July 6, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants