Allow handling of vlan ID values containing more then one digit. #460
+111
−108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
A utility function used in this resource module for converting incoming vlan IDs and vlan ranges for use in REST APIs used an incorrect criterion for distinguishing an individual vlan ID from a vlan range. It assumed that the length of the incoming "vlan_id" string would be 1 for an individual vlan and longer for a range. As a result, it failed to correctly recognize an individual vlan ID with more than one digit. Because the "problem" cases were all handled by this shared function, a simple fix in this utility function is sufficient for fixing the problem in the cases where it would have occurred.
GitHub Issues
List the GitHub issues impacted by this PR. If no Github issues are affected, please indicate this with "N/A".
ISSUE TYPE
COMPONENT NAME
sonic_stp
OUTPUT
STP regression test summary:
STP_multi_digit_vlan_regression_2024_1004.pdf
Checklist:
How Has This Been Tested?