Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding switching-mode functionality to the system module #504

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

awhaley-dell
Copy link
Collaborator

@awhaley-dell awhaley-dell commented Jan 23, 2025

SUMMARY

Adding the switching-mode feature to the system module with unit tests and regression tests.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

switching-mode: system

OUTPUT
Regression test logs attached below

Switching-mode-regression-test-results_PR_review-Shade_comments.pdf
Regression_Switching-Mode_Sonic-System_PR_review-Shade_comments.log

ADDITIONAL INFORMATION

The REST endpoint for this feature is an empty response by default. This means the device is set to the default STORE_THEN_FORWARD.
When one sets the switching-mode to CUT_THROUGH at least once the REST endpoint will start returning the expected responses with the correct states, even when set to the default STORE_THEN_FORWARD.
The ability to set the CUT_THROUGH mode is not available on all platforms.
If you try to set that mode on an unsupported device you will receive an error message.

Checklist:
  • I have performed a self-review of my own code to ensure there are no formatting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained the same code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility or have provided any relevant "breaking_changes" descriptions in a "fragment" file in the "changelogs/fragments" directory of this repository.
  • I have provided a summary for this PR in valid "fragment" file format in the "changelogs/fragments" directory of this repository branch. Reference : Ansible Change Log Document
How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Regression Testing
  • Unit Testing

Austin Whaley and others added 7 commits December 19, 2024 14:54
Overriding and replacing don't make sense for this feature since it is a binary store-and-forward/cut-through option.
Added showcase for the replaced function with switching-mode
Updating the fact gathering to handle the case switching-mode has not been configured and the REST response is empty
@awhaley-dell awhaley-dell added the enhancement New feature or request label Jan 23, 2025
@awhaley-dell awhaley-dell added this to the v3.1.0 milestone Jan 23, 2025
@awhaley-dell awhaley-dell self-assigned this Jan 23, 2025
@awhaley-dell awhaley-dell marked this pull request as ready for review January 23, 2025 23:47
Austin Whaley and others added 9 commits January 28, 2025 19:38
Removed unnecessary files and simplified system module regression tests
Only one of the conditional statements removed empty values from want.
Moving the remove empties function to before the conditional.
This only affects enabling the conditional logic and has not downstream functional changes.
…d infra files.

Using Arun's recommendations for the infra file restructuring.
Making 2 newlines between test cases as standard and 1 space between sections within test case.
…onality.

Removing auto-breakout stub that didn't have a corresponding pre-config or delete in deleted_02.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants