Skip to content
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

[pfc] rectify asym pfc cli command by adding interface_name as parameter #667

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AmitKaushik7
Copy link
Contributor

- What I did
Fixed the config interface pfc asymmetric CLI failure.

- How I did it
By adding the interface as a parameter to the CLI command( asymmetric command in config/main.py).

- How to verify it
By executing "sudo config interface pfc asymmetric <interface_name> on" command.

- Previous command output (if the output of a command-line utility has changed)
admin@sonic:~$ sudo config interface pfc asymmetric Ethernet9 on
Usage: config interface pfc asymmetric [OPTIONS] STATUS

Error: Invalid value for "status": invalid choice: Ethernet9. (choose from on, off)

- New command output (if the output of a command-line utility has changed)
admin@sonic:~$ sudo config interface pfc asymmetric Ethernet9 on

admin@sonic:~$

-->

@liat-grozovik
Copy link
Collaborator

please check #632 IMO it fixed the issues.

@jleveque
Copy link
Contributor

Please resolve conflicts

@AmitKaushik7
Copy link
Contributor Author

#632 addresses the issue partially. If any non-existing interface is used in this command, then the command succeeds and an invalid interface is added in the config DB which is incorrect.
Added an extra check(resolved the conflicts) in this script to apply it on valid physical interfaces only.

With this fix

admin@sonic:~$ sudo config interface pfc asymmetric Ethernet1111 on
Usage: config interface pfc asymmetric [OPTIONS] <interface_name> STATUS
Error: Interface name is invalid!!

With just #632

admin@sonic:$ sudo config interface pfc asymmetric Ethernet1111 on
admin@sonic:
$ show int sta
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC


Ethernet0 49,50,51,52 100G 9100 hundredGigE1 routed down down N/A on
Ethernet4 53,54,55,56 100G 1710 hundredGigE2 routed down down QSFP+ or later on
......
......
Ethernet92 29,30,31,32 100G 9100 hundredGigE24 routed down down N/A N/A
Ethernet96 113,114,115,116 100G 9100 hundredGigE25 routed down down N/A N/A
Ethernet100 117,118,119,120 100G 9100 hundredGigE26 routed down down N/A N/A
Ethernet104 121,122,123,124 100G 9100 hundredGigE27 routed down down N/A N/A
Ethernet108 125,126,127,128 100G 9100 hundredGigE28 routed down down N/A N/A
Ethernet112 1,2,3,4 100G 9100 hundredGigE29 routed down down N/A N/A
Ethernet116 5,6,7,8 100G 9100 hundredGigE30 routed down down N/A N/A
Ethernet120 9,10,11,12 100G 9100 hundredGigE31 routed down down N/A N/A
Ethernet124 13,14,15,16 100G 9100 hundredGigE32 routed down down N/A N/A
Ethernet1111 N/A N/A N/A N/A routed N/A N/A N/A on <==== New Entry(Ethernet1111) in the ConfigDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants