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

[201911] Introduce sonic-py-common package #5063

Merged
merged 12 commits into from
Aug 3, 2020
Merged

[201911] Introduce sonic-py-common package #5063

merged 12 commits into from
Aug 3, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Jul 28, 2020

Consolidate common SONiC Python-language functionality into one shared package (sonic-py-common) and eliminate duplicate code.

The package currently includes four modules:

  • daemon_base
  • device_info
  • logger
  • task_base

NOTE: This is a combination of all changes from #5003, #5049 and some changes from #5043 backported to align with the 201911 branch. As part of the 201911 port, I am not installing the Python 3 package in the base image or in the VS container, because we do not have pip3 installed, and we do not intend to migrate to Python 3 in 201911.

Consolidate common SONiC Python-language functionality into one shared package (sonic-py-common) and eliminate duplicate code.

The package currently includes four modules:

- daemon_base
- device_info
- logger
- task_base
@jleveque jleveque merged commit 6556c40 into sonic-net:201911 Aug 3, 2020
@jleveque jleveque deleted the add_sonic-py-common_201911 branch August 3, 2020 18:50
jleveque added a commit that referenced this pull request Aug 13, 2020
…on package (#5132)

As part of consolidating all common Python-based functionality into the new sonic-py-common package, this pull request:
1. Redirects all Python applications/scripts in sonic-buildimage repo which previously imported sonic_device_util or sonic_daemon_base to instead import sonic-py-common, which was added to the 201911 branch in #5063
2. Replaces all calls to `sonic_device_util.get_platform_info()` to instead call `sonic_py_common.get_platform()` and removes any calls to `sonic_device_util.get_machine_info()` which are no longer necessary (i.e., those which were only used to pass the results to `sonic_device_util.get_platform_info()`.
3. Removes unused imports to the now-deprecated sonic-daemon-base package and sonic_device_util.py module

This is a step toward resolving #4999
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.

2 participants