-
Notifications
You must be signed in to change notification settings - Fork 1k
Added consistency checker to all relevant advanced-reboot cases #16877
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
Merged
StormLiangMS
merged 8 commits into
sonic-net:master
from
Ryangwaite:add-consistency-checker-to-all-advanced-reboot-test-cases
Feb 24, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7af9f48
Added consistency checker to all relevant advanced-reboot cases
Ryangwaite 5cfafce
Inverted consistency-checker attribute matching
Ryangwaite 66d7d73
Added querying of port attributes
Ryangwaite 800d396
Fixed formatting and leftover function call from merge conflict
Ryangwaite 3d84951
Removed a double "self"
Ryangwaite 1421113
Renamed ARISTA_KEYS to BROADCOM_KEYS
Ryangwaite b14fcda
Addressed PR feedback
Ryangwaite 84c3688
Removed consistency check from test_fast_reboot_from_other_vendor
Ryangwaite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,51 @@ | ||
| from dataclasses import dataclass | ||
| from typing import List | ||
|
|
||
| ALL_ATTRIBUTES = "all" | ||
|
|
||
|
|
||
| @dataclass | ||
| class ConsistencyCheckQueryKey: | ||
| key: str | ||
| attributes: List[str] | ||
|
|
||
|
|
||
| BROADCOM_KEYS: List[ConsistencyCheckQueryKey] = [ | ||
| ConsistencyCheckQueryKey("ASIC_STATE:SAI_OBJECT_TYPE_BUFFER_POOL:*", attributes=[ALL_ATTRIBUTES]), | ||
| ConsistencyCheckQueryKey("ASIC_STATE:SAI_OBJECT_TYPE_BUFFER_PROFILE:*", attributes=[ALL_ATTRIBUTES]), | ||
| ConsistencyCheckQueryKey("ASIC_STATE:SAI_OBJECT_TYPE_SWITCH:*", attributes=[ALL_ATTRIBUTES]), | ||
| ConsistencyCheckQueryKey("ASIC_STATE:SAI_OBJECT_TYPE_WRED:*", attributes=[ALL_ATTRIBUTES]), | ||
| ConsistencyCheckQueryKey( | ||
| "ASIC_STATE:SAI_OBJECT_TYPE_PORT:*", | ||
| attributes=[ | ||
| "SAI_PORT_ATTR_QOS_TC_TO_QUEUE_MAP", | ||
| "SAI_PORT_ATTR_QOS_TC_TO_PRIORITY_GROUP_MAP", | ||
| "SAI_PORT_ATTR_QOS_PFC_PRIORITY_TO_QUEUE_MAP", | ||
| "SAI_PORT_ATTR_QOS_DSCP_TO_TC_MAP", | ||
| "SAI_PORT_ATTR_MTU", | ||
| "SAI_PORT_ATTR_INGRESS_ACL", | ||
| "SAI_PORT_ATTR_AUTO_NEG_MODE", | ||
| "SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL", | ||
| "SAI_PORT_ATTR_ADMIN_STATE", | ||
| "SAI_PORT_ATTR_FEC_MODE", | ||
| # The "get" implementation of the SAI_PORT_ATTR_SPEED attribute sometimes has a side effect of changing | ||
Ryangwaite marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # the port speed. Consistency-checker should not change the state of the DUT, so we ignore this attribute | ||
| # "SAI_PORT_ATTR_SPEED", | ||
| # This attribute doesn't match between ASIC_DB and ASIC SAI and the test fails the assertion | ||
| # "SAI_PORT_ATTR_PORT_VLAN_ID", | ||
| ] | ||
| ), | ||
| ] | ||
|
|
||
|
|
||
| # The list of platforms and versions that have been tested to work with the consistency checker | ||
| SUPPORTED_PLATFORMS_AND_VERSIONS = { | ||
| "x86_64-arista_7060_cx32s": ["202305", "202311"], | ||
| "x86_64-arista_7260cx3_64": ["202305", "202311"], | ||
| "x86_64-arista_7060_cx32s": { | ||
| "202305": BROADCOM_KEYS, | ||
| "202311": BROADCOM_KEYS, | ||
| }, | ||
| "x86_64-arista_7260cx3_64": { | ||
| "202305": BROADCOM_KEYS, | ||
| "202311": BROADCOM_KEYS, | ||
| }, | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.