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

[Yang model] Allow user to set none value for interface type #9098

Merged

Conversation

Junchao-Mellanox
Copy link
Collaborator

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

@lguohan lguohan added the YANG YANG model related changes label Oct 28, 2021
@liat-grozovik
Copy link
Collaborator

@lguohan could you please help to merge?

@judyjoseph judyjoseph merged commit 68dfbfa into sonic-net:master Nov 6, 2021
judyjoseph pushed a commit that referenced this pull request Nov 6, 2021
This PR allow user to set none value to interface type. So there is a way to achieve the goal via CLI:

config interface type XXX none
config interface speed XXX 10000
config interface type XXX CR
@Junchao-Mellanox Junchao-Mellanox deleted the allow_interface_type_none branch June 12, 2023 04:37
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.

5 participants