Skip to content

gNMI-1.11 Add deviation to skip unsupported paths.#5284

Open
AnilKR123 wants to merge 1 commit intoopenconfig:mainfrom
AnilKR123:SubintfTestFix
Open

gNMI-1.11 Add deviation to skip unsupported paths.#5284
AnilKR123 wants to merge 1 commit intoopenconfig:mainfrom
AnilKR123:SubintfTestFix

Conversation

@AnilKR123
Copy link
Copy Markdown
Contributor

Adding a deviation to skip the following unsupported subinterface state counter paths for the default subinterface on Arista (subinterface index 0):

- /interfaces/interface/subinterfaces/subinterface/state/counters/in-broadcast-pkts
- /interfaces/interface/subinterfaces/subinterface/state/counters/out-broadcast-pkts
- /interfaces/interface/subinterfaces/subinterface/state/counters/in-errors
- /interfaces/interface/subinterfaces/subinterface/state/counters/out-errors
- /interfaces/interface/subinterfaces/subinterface/state/counters/in-unknown-protos
- /interfaces/interface/subinterfaces/subinterface/state/counters/last-clear

The existing subinterface_packet_counters_missing deviation was not used as it also skips IPv4/IPv6 counters which are supported on Arista.

The following paths are confirmed working and remain tested on Arista (subinterface index 0):

- /interfaces/interface/subinterfaces/subinterface/ipv4/state/counters/in-pkts
- /interfaces/interface/subinterfaces/subinterface/ipv4/state/counters/out-pkts
- /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/in-pkts
- /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/out-pkts

I also removed carrier-transitions from the subinterface counter test as it is an L1 concept and does not apply to a subinterface.

@AnilKR123 AnilKR123 requested review from a team as code owners March 31, 2026 22:36
@OpenConfigBot
Copy link
Copy Markdown

Pull Request Functional Test Report for #5284 / c19410c

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
gNMI-1.11: Telemetry: Interface Packet Counters
Cisco 8000E status
gNMI-1.11: Telemetry: Interface Packet Counters
Cisco XRd status
gNMI-1.11: Telemetry: Interface Packet Counters
Juniper ncPTX status
gNMI-1.11: Telemetry: Interface Packet Counters
Nokia SR Linux status
gNMI-1.11: Telemetry: Interface Packet Counters
Openconfig Lemming status
gNMI-1.11: Telemetry: Interface Packet Counters

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
gNMI-1.11: Telemetry: Interface Packet Counters
Cisco 8808 status
gNMI-1.11: Telemetry: Interface Packet Counters
Juniper PTX10008 status
gNMI-1.11: Telemetry: Interface Packet Counters
Nokia 7250 IXR-10e status
gNMI-1.11: Telemetry: Interface Packet Counters

Help

@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 deviation mechanism to allow for the skipping of specific unsupported subinterface state counter paths on Arista hardware. By isolating these counters from the existing general packet counter deviation, the changes ensure that supported IPv4/IPv6 counters remain tested while correctly bypassing unsupported paths. Additionally, the PR cleans up the test suite by removing an irrelevant L1 carrier transition check.

Highlights

  • New Deviation Added: Introduced a new deviation 'default_subinterface_packet_counters_missing' to handle unsupported subinterface state counter paths on Arista devices.
  • Test Cleanup: Removed the 'SubinterfaceCarrierTransitions' check from the subinterface counter test as it is an L1 concept inapplicable to subinterfaces.
  • Code Refactoring: Updated the telemetry test to utilize the new deviation, ensuring that specific subinterface state counters are correctly skipped when the deviation is enabled.
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 introduces a new deviation, default_subinterface_packet_counters_missing, to handle cases where devices lack specific subinterface state packet counters. The changes include updating the metadata proto, adding an accessor in the deviations package, and modifying the telemetry interface packet counters test to utilize this new deviation for skipping relevant test cases. Feedback indicates that the new deviation accessor in internal/deviations/deviations.go is missing a required issue tracker URL in its documentation, which is a violation of the repository style guide.

Comment on lines +331 to +335
// DefaultSubinterfacePacketCountersMissing returns if device is missing subinterface state packet counters.
// Default value is false.
func DefaultSubinterfacePacketCountersMissing(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetDefaultSubinterfacePacketCountersMissing()
}
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

The deviation accessor function DefaultSubinterfacePacketCountersMissing is missing a URL link to an issue tracker. According to the Repository Style Guide (Section 2, Step 5), every deviation accessor must include a comment with a URL (e.g., https://issuetracker.google.com/issues/xxxxx) tracking its removal.

References
  1. Add a comment to the accessor function containing a URL link to an issue tracker which tracks removal of the deviation. (link)

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