sonic-utilities
sonic-utilities copied to clipboard
Fix multi-asic behaviour for watermarkstat
What I did
Added multi-asic support to watermarkstat, fixing watermark/persistent-watermark related commands. Previously, the following commands were not behaving correctly on multi-asic devices, as the '-n' namespace option was not available, and correct namespaces were not traversed on multi-asic devices.
- show buffer_pool watermark/persistent-watermark
- show headroom-pool watermark/persistent-watermark
- show priority-group persistent-watermark/watermark
- show queue persistent-watermark/watermark
This change fixes multi-asic behaviour of CLI commands that rely on watermarkstat as listed above.
This is a part of the set of changes being pushed for https://github.com/sonic-net/sonic-buildimage/issues/15148
How I did it
Added namespace option -n
and used multi_asic library to implement multi_asic behaviour. Added relevant unit tests to ensure functionality.
How to verify it
Run unit tests, or the commands as listed above.
@bktsim-arista Can you please upate https://github.com/sonic-net/sonic-buildimage/issues/15148 on which PR is handling which command for easy tracking ?
@alpeshspatel : please help review