Skip to content

Otg rt 5.14 - adding Cisco vendor as well#5510

Open
mihaitomaro wants to merge 13 commits into
openconfig:mainfrom
open-traffic-generator:otg-rt-5.14
Open

Otg rt 5.14 - adding Cisco vendor as well#5510
mihaitomaro wants to merge 13 commits into
openconfig:mainfrom
open-traffic-generator:otg-rt-5.14

Conversation

@mihaitomaro
Copy link
Copy Markdown
Contributor

@mihaitomaro mihaitomaro requested review from a team as code owners May 26, 2026 13:35
@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 test suite for validating aggregate subinterface behavior across different network instances. It enhances existing test infrastructure to support Cisco hardware by incorporating vendor-specific timing and configuration adjustments, while also refining metadata for Arista platform compatibility.

Highlights

  • New Test Implementation: Added a new test file 'aggregate_subinterface_test.go' to validate aggregate subinterface functionality using the Open Traffic Generator (OTG).
  • Cisco Vendor Support: Updated the test configuration to include specific handling for Cisco devices, including timing adjustments and MTU configuration logic.
  • Metadata Updates: Updated 'metadata.textproto' to include platform exceptions for Arista devices, ensuring correct deviation handling.
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.

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 introduces a new aggregate subinterface test suite under feature/interface/aggregate/otg_tests/aggregate_subinterface_test/. The test validates aggregate interface flapping using min-links, as well as aggregate subinterfaces in both default and non-default network instances. The reviewer's feedback correctly points out several instances where dut.Vendor() is used directly for vendor-specific logic instead of abstracting these behaviors behind the deviations package, which violates the repository's style guidelines.

Comment on lines +193 to +195
if dut.Vendor() != ondatra.CISCO {
ipv4.Enabled = ygot.Bool(true)
}
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

Avoid using dut.Vendor() for vendor-specific logic. Instead, use the deviations package to maintain test abstraction and portability across different vendors. Since Arista has interface_enabled: true in its platform exceptions and Cisco does not, you can use deviations.InterfaceEnabled(dut) here to decide whether to explicitly set ipv4.Enabled.

Suggested change
if dut.Vendor() != ondatra.CISCO {
ipv4.Enabled = ygot.Bool(true)
}
if deviations.InterfaceEnabled(dut) {
ipv4.Enabled = ygot.Bool(true)
}
References
  1. Avoid "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

Comment on lines +199 to +201
if dut.Vendor() != ondatra.CISCO {
ipv6.Enabled = ygot.Bool(true)
}
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

Avoid using dut.Vendor() for vendor-specific logic. Use deviations.InterfaceEnabled(dut) here as well to determine if ipv6.Enabled should be explicitly set.

Suggested change
if dut.Vendor() != ondatra.CISCO {
ipv6.Enabled = ygot.Bool(true)
}
if deviations.InterfaceEnabled(dut) {
ipv6.Enabled = ygot.Bool(true)
}
References
  1. Avoid "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

Comment on lines +237 to +242
if dut.Vendor() == ondatra.CISCO {
gnmi.BatchReplace(mtuBatch, gnmi.OC().Interface(lagName).Mtu().Config(), uint16(mtu))
} else {
gnmi.BatchReplace(mtuBatch, gnmi.OC().Interface(lagName).Subinterface(0).Ipv4().Mtu().Config(), mtu)
gnmi.BatchReplace(mtuBatch, gnmi.OC().Interface(lagName).Subinterface(0).Ipv6().Mtu().Config(), mtu)
}
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

Avoid using dut.Vendor() for vendor-specific configuration logic. Please define a deviation (e.g., MtuOnInterfaceLevel) to abstract whether MTU should be configured on the main interface level versus the subinterface level.

References
  1. Avoid "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

}
ateLACP, _ := ateVal.Val()

if dut.Vendor() != ondatra.CISCO {
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

Avoid using dut.Vendor() directly in the test code. Please define a new deviation in internal/deviations/deviations.go (e.g., LacpPartnerSystemIdUnsupported) and use it here to maintain test abstraction and portability across different vendors.

References
  1. Avoid "dut.Vendor()" for vendor-specific logic or configurations in tests. Instead, use the "deviations" package to maintain test abstraction and portability across different vendors.

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