-
Notifications
You must be signed in to change notification settings - Fork 667
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
[pfcwd] Configuring to 'stop' ports #1350
base: master
Are you sure you want to change the base?
Conversation
retest this please |
click.echo("Ports not selected") | ||
return | ||
|
||
if 'all' in ports: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use 'all' == ports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such logic with the "in" statement should handle the case: "config pfcwd stop Ethernet0 Ethernet1 all" and remove all ports despite the first two arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to support this kind of command: "config pfcwd stop Ethernet0 Ethernet1 all" seems strange to me.
what will be the output of "config pfcwd stop --help" looks like? |
|
I would suggest adding proper hint info about supported subcommand in the output |
- What I did
Refactored the pfcwd stop command to look like pfcwd start.
It provides an update to stop a specific port:
config pfcwd stop Ethernet0
Or for all ports at once:
config pfcwd stop all
fixes sonic-net/sonic-buildimage#6338
- How to verify it
Create pfcwd instances for ports:
pfcwd start --action drop Ethernet0 400
pfcwd start --action drop Ethernet80 400
show pfcwd config
Remove one port
config pfcwd stop Ethernet0
show pfcwd config
Or remove all of them
config pfcwd stop all
show pfcwd config
- Previous command input
config pfcwd stop
- New command input
config pfcwd stop <port name / 'all'>