gNMI-1.28 fix for subinterface description#5501
Conversation
Summary of ChangesHello, 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 automated test for validating BGP neighbor telemetry compliance against OpenConfig standards and includes a necessary fix for subinterface description updates in existing interface telemetry tests. Highlights
Using Gemini Code AssistThe 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
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 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
|
Pull Request Functional Test Report for #5501 / a86f9acVirtual Devices
Hardware Devices
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new BGP neighbor telemetry test (HA-1.0) along with its associated documentation and metadata. It also refactors the subinterface description update logic in the interface telemetry tests. The review feedback recommends dynamically discovering configured AFI-SAFIs for BGP neighbors to avoid failures on single-stack sessions and utilizing the MissingBgpLastNotificationErrorCode deviation to improve test portability across different vendors.
I am having trouble creating individual review comments. Click here to see my feedback.
feature/gnmi/tests/telemetry_bgp_neighbor_state_test/telemetry_bgp_neighbor_state_test.go (163-192)
The test unconditionally validates both IPv4 and IPv6 unicast prefix counters for every neighbor. However, BGP neighbors are often configured as single-stack. If a neighbor only has one address family enabled, the subtests for the other family will fail with a 'path not present' error. Consider discovering the configured AFI-SAFIs for each neighbor (e.g., using gnmi.GetAll on neighborPath.AfiSafiAny().AfiSafiName().State()) and only running the corresponding validation subtests if they are present.
feature/gnmi/tests/telemetry_bgp_neighbor_state_test/telemetry_bgp_neighbor_state_test.go (148-152)
The validation of last-notification-error-code should account for the MissingBgpLastNotificationErrorCode deviation. Use the deviations package to maintain test abstraction and portability across different vendors, skipping this check if the deviation is enabled to avoid false failures.
if deviations.MissingBgpLastNotificationErrorCode(dut) {
t.Skip("Skipping last-notification-error-code check due to deviation")
}
if val, present := gnmi.Lookup(t, dut, neighborPath.Messages().Received().LastNotificationErrorCode().State()).Val(); !present {
t.Errorf("Path messages/received/last-notification-error-code is not present")
} else {
t.Logf("Last notification error code: %v is compliant", val)
}
References
- Avoid using dut.Vendor() for vendor-specific logic or configurations in tests. Instead, use the deviations package to maintain test abstraction and portability across different vendors.
No description provided.