Skip to content

Conversation

@ANISH-GOTTAPU
Copy link
Contributor

@ANISH-GOTTAPU ANISH-GOTTAPU commented Dec 18, 2025

BMP-2.8: BMP Post Policy Test with OTG

pass log : https://partnerissuetracker.corp.google.com/issues/415458482#comment148

@ANISH-GOTTAPU ANISH-GOTTAPU requested review from a team as code owners December 18, 2025 06:13
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ANISH-GOTTAPU, 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 comprehensive test for BGP Monitoring Protocol (BMP) post-policy route monitoring, ensuring that devices correctly report routes after policy application. It includes significant updates to BGP configuration plugins to support advanced routing policies and introduces a new BMP configuration plugin that intelligently adapts to platform capabilities, falling back to CLI commands when OpenConfig-based BMP is not fully supported. These changes enhance the testing framework's robustness and compatibility across different network devices.

Highlights

  • New BMP Post-Policy Test: A new Go test file, bmp_post_policy_test.go, has been added to validate BGP Monitoring Protocol (BMP) post-policy route monitoring functionality. This test configures a DUT and ATE to establish BGP sessions and then verifies BMP session establishment, statistics reporting, and post-policy route monitoring for both IPv4 and IPv6 prefixes.
  • BGP Configuration Enhancements: The internal/cfgplugins/bgp.go file has been updated to introduce new configuration parameters for BGP. The BGPConfig struct now supports enabling maximum routes per peer group, and the BGPNeighborConfig struct allows specifying a routing policy name to be applied to BGP neighbors. This enables more granular control over BGP route handling.
  • BMP Configuration Plugin: A new configuration plugin, internal/cfgplugins/bmp.go, has been added to handle BMP station configuration on the DUT. This plugin dynamically applies configuration using CLI commands when OpenConfig-based BMP configuration is not supported by the device, ensuring broader compatibility.
  • Platform Deviation for BMP: The metadata.textproto for the BMP post-policy test has been updated to specify TESTBED_DUT_ATE_4LINKS and includes a platform exception for Arista devices, explicitly marking bmp_oc_unsupported: true. This indicates that OpenConfig for BMP is not fully supported on Arista, leading to the use of CLI-based configuration in the new BMP plugin.
  • Deviation Tracking for BMP OpenConfig Support: A new boolean field, bmp_oc_unsupported, has been added to proto/metadata.proto and a corresponding BMPOCUnsupported function in internal/deviations/deviations.go. This allows for explicit tracking and handling of platforms that do not fully support BMP configuration via OpenConfig.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 Dec 18, 2025

Pull Request Functional Test Report for #4942 / c9b7556

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
BMP-2.8: BMP Post Policy Test
Cisco 8000E status
BMP-2.8: BMP Post Policy Test
Cisco XRd status
BMP-2.8: BMP Post Policy Test
Juniper ncPTX status
BMP-2.8: BMP Post Policy Test
Nokia SR Linux status
BMP-2.8: BMP Post Policy Test
Openconfig Lemming status
BMP-2.8: BMP Post Policy Test

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
BMP-2.8: BMP Post Policy Test
Cisco 8808 status
BMP-2.8: BMP Post Policy Test
Juniper PTX10008 status
BMP-2.8: BMP Post Policy Test
Nokia 7250 IXR-10e status
BMP-2.8: BMP Post Policy Test

Help

@ANISH-GOTTAPU ANISH-GOTTAPU changed the title BMP-2.7: BMP Pre Policy Test BMP-2.8: BMP Post Policy Test Dec 18, 2025
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 OTG test for BMP post-policy monitoring. It also includes necessary extensions to the BGP configuration plugin and adds a new BMP configuration plugin to support this test, particularly for platforms requiring CLI-based configuration.

Overall, the changes are good, but there are several issues in the new test file that need to be addressed. The pull request title and description are misleading as they refer to a 'Pre Policy Test', while the implementation is for a post-policy test. The test file itself contains incorrect constant values for IPv4 route counts, as well as misleading names and log messages that should be corrected for clarity and correctness.

@coveralls
Copy link

coveralls commented Dec 18, 2025

Pull Request Test Coverage Report for Build 20808398124

Details

  • 0 of 25 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.009%) to 9.957%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/cfgplugins/bgp.go 0 25 0.0%
Totals Coverage Status
Change from base Build 20800861614: -0.009%
Covered Lines: 2227
Relevant Lines: 22366

💛 - Coveralls

@ram-mac
Copy link
Contributor

ram-mac commented Dec 24, 2025

@ANISH-GOTTAPU - I validated this PR in my setup and i see the BMP session does not get established. Similar to PR4912 where i saw the BMP session is not getting established.
Have attached the logs to https://partnerissuetracker.corp.google.com/issues/415458482#comment154

@ANISH-GOTTAPU
Copy link
Contributor Author

@ANISH-GOTTAPU - I validated this PR in my setup and i see the BMP session does not get established. Similar to PR4912 where i saw the BMP session is not getting established. Have attached the logs to https://partnerissuetracker.corp.google.com/issues/415458482#comment154

As discussed over the chat, I ran the test with latest image and shared the config for BMP.

}
}

// ConfigureBMP applies BMP station configuration on DUT.
Copy link
Contributor

Choose a reason for hiding this comment

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

@ANISH-GOTTAPU - Can you please take a relook at this code. PR4912 is now merged and hence this either is not needed or you will just need to rebase your branch and rewrite this part of code

// Arista: b/335739231
bool match_community_set_match_set_options_all_unsupported = 361;

// Arista https://partnerissuetracker.corp.google.com/issues/452484903
Copy link
Contributor

Choose a reason for hiding this comment

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

@ANISH-GOTTAPU - Since PR4912 is now merged.. Can you please remove this deviation configurations.. Only metadata.textproto needs to be configured.

return lookupDUTDeviations(dut).GetMatchCommunitySetMatchSetOptionsAllUnsupported()
}

// BMPOCUnsupported returns true if BMP configuration is not supported
Copy link
Contributor

Choose a reason for hiding this comment

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

@ANISH-GOTTAPU - This deviation changes are not required in this PR as PR4912 is now merged. Feel free to remove this now.

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