Add multi-asic support for sonic-clear queue wredcounters and counter poll , --nonzero support for show queue wredcounters #4152
+715
−241
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.
What I did
Added multi asic support for sonic-clear queue wredcounters to fix sonic-net/sonic-buildimage#23566
Add --nonzero support for show queue wredcounters - (sonic-net/sonic-buildimage#22674)
Added multi asic support for counterpoll commands sonic-net/sonic-buildimage#23170
The PR #4012 broke some of the sonic-mgmt tests for multi-asic since the counterpoll command was mandating the asic-ns parameter. So the existing sonic-mgmt tests which configures the counterpoll commands without ns were failing and the PR #4012 is reverted. So changing the mandatory ns attribute to optional in this PR.
How I did it
Modified the wredstat and counterpoll sonic-utilities script to add muti-asic support and nonzero support
How to verify it
Verified the clear and show commands in T2 chassis and pizza box. Also verified that the counterpoll without ns option in multi-asic systems work and configures in global ns config_db and the show command reflects this config.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)