Skip to content

Add AFT filter README#5217

Open
ElodinLaarz wants to merge 15 commits intomainfrom
aft-filter
Open

Add AFT filter README#5217
ElodinLaarz wants to merge 15 commits intomainfrom
aft-filter

Conversation

@ElodinLaarz
Copy link
Contributor

Create initial README for testing out the AFTs prefix filtering feature.

OpenConfig PR for model

@ElodinLaarz ElodinLaarz requested a review from a team as a code owner March 11, 2026 03:45
@gemini-code-assist
Copy link
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 detailed documentation for testing the AFT global filter mechanism, a critical feature designed to control the flow of gNMI streaming updates by applying routing policies. The added test plan ensures robust validation of this filtering capability across various scenarios, including dynamic changes, error conditions, and scalability, ultimately enhancing the reliability and precision of network state reporting.

Highlights

  • New Feature Test Documentation: Added a comprehensive README file detailing the test plan for the AFT global filter mechanism, which restricts gNMI streaming AFT updates based on specified routing policies.
  • Detailed Test Cases: The new documentation includes multiple test cases covering initial synchronization, dynamic updates, error handling for policies, device reboot persistence, scale behavior, and per-network-instance filter isolation.
  • Metadata for Test Plan: Included a metadata file (metadata.textproto) to define the UUID, plan ID, description, and testbed type for the AFT-6.1 test plan.
Changelog
  • feature/afts/filtered_streaming/otg_tests/afts_prefix_filtering/README.md
    • Created a new README file for the AFT-6.1: AFT Prefix Filtering test plan.
    • Documented the summary, testbed type, and detailed test setup for the AFT global filter mechanism.
    • Outlined six distinct test cases (AFT-6.1.1 to AFT-6.1.6) covering validation of subscription, non-existent policies, policy deletion, device reboot, scale, and per-network-instance filtering.
    • Provided OpenConfig path and RPC coverage for the tested functionalities.
    • Included canonical OpenConfig JSON configuration examples for routing policies and static routes.
  • feature/afts/filtered_streaming/otg_tests/afts_prefix_filtering/metadata.textproto
    • Added a new metadata file for the AFT-6.1 test plan.
    • Configured the UUID, plan ID, description, and testbed type for the AFTs Prefix Filtering test.
Activity
  • No specific human activity (comments, reviews, progress updates) has been recorded for this pull request yet.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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
Copy link

OpenConfigBot commented Mar 11, 2026

Pull Request Functional Test Report for #5217 / d482d5d

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
AFT-6.1: AFT Prefix Filtering
0d775782 Log
Cisco 8000E status
AFT-6.1: AFT Prefix Filtering
474c9edd Log
Cisco XRd status
AFT-6.1: AFT Prefix Filtering
4ae8b17d Log
Juniper ncPTX status
AFT-6.1: AFT Prefix Filtering
653c60c2 Log
Nokia SR Linux status
AFT-6.1: AFT Prefix Filtering
18d82fe4 Log
Openconfig Lemming status
AFT-6.1: AFT Prefix Filtering
4805df5e Log

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
AFT-6.1: AFT Prefix Filtering
Cisco 8808 status
AFT-6.1: AFT Prefix Filtering
Juniper PTX10008 status
AFT-6.1: AFT Prefix Filtering
Nokia 7250 IXR-10e status
AFT-6.1: AFT Prefix Filtering

Help

Copy link
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 test plan (README.md) and metadata for AFT prefix filtering. The test plan is detailed, but I've found several logical inconsistencies related to policy definitions and prefix matching examples. These inconsistencies could lead to incorrect test implementation. Specifically, POLICY-PREFIX-SET-B has conflicting definitions, and several dynamic update steps use prefixes that won't match the policies as they are defined in the Canonical OC section. I've added comments with suggestions to resolve these issues. The metadata.textproto file appears to be correct.

@ElodinLaarz
Copy link
Contributor Author

/gemini review

Copy link
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 comprehensive test plan (README.md) and metadata for testing the AFT prefix filtering feature. The test plan is well-structured and detailed, covering a wide range of scenarios including initial sync, dynamic updates, error handling, reboots, scale, and multi-NI filtering. I have identified a minor inconsistency in the test plan's dynamic update section and provided a suggestion for correction. Overall, the documentation is clear and thorough.


- Verify that Notifications are received **only** for prefixes matching
`POLICY-PREFIX-SET-A` (`198.51.100.0/24`, `203.0.113.0/28`, `198.51.100.1/32`), plus any
necessary recursive resolution prefixes.
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed offline Arista behavior is to not stream recursive resolution prefixes. Is there a plan to add a deviation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think "any necessary" emphasizes that we only do this if required. The test should be written to optionally do a recursive lookup.

@ElodinLaarz
Copy link
Contributor Author

/gemini review

Copy link
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 comprehensive test plan (README.md) and corresponding metadata for a new feature test, AFT-6.1: AFT Prefix Filtering. The test plan is well-structured and covers various aspects of the AFT prefix filtering feature, including basic validation, error handling, persistence, and scale. My review focuses on improving the clarity and completeness of the documentation. I've suggested an update to the TODO section in the README.md to include the relevant OpenConfig pull request link and correct a minor grammatical issue.

`198.51.100.0/24`, `203.0.113.0/28`, `100.64.0.0/24`, `2001:DB8:1::/64`, and
`2001:DB8:3::/64`.

- The DUT is pre-configured with the following routing policies under
Copy link
Contributor

@paramasivamn1 paramasivamn1 Mar 17, 2026

Choose a reason for hiding this comment

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

The DUT should be configured with the following routing polices as part of base test case configuration. And also mention that we need to enable other AFT baseline configuration is needed for each of the vendor.

`2001:DB8:2::/64` and `2001:DB8:2::1/128`.

- `POLICY-PREFIX-SET-VRF-A`: Matches any IPv4 prefix within
`100.64.1.0/24` with a masklength range of `/24` to `/32`.
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the /24. mask should be any length /0 to /32

to `POLICY-PREFIX-SET-A`.
- Ensure
`/network-instances/network-instance/afts/global-filter/config/ipv6-policy`
is NOT set (or set to an empty/matching-none policy).
Copy link
Contributor

Choose a reason for hiding this comment

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

Let us be specific that we have have only ipv4 policy and without having the ipv6-policy configured for this case.


### Subscribe

Establish a long-lived gNMI STREAM subscription to the DUT targeting the
Copy link
Contributor

Choose a reason for hiding this comment

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

hope just gNMI Stream subscription is good. do we need to mention "long-lived gNMI STREAM"

`POLICY-PREFIX-SET-A`. Verify receipt of an update notification for this
prefix and its associated next-hop-groups and next-hops.

- Remove `198.51.100.1/32` from the DUT. Verify receipt of a delete
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a check if more than one prefixes are sharing same NHG and NG, then deletion of one prefixes should not delete the NHG and NH.

`/network-instances/network-instance/afts/global-filter/state/ipv4-policy`
and
`/network-instances/network-instance/afts/global-filter/state/ipv6-policy`.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also verify that new gNMI subscription is restarted and sync is received.


- Verify a `FAILED_PRECONDITION` error is returned, indicating the
global-filter reference must be removed first.

Copy link
Contributor

Choose a reason for hiding this comment

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

add a check where we delete the global filter and then delete the policy in multiple set/steps that should go through with out any failure.

## AFT-6.1.5 - Scale Test

- Let `X` be the number of IPv4 routes to advertise from the ATE. **(User
Adjustable Value, default: 5000)**
Copy link
Contributor

Choose a reason for hiding this comment

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

let us have scale as 50000 instead of 5000

- Verify correct filtering is applied in all scenarios (only matching prefixes
for the active address family are streamed).

## AFT-6.1.6 - Per Network-Instance Filtering with Multiple Collectors
Copy link
Contributor

Choose a reason for hiding this comment

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

Let us have a test case that we have more than one collector collecting the AFT streaming data at the same time in the same routing-instance.


### Validation

#### 6.1.8.1 - Addition of Prefix to Active Set
Copy link
Contributor

Choose a reason for hiding this comment

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

Let us have 6.1.8.1, 6.1.8.2 and 6.1.8.3 test for ipv6 prefixes also

Copy link
Contributor

@paramasivamn1 paramasivamn1 left a comment

Choose a reason for hiding this comment

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

Please find my input

@ElodinLaarz
Copy link
Contributor Author

(I know there are outstanding comments on this PR-- will address when I get back from OOO on March 30th.)

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.

4 participants