Skip to content

[RT-7.3/RT-7.4] Update as-path-set deviation for Arista#5262

Open
yini101 wants to merge 1 commit intoopenconfig:mainfrom
yini101:match-as-path-set
Open

[RT-7.3/RT-7.4] Update as-path-set deviation for Arista#5262
yini101 wants to merge 1 commit intoopenconfig:mainfrom
yini101:match-as-path-set

Conversation

@yini101
Copy link
Contributor

@yini101 yini101 commented Mar 26, 2026

Arista now supports match-as-path-set so we can remove match_as_path_set_unsupported from the deviation. However, EOS requires ip as-path regex-mode string to match as-path-set members as POSIX regexes. Adding routing_policy_as_path_set_enable_regex_mode deviation which would configure that in the test.

@yini101 yini101 requested review from a team as code owners March 26, 2026 00:05
@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 refines the BGP AS path set matching logic for Arista devices within the testing framework. It updates the system to reflect Arista's enhanced capabilities by removing an obsolete deviation and introduces a new mechanism to correctly configure AS path set matching using POSIX regex mode, ensuring proper interaction with Arista EOS requirements.

Highlights

  • Arista AS Path Set Support Update: The match_as_path_set_unsupported deviation for Arista devices has been removed, indicating that Arista now supports match-as-path-set functionality.
  • New Deviation for Arista EOS Regex Mode: A new deviation, routing_policy_as_path_set_enable_regex_mode, has been introduced to specifically enable POSIX regex mode for AS path set members on Arista EOS, which requires the ip as-path regex-mode string command.
  • Configuration Plugin Implementation: A new configuration plugin function, DeviationAristaRoutingPolicyBGPAsPathMatchMode, was added to apply the necessary CLI command for enabling AS path regex mode on Arista devices when the new deviation is active.
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
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, RoutingPolicyAsPathSetEnableRegexMode, to address the requirement for explicit POSIX regex matching configuration for BGP AS Path Sets on Arista devices. The changes include updating protobuf definitions, generating corresponding Go code, adding an accessor function in internal/deviations, and implementing a new configuration plugin in internal/cfgplugins to apply the necessary CLI command. The relevant BGP policy tests have been updated to utilize this new deviation. Feedback suggests improving test robustness by adding default cases to switch statements and using t.Errorf for non-fatal errors, correcting a typo in a function comment, and fixing an issue tracker URL format to comply with the repository's style guide.

Arista now supports `match-as-path-set` so we can remove
`match_as_path_set_unsupported` from the deviation. However, EOS requires
`ip as-path regex-mode string` to match as-path-set members as POSIX regexes.
Adding `routing_policy_as_path_set_enable_regex_mode` deviation which would
configure that in the test.
@yini101 yini101 force-pushed the match-as-path-set branch from 57d4918 to b04f6d2 Compare March 26, 2026 07:06
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