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

[portsorch] Allow user to set none value for interface type #1991

Merged

Conversation

Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Oct 28, 2021

Depends on sonic-net/sonic-buildimage#9098

What I did

Allow user to set none value for interface type

Why I did it

Say user has speed=50G, interface_type=CR2, and user wants to change it to 10G and CR. Currently, there is no CLI can support it, because:

  1. If you change the interface type to CR first, SAI will get 50G and CR, SAI will report error because not supported
  2. If you change the speed to 10G first, SAI will get 10G and CR2, also not supported

The only way for now is to manually change the CONFIG_DB and do a config reload, this is not user friendly.

This PR allow user to set none value to interface type. So there is a way to achieve the goal via CLI:

  1. config interface type XXX none
  2. config interface speed XXX 10000
  3. config interface type XXX CR

How I verified it

Manual test

Details if related

@liat-grozovik
Copy link
Collaborator

@prsunny could you please help to merge?

@prsunny prsunny merged commit e03edb6 into sonic-net:master Nov 4, 2021
judyjoseph pushed a commit that referenced this pull request Nov 6, 2021
*Allow user to set none value for interface type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants