[snmp] Improve the error handling of snmp pfc_counters check#798
Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom Feb 25, 2019
wangxin:snmp-pfc
Merged
[snmp] Improve the error handling of snmp pfc_counters check#798liat-grozovik merged 1 commit intosonic-net:masterfrom wangxin:snmp-pfc
liat-grozovik merged 1 commit intosonic-net:masterfrom
wangxin:snmp-pfc
Conversation
The snmp pfc_counter check is to validate if the interfaces have expected attributes. However, when expected attributes are missing, the script failed with error "'dict object' has no attribute". This change improved the error handling using a more robust syntax. Signed-off-by: Xin Wang <[email protected]>
liat-grozovik
approved these changes
Feb 20, 2019
Contributor
|
Looks good to me. Thanks @wangxin ! |
Collaborator
|
Made to 201811 branch on 2/28/2019 |
yxieca
pushed a commit
that referenced
this pull request
Feb 28, 2019
The snmp pfc_counter check is to validate if the interfaces have expected attributes. However, when expected attributes are missing, the script failed with error "'dict object' has no attribute". This change improved the error handling using a more robust syntax. Signed-off-by: Xin Wang <[email protected]>
auspham
pushed a commit
to auspham/sonic-mgmt
that referenced
this pull request
Feb 3, 2026
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fix ipfwd assert assumption for Broadcom TH5 The test limits the number of nhops that is used for testing. However, the general assert assumes this limit does not exist and asserts with CRM to make sure nhops available after the test is 0. This causes issues on TH5 because the number of nhop groups supported is 4095, where the limit of the test is 1024. This means that the number of nhop groups after the test would not be 0 `(4095 - 1024 - (extra groups) >> 0)`. The Cisco-case of the test has the proper assert that adjusts for this test limit. Fixing the test by including Broadcom TH5 devices to use that proper assert. Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [x] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [x] msft-202412 - [x] 202505 ### Approach #### What is the motivation for this PR? ipfwd tests failing for Arista TH5 devices. #### How did you do it? Adjust the assert conditions for Arista TH5 devices. #### How did you verify/test it? Test no longer fails on Arista TH5 devices. #### Any platform specific information? Broadcom TH5 #### Supported testbed topology if it's a new test case? ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
e438b0db6a8912b50f7acddf93d4dc2157f53ecf (HEAD -> 201911, origin/201911) Increase Syncd operation timeout from 1 min to 6 min. (sonic-net#828) 17974adb369111b44dd56837547806918ed4b1ed Update syncd_flex_counter.cpp (sonic-net#798) Signed-off-by: Abhishek Dosi <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The snmp pfc_counter check is to validate if the interfaces have
expected attributes. However, when expected attributes are missing, the
script failed with error "'dict object' has no attribute". This change
improved the error handling using a more robust syntax.
Signed-off-by: Xin Wang [email protected]
Description of PR
Summary:
Fixes # (issue)
The snmp pfc_counter check is to validate if the interfaces have
expected attributes. However, when expected attributes are missing, the
script failed with error "'dict object' has no attribute". This change
improved the error handling using a more robust syntax.
Type of change
Approach
How did you do it?
Improve the checking of expected interface attributes using a more robust syntax.
How did you verify/test it?
Tested on Mellanox platform.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation