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

[Mellanox] Enhance Python3 support for platform API #7410

Merged
merged 3 commits into from
Jun 15, 2021

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Apr 23, 2021

Why I did it

Enhance the Python3 support for platform API.
Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

Signed-off-by: Stephen Sun stephens@nvidia.com

How I did it

  • Start all platform daemons from python3
  • Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
  • Adjust SDK API calls accordingly

How to verify it

  • Manually test
  • Run regression platform test

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
…supported python3

Signed-off-by: Stephen Sun <stephens@nvidia.com>
…m API python files

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs
Copy link
Collaborator Author

Depends on Azure#7848

1 similar comment
@stephenxs
Copy link
Collaborator Author

Depends on Azure#7848

@liat-grozovik liat-grozovik merged commit 80d01f2 into sonic-net:master Jun 15, 2021
@stephenxs stephenxs deleted the platform-api-python3 branch June 15, 2021 15:10
@qiluo-msft
Copy link
Collaborator

This PR could not cleanly cherry-pick to 202012, please submit another PR

@stephenxs
Copy link
Collaborator Author

This PR could not cleanly cherry-pick to 202012, please submit another PR

Thanks. I'll check whether there are some depended PRs that can be cherry-picked and will create one for 202012 if not.

stephenxs added a commit to stephenxs/sonic-buildimage that referenced this pull request Jun 17, 2021
- Why I did it
Enhance the Python3 support for platform API. Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

- How I did it
Start all platform daemons from python3
1. Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
2. Adjust SDK API calls accordingly

- How to verify it
Manually test and run regression platform test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs
Copy link
Collaborator Author

This PR could not cleanly cherry-pick to 202012, please submit another PR

PR Azure#7910 opened for back porting it to 202012.

jleveque pushed a commit that referenced this pull request Jun 18, 2021
- Why I did it
This is to back-port Azure 7410 to 202012 branch.
Enhance the Python3 support for platform API. Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

- How I did it
Start all platform daemons from python3
1. Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
2. Adjust SDK API calls accordingly

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Junchao-Mellanox pushed a commit to Junchao-Mellanox/sonic-buildimage that referenced this pull request Jun 24, 2021
- Why I did it
Enhance the Python3 support for platform API. Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

- How I did it
Start all platform daemons from python3
1. Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
2. Adjust SDK API calls accordingly

- How to verify it
Manually test and run regression platform test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
- Why I did it
Enhance the Python3 support for platform API. Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

- How I did it
Start all platform daemons from python3
1. Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
2. Adjust SDK API calls accordingly

- How to verify it
Manually test and run regression platform test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
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