Skip to content

Adding AFT-6.4: AFT Prefix Filtering Dynamic Updates Test#5573

Open
keysightgems wants to merge 7 commits into
openconfig:mainfrom
open-traffic-generator:fpt_otg_aft-6.4
Open

Adding AFT-6.4: AFT Prefix Filtering Dynamic Updates Test#5573
keysightgems wants to merge 7 commits into
openconfig:mainfrom
open-traffic-generator:fpt_otg_aft-6.4

Conversation

@keysightgems

@keysightgems keysightgems commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

@keysightgems keysightgems requested review from a team as code owners June 13, 2026 03:17
@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 feature profile test for AFT Prefix Filtering Dynamic Updates (AFT-6.4). It includes the necessary test logic to verify that prefix filtering policies correctly handle dynamic additions, deletions, and atomic swaps of routes. To support this, the PR also enhances the internal configuration plugins for routing policies and updates the test framework to better handle gNMI notification monitoring and platform-specific deviations.

Highlights

  • New Test Implementation: Added a new test case, AFT-6.4, to validate dynamic updates for AFT prefix filtering in both IPv4 and IPv6 environments.
  • Policy Configuration Utilities: Introduced new helper functions in internal/cfgplugins to simplify the creation and management of routing policies and prefix sets.
  • Framework Enhancements: Updated the AFT cache and telemetry utilities to support notification monitoring and skipping next-hop validation when not required.
  • Platform Deviations: Added a new deviation afts_global_filter_policy_oc_unsupported to handle platforms that do not support specific AFT global filter OpenConfig paths.
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.

@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 dynamic AFT prefix filtering test (AFT-6.4) along with associated configuration plugins, deviations, and telemetry cache helpers to support waiting for update and delete notifications. The code review feedback highlights several critical improvements: using a cancellable context to prevent resource leaks in the test, returning false, nil instead of an error in PeriodicFunc to allow the cache collector to wait properly without failing immediately, removing redundant vendor checks when deviation checks are present, and adding a tracking issue URL to the new deviation accessor comment as required by the style guide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread internal/telemetry/aftcache/aft_cache.go Outdated
Comment thread internal/telemetry/aftcache/aft_cache.go Outdated
Comment thread internal/telemetry/aftcache/aft_cache.go Outdated
Comment thread internal/deviations/deviations.go Outdated
return nil
} else {
ruleSeq := uint32(1)
for i := 1; i <= encapparams.Count; i++ {

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.

please address Static analysis

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pre-existing code and is outside the scope of the current PR. The changes may affect other tests, is it required to fix? if yes, can it be handle separately?


noIPv4NHValidation := len(wantIPV4NHs) == 0
noIPv6NHValidation := len(wantIPV6NHs) == 0
if noIPv4NHValidation && noIPv6NHValidation {

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.

Why are we skipping the NH validation here. Can you elobarate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NH validation is skipped here because the test README does not require next-hop validation, the test scope is limited to prefix filtering and AFT notification verification.

The current implementation also serves as a temporary workaround for an existing issue affecting some related test cases. I added this logic to avoid false failures until the issue is fixed (https://partnerissuetracker.corp.google.com/u/1/issues/517809756). Once that is resolved I will remove this code and validate NH.

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.

3 participants