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

[sonic-py-common] Add interface utilities #5113

Merged
merged 5 commits into from
Aug 18, 2020

Conversation

judyjoseph
Copy link
Contributor

- Why I did it
There are many places in the code where there is hardcoding to the way we refer to the Sonic front-panel/backplane interface prefixes. The idea with this PR is to keep this SONIC PREFIX naming convention in one place in py-common and all modules/applications use the functions defined here.

- How I did it
To start with I have add a file sonic_interface.py in sonic-py-common with API's to get the sonic interface prefix string. Can add more sonic interface specific utilities here. This is useful especially in the sonic-utilities show/config modules.

- How to verify it
Newly added functions were verified with CLI commands.

@judyjoseph judyjoseph closed this Aug 6, 2020
@judyjoseph judyjoseph reopened this Aug 6, 2020
@judyjoseph judyjoseph marked this pull request as ready for review August 6, 2020 07:24
@lgtm-com

This comment has been minimized.

jleveque
jleveque previously approved these changes Aug 7, 2020
@jleveque jleveque requested a review from lguohan August 7, 2020 00:21
@jleveque jleveque changed the title Add sonic_interface utilities to the sonic-py-common package [sonic-py-common] Add interface utilities Aug 7, 2020
@judyjoseph
Copy link
Contributor Author

retest mellanox please

@judyjoseph
Copy link
Contributor Author

retest this please

@judyjoseph
Copy link
Contributor Author

retest broadcom please

@judyjoseph
Copy link
Contributor Author

@lguohan , please share your comments -- if other generic interface APIs which we could add here.

@judyjoseph
Copy link
Contributor Author

retest this please

@judyjoseph
Copy link
Contributor Author

retest mellanox please

3 similar comments
@judyjoseph
Copy link
Contributor Author

retest mellanox please

@judyjoseph
Copy link
Contributor Author

retest mellanox please

@judyjoseph
Copy link
Contributor Author

retest mellanox please

@judyjoseph
Copy link
Contributor Author

@jleveque please could you approve if the updates are ok

@judyjoseph judyjoseph merged commit 52fe7ae into sonic-net:master Aug 18, 2020
@judyjoseph judyjoseph deleted the py-commmon-intf branch August 18, 2020 17:20
abdosi pushed a commit that referenced this pull request Sep 6, 2020
* Add sonic_interface.py in sonic-py-common for sonic interface utilities to keep this SONIC PREFIX naming convention in one place in py-common and all modules/applications use the functions defined here.
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
* Add sonic_interface.py in sonic-py-common for sonic interface utilities to keep this SONIC PREFIX naming convention in one place in py-common and all modules/applications use the functions defined here.
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.

3 participants