Skip to content

SYS-1.1 Add strata platform support to default_copp_test - #5460

Open
keil-arista wants to merge 1 commit into
openconfig:mainfrom
keil-arista:arPlatSys1_1
Open

keil-arista wants to merge 1 commit into
openconfig:mainfrom
keil-arista:arPlatSys1_1

Conversation

@keil-arista

@keil-arista keil-arista commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

The default_copp_test hardcodes "sand" in the OpenConfig vendor path and uses sand-specific counter names. Strata platform devices (e.g. DCS-7050CX4M-48D8-F) require different counter names and a different vendor path element. This change detects the platform dynamically from the gNMI response and selects the appropriate counter mapping.

  • (M) feature/system/control_plane_traffic/otg_tests/default_copp_test/default_copp_test.go
    • Add platformConfig struct and counter name maps for sand vs strata.
    • Replace hardcoded "sand" path element with detected platform name.

@keil-arista
keil-arista requested review from a team as code owners May 13, 2026 20:32
@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 enhances the default_copp_test to support the Strata platform alongside the existing Sand platform. By dynamically detecting the hardware platform via gNMI, the test now correctly selects the appropriate counter mappings for control plane traffic. Additionally, it introduces a new deviation to gracefully handle platform-specific limitations where L2 unicast packets are dropped before reaching the CPU, ensuring test reliability across different Arista hardware models.

Highlights

  • Dynamic Platform Detection: Implemented dynamic platform detection for the default_copp_test by querying the gNMI vendor path, allowing the test to switch between 'sand' and 'strata' counter mappings automatically.
  • Strata Platform Support: Added specific counter name mappings for the Strata platform and introduced a new deviation, 'CoppL2UnicastUnsupported', to skip L2 unicast CoPP tests on these devices.
  • Metadata Updates: Updated metadata.textproto to include hardware model regex for Arista sand and strata platforms, and added the new deviation field to the metadata protocol buffers.
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 May 13, 2026 •

Copy link
Copy Markdown

Pull Request Functional Test Report for #5460 / 1125c20

Virtual Devices

Device Test Status Test Documentation Job Raw Log
Arista cEOS status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Cisco 8000E status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Cisco XRd status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Juniper ncPTX status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Nokia SR Linux status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Openconfig Lemming status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista

Hardware Devices

Device Test Status Test Documentation Raw Log
Arista status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Cisco status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Juniper status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista
Nokia status
SYS-1.1: pending authorization
SYS-1.1: Test default COPP policy thresholds for Arista

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 platform-specific COPP (Control Plane Policing) counter validation by dynamically detecting the platform type and mapping logical counters to platform-specific names. It also adds a new deviation, CoppL2UnicastUnsupported, to handle hardware that does not support L2 unicast counter validation. Feedback includes a requirement to add issue tracker links to deviation functions per the style guide, and recommendations to use the test context in gNMI requests within helper functions to ensure proper timeout and cancellation handling.

Comment thread internal/deviations/deviations.go Outdated
The default_copp_test hardcodes "sand" in the OpenConfig vendor path and
uses sand-specific counter names. Strata platform devices (e.g.
DCS-7050CX4M-48D8-F) require different counter names and a different
vendor path element. This change detects the platform dynamically from
the gNMI response and selects the appropriate counter mapping.

* (M) feature/system/control_plane_traffic/otg_tests/default_copp_test/default_copp_test.go
  - Add platformConfig struct and counter name maps for sand vs strata.
  - Replace hardcoded "sand" path element with detected platform name.

This branch has not been deployed

No deployments
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