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

Make some Ansible scripts support both Python 2 and 3 #3978

Merged
merged 3 commits into from
Aug 6, 2021

Conversation

saiarcot895
Copy link
Contributor

Description of PR

Make some more Ansible scripts and modules compatible with both Python 2 and 3.

This is in preparation for sonic-net/sonic-buildimage#8191

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

How did you do it?

Used 2to3 tool for conversion, followed by manual edits for handling both Python 2 and 3, excluding some changes, and making some additional missed changes.

How did you verify/test it?

Tested by running bgp_fact and kvmtest on Bullseye image. bgp_fact appears to fully pass, kvmtest is failing on one test (platform_tests/test_advanced_reboot.py::test_fast_reboot)

Need to test on current master image.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@saiarcot895 saiarcot895 requested a review from lguohan August 6, 2021 01:15
@saiarcot895 saiarcot895 requested a review from a team as a code owner August 6, 2021 01:15
@lgtm-com
Copy link

lgtm-com bot commented Aug 6, 2021

This pull request introduces 2 alerts and fixes 3 when merging d011ece into bac8b9b - view on LGTM.com

new alerts:

  • 2 for Unused import

fixed alerts:

  • 3 for Unused import

Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Signed-off-by: Saikrishna Arcot <[email protected]>
Signed-off-by: Saikrishna Arcot <[email protected]>
@lgtm-com
Copy link

lgtm-com bot commented Aug 6, 2021

This pull request fixes 2 alerts when merging f4db4ee into ea0d0c6 - view on LGTM.com

fixed alerts:

  • 2 for Unused import

@saiarcot895 saiarcot895 merged commit 9516220 into sonic-net:master Aug 6, 2021
@saiarcot895 saiarcot895 deleted the bullseye-python-3 branch August 6, 2021 21:57
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
Make some Ansible scripts support both Python 2 and 3

Signed-off-by: Saikrishna Arcot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants