Fix Arista failures in telemetry_interface_last_change_test (gNMI-1.25)#5292
Fix Arista failures in telemetry_interface_last_change_test (gNMI-1.25)#5292smharis-arista wants to merge 1 commit intoopenconfig:mainfrom
Conversation
Add subinterface_0_state_unsupported deviation for Arista as state telemetry is not populated on the default (index 0) subinterface (both LAG and Ethernet). The deviation is defined broadly to cover any unsupported state on subinterface 0, but in this PR it is used specifically to skip last-change validation while parent interface validation continues. Fix LAGMemberFlap and OTGLAGFlap timeout by expecting LOWER_LAYER_DOWN oper-status on Arista when the LAG goes down due to member port disable or link loss. The oper-status remains DOWN when LAG itself is shutdown.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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 addresses specific test failures observed on Arista devices within the 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 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 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
|
There was a problem hiding this comment.
Code Review
This pull request implements a new deviation, subinterface_0_state_unsupported, to accommodate devices that do not report state for implicitly created subinterface 0. Corresponding updates were made to the telemetry interface last change tests to conditionally skip subinterface checks. Additionally, vendor-specific logic was added for Arista LAG flap tests. The reviewer suggested abstracting the vendor-specific operational status logic to enhance maintainability and promote reusability across different platforms.
| if dut.Vendor() == ondatra.ARISTA && (testName == "LAGMemberFlap" || testName == "OTGLAGFlap") { | ||
| targetOperStatus = oc.Interface_OperStatus_LOWER_LAYER_DOWN | ||
| } |
There was a problem hiding this comment.
The condition for Arista LAG flap timeout is specific to LAGMemberFlap and OTGLAGFlap. Consider if this logic should be abstracted or if there is a more generic way to handle vendor-specific oper-status expectations for LAG flaps to improve maintainability, as constants and logic applicable to multiple vendors should be kept general to promote reusability.
References
- Constants that may be applicable to multiple vendors in the future should be kept general, even if they are currently used in a vendor-specific context, to promote reusability.
Issue#1
Add
subinterface_0_state_unsupporteddeviation for Arista as a few state telemetry is not populated on the default (index 0) subinterface (both LAG and Ethernet). The deviation is defined broadly to cover any unsupported state on subinterface 0, but in this PR it is used specifically to skiplast-changevalidation while parent interface validation continues -- Please see https://partnerissuetracker.corp.google.com/issues/456175792Issue#2
Fix LAGMemberFlap and OTGLAGFlap timeout by expecting
LOWER_LAYER_DOWNoper-status on Arista when the LAG goes down due to member port disable or link loss. The oper-status remainsDOWNwhen LAG itself is shut.Arista's default behavior is
The existing vendor checks are not touched and abstracted into a single logic since they don't seem to align properly with Arista's default behavior.