Skip to content

[201911][Python] Migrate applications/scripts to import sonic-py-common package#5132

Merged
jleveque merged 6 commits intosonic-net:201911from
jleveque:use_sonic_py_common_201911
Aug 13, 2020
Merged

[201911][Python] Migrate applications/scripts to import sonic-py-common package#5132
jleveque merged 6 commits intosonic-net:201911from
jleveque:use_sonic_py_common_201911

Conversation

@jleveque
Copy link
Contributor

@jleveque jleveque commented Aug 9, 2020

- Why I did it

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 [201911] Introduce sonic-py-common package #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

- How to verify it

Test that all affected Python applications/scripts continue to function properly in 201911

@lgtm-com

This comment has been minimized.

@lgtm-com

This comment has been minimized.

@lgtm-com

This comment has been minimized.

@lgtm-com

This comment has been minimized.

@lgtm-com
Copy link

lgtm-com bot commented Aug 10, 2020

This pull request fixes 4 alerts when merging 9d8d8e4 into 13386c1 - view on LGTM.com

fixed alerts:

  • 4 for Unused import

@jleveque jleveque merged commit 309a098 into sonic-net:201911 Aug 13, 2020
@jleveque jleveque deleted the use_sonic_py_common_201911 branch August 13, 2020 23:35
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.

1 participant