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

[tests/wr_arp] Migrate warm reboot management plane script ferret to py3 #12898

Merged

Conversation

opcoder0
Copy link
Contributor

Description of PR

In an effort to move/migrate test scripts from Python 2 to 3 this PR migrates the warm reboot management plane script ferret.py and ferret.conf.j2 to Python 3. The configuration refers to the python3 in the virtual environment.

Summary:
Fixes N/A

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

The warm reboot test scripts have been migrated to Python 3. The ferret script still runs in Python 2 environment. This PR migrates that to Py3.

How did you do it?

  • Run 2to3
  • Modified script as struct packing handles bytes instead of str.
  • Modified other affected parts to handle bytes directly

How did you verify/test it?

Ran warm reboot and warm reboot advanced tests on Dell S6100. Tests have passed successfully.

Any platform specific information?

None

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

Existing test case.

Documentation

Not applicable.

* Update tests/arp/files/ferret.conf.j2 to use python3 path
* Modify tests/arp/files/ferret.py to Python 3
  - Changes to handle calls returning bytes instead of str
Copy link
Contributor

@xwjiang-ms xwjiang-ms left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wsycqyz wsycqyz left a comment

Choose a reason for hiding this comment

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

LGTM

@wangxin wangxin merged commit 3982c7d into sonic-net:master May 23, 2024
14 checks passed
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.

None yet

4 participants