Skip to content

Add AFT filter README#5217

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

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

Conversation

@ElodinLaarz
Copy link
Copy Markdown
Contributor

@ElodinLaarz ElodinLaarz commented Mar 11, 2026

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

OpenConfig PR for model

This pull request adds new test plans and metadata for AFT prefix filtering, expanding coverage to dual-stack (IPv4/IPv6) filtering and dynamic updates to prefix sets. The new documentation describes test setups, validation steps, and OpenConfig model coverage for these scenarios.

New test plans and documentation:

  • Added a test plan for AFT Prefix Filtering Dual-Stack, including a detailed README.md that covers independent and concurrent application of IPv4 and IPv6 prefix filters, validation steps, and proposed OpenConfig model extensions.
  • Added a test plan for AFT Prefix Filtering Dynamic Updates, with a README.md describing tests for dynamic addition and removal of prefixes from active sets and expected gNMI notifications, as well as OpenConfig path and RPC coverage.

Metadata additions:

  • Added metadata.textproto files for the new test plans, specifying UUIDs, plan IDs, descriptions, and required testbed types for AFT Prefix Filtering (single-stack), Dual-Stack, and Dynamic Updates. [1] [2] [3]

@ElodinLaarz ElodinLaarz requested a review from a team as a code owner March 11, 2026 03:45
@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 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
Copy Markdown

OpenConfigBot commented Mar 11, 2026

Pull Request Functional Test Report for #5217 / f813ce8

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
93056daa Log
Cisco 8000E status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
ec25efaf Log
Cisco XRd status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
99ebe35a Log
Juniper ncPTX status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
4706606a Log
Nokia SR Linux status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
3d4c6c44 Log
Openconfig Lemming status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
9c14f37b Log

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
Cisco 8808 status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
Juniper PTX10008 status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience
Nokia 7250 IXR-10e status
status
status
status
AFT-6.1: AFT Prefix Filtering
AFT-6.2: AFT Prefix Filtering Dual-Stack
AFT-6.4: AFT Prefix Filtering Dynamic Updates
AFT-6.3: AFT Prefix Filtering Resilience

Help

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 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
Copy Markdown
Contributor Author

/gemini review

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 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.

@ElodinLaarz
Copy link
Copy Markdown
Contributor Author

/gemini review

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 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.

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@ElodinLaarz
Copy link
Copy Markdown
Contributor Author

/gemini review

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 comprehensive suite of test plans (AFT-6.1 through AFT-6.4) for validating AFT prefix filtering mechanisms via gNMI. The tests cover initial synchronization, dual-stack support, dynamic updates, and resilience scenarios such as device reboots and scale testing. The review feedback highlights a need for explicit subtests for recursive route resolution, identifies a logical inconsistency regarding the timing of prefix additions in the validation steps, and suggests completing the canonical OpenConfig JSON examples to include all referenced IPv6 prefixes for consistency.

Comment on lines +27 to +32
- The DUT is pre-configured with static routes to populate the AFT. Routes
include a mix of IPv4 and IPv6 prefixes drawn from RFC 5737 test address
space (see IP address conventions in `CONTRIBUTING.md`). At minimum the
following prefixes are installed in the `DEFAULT` network instance:
`198.51.100.0/24`, `203.0.113.0/28`, `100.64.0.0/24`, `2001:DB8:1::/64`, and
`2001:DB8:3::/64`.
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 test plan mentions validating that "necessary recursive resolution prefixes" are received (line 150). However, the current test setup only includes direct static routes with interface next-hops. To properly test this requirement, a separate subtest should be added for recursive route resolution (e.g., a prefix whose next-hop is another prefix in the AFT), as test plans should be structured with separate subtests for distinct logical test cases even if the configuration is similar.

References
  1. Test plans should be structured with separate subtests for distinct logical test cases (e.g., default vs. non-default Network Instance), even if the underlying configuration sections are similar.

Comment on lines +148 to +150
- 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
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 list of expected prefixes in the initial sync includes 198.51.100.1/32. However, according to the "Validate Dynamic Updates" section (line 168), this prefix is added to the DUT after the initial subscription is established. It should be removed from the initial sync validation list to avoid confusion.

]
}
}
]
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 "Canonical OC" JSON for static routes is missing the IPv6 prefixes (2001:DB8:1::/64 and 2001:DB8:3::/64) that are specified in the "Test environment setup" (line 31). Adding them would ensure the JSON is complete and consistent with the test description.

                  },
                  {
                    "prefix": "2001:DB8:1::/64",
                    "config": { "prefix": "2001:DB8:1::/64" },
                    "next-hops": {
                      "next-hop": [
                        {
                          "index": "0",
                          "config": { "index": "0", "next-hop": "2001:DB8::2" }
                        }
                      ]
                    }
                  },
                  {
                    "prefix": "2001:DB8:3::/64",
                    "config": { "prefix": "2001:DB8:3::/64" },
                    "next-hops": {
                      "next-hop": [
                        {
                          "index": "0",
                          "config": { "index": "0", "next-hop": "2001:DB8::2" }
                        }
                      ]
                    }
                  }

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