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

Fix functionality to allow a value of 0 to be configured for the appropriate integer attributes and refactor STP module code #477

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

Conversation

stalabi1
Copy link
Collaborator

@stalabi1 stalabi1 commented Oct 29, 2024

SUMMARY
  • I fixed the functionality of the code to allow a value of 0 to be configured for the appropriate integer attributes.
  • I removed all of the default definitions from the argspec because the definitions were making some configuration cases impossible to implement, e.g. the deletion of an STP interface by interface name that has all defaults configured.
  • I refactored the code reduce the number of nested loops in the case of searching for instance matches. I condensed a few of the get delete request methods.
  • I added more UT test cases to increase code coverage.
  • I updated the facts code to properly handle empties allowing me to remove a few 'remove_empties' calls from config.
GitHub Issues
GitHub Issue #472
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

sonic_stp

OUTPUT

regression-2024-11-01-13-22-03.html.pdf
merge_mst_id_0_output.log

ADDITIONAL INFORMATION

Current SONiC behavior doesn't allow me to to configure any other mst-id when mst-id 0 is configured.

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 at least 90% 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

@stalabi1 stalabi1 added the bug Something isn't working label Oct 29, 2024
@stalabi1 stalabi1 marked this pull request as draft October 30, 2024 23:17
@TafkaMax
Copy link
Contributor

TafkaMax commented Nov 1, 2024

Tested this branch and it fixes the issue I had.

@stalabi1 stalabi1 marked this pull request as ready for review November 1, 2024 20:43
@stalabi1 stalabi1 changed the title Allow configuration of 'mst_id' 0 and refactor code for STP module Fix fuctionality to allow a value of 0 to be configured for the appropriate integer attributes and refactor module code Nov 1, 2024
@stalabi1 stalabi1 changed the title Fix fuctionality to allow a value of 0 to be configured for the appropriate integer attributes and refactor module code Fix functionality to allow a value of 0 to be configured for the appropriate integer attributes and refactor STP module code Nov 1, 2024
@stalabi1 stalabi1 added this to the v3.0.0 milestone Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants