-
Notifications
You must be signed in to change notification settings - Fork 740
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
[python3]migrate dhcp relay ptftests scripts from python2 to python3 #5534
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
ZhaohuiS
changed the title
migrate dhcp relay ptftests scripts from python2 to python3
[python3]migrate dhcp relay ptftests scripts from python2 to python3
Apr 21, 2022
/azp run |
Pull request contains merge conflicts. |
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
ZhaohuiS
force-pushed
the
python3_migration_ptf
branch
from
April 27, 2022 03:05
318e383
to
a15af7b
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
wangxin
approved these changes
Apr 30, 2022
kellyyeh
approved these changes
May 2, 2022
ZhaohuiS
added a commit
that referenced
this pull request
May 18, 2022
Description of PR Summary: migrate the following scripts to python3, this PR can't be merged until #5534 is merged which has dependency of ptf_runner.py ansible/roles/test/files/ptftests/dir_bcast_test.py ansible/roles/test/files/ptftests/fdb.py ansible/roles/test/files/ptftests/fdb_mac_expire_test.py ansible/roles/test/files/ptftests/fdb_test.py Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Migrate dhcp relay ptftests scripts from python2 to python3.
PR cannot be merged until merging of sonic-net/sonic-buildimage#10599 which includes necessary changes for the setup of the Python3 virtual environment in the docker-ptf docker container.
Signed-off-by: Zhaohui Sun zhaohuisun@microsoft.com
Type of change
Back port request
Approach
What is the motivation for this PR?
Do an incremental migration, migrate ptftests scripts from python2 to python3 one by one.
How did you do it?
Avoid impact py2 script, add virtual env in
docker-ptf
container, then call virtual env ptf for migrated py3 scripts.But ptf command will load all scripts under ptftests, it will throw error for py2 scripts when using new ptf.
So move migrated scripts to separated py3 folder avoid impacting py2 scripts.
How did you verify/test it?
run
dhcp_relay/test_dhcp_relay.py
and dhcp_relay/test_dhcpv6_relay.py
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
docker-ptf python3 migration doc:
https://github.com/Azure/sonic-mgmt/blob/master/ansible/roles/test/files/ptftests/py3/README.md