sonic-utilities
sonic-utilities copied to clipboard
Make PFC commands use a class
What I did
This change puts contents originally in pfc/main.py into a class, to support the usage of the multi-asic helper in a future change. This change is required, as multi-asic helper being used expects members self.config_db
and self.db
to exist when a function with the decorator run_on_multi_asic
is called. The multi-asic class helper will be used to add multi-asic support to pfc commands in a following pull request.
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
Moved contents of PFC commands into a class. There are no functional changes.
/azpw run Azure.sonic-utilities
/azpw run
/azpw run Azure.sonic-utilities
/azp run Azure.sonic-utilities
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Because of the conversion of global methods to class methods, there are lots of white space changes. The best way to review this PR is to ignore whitespace.
@bktsim-arista Please file a direct PR to 202405 branch to address the conflict.
@bktsim-arista Please file a direct PR to 202405 branch to address the conflict.
There's no need to cherry-pick this PR into 202405 because commit 64473080 is already included. 😄 Can you change the label to already included in 202405?