Skip to content

integrate trex traffic generator into virtual testbed#6954

Merged
tiejunzhang-ms merged 2 commits intosonic-net:masterfrom
tiejunzhang-ms:master
Dec 7, 2022
Merged

integrate trex traffic generator into virtual testbed#6954
tiejunzhang-ms merged 2 commits intosonic-net:masterfrom
tiejunzhang-ms:master

Conversation

@tiejunzhang-ms
Copy link
Contributor

Description of PR

Integrate traffic generator into virtual wan testbed
Summary:
Fixes # (issue)
Integrate traffic generator into wan testbed, which can be used by testcases

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Integrated traffic generator into wan testbed

How did you do it?

Add traffic generator container into wan virtual testbed

How did you verify/test it?

  1. verify it based on new wan testbed
  2. verify impact on existing testbed
  3. verify testcases based on new testbed

Any platform specific information?

N/A

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

N/A

Documentation

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

ansible/roles/vm_set/library/vm_topology.py:17:1: F403 'from ansible.module_utils.basic import *' used; unable to detect undefined names
ansible/roles/vm_set/library/vm_topology.py:36:121: E501 line too long (149 > 120 characters)
ansible/roles/vm_set/library/vm_topology.py:168:1: E302 expected 2 blank lines, found 1
ansible/roles/vm_set/library/vm_topology.py:172:121: E501 line too long (128 > 120 characters)
ansible/roles/vm_set/library/vm_topology.py:187:121: E501 line too long (125 > 120 characters)
ansible/roles/vm_set/library/vm_topology.py:231:121: E501 line too long (123 > 120 characters)
ansible/roles/vm_set/library/vm_topology.py:240:119: E502 the backslash is redundant between brackets
ansible/roles/vm_set/library/vm_topology.py:241:29: E128 continuation line under-indented for visual indent
ansible/roles/vm_set/library/vm_topology.py:372:121: E501 line too long (128 > 120 characters)
ansible/roles/vm_set/library/vm_topology.py:447:121: E501 line too long (128 > 120 characters)
ansible/roles/vm_set/library/vm_topology.py:455:121: E501 line too long (159 > 120 characters)
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@tiejunzhang-ms
Copy link
Contributor Author

There are three files report syntax check error:

  1. ansible/roles/vm_set/library/vm_topology.py, is existing file
  2. tests/wan/trex/imix.py, doesn't run on local, so there are some python libs can't find, it is expected.
  3. tests/wan/trex/stl_imix.py,doesn't run on local, so there are some python libs can't find, it is expected.

@tiejunzhang-ms tiejunzhang-ms merged commit 68f926f into sonic-net:master Dec 7, 2022
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.

3 participants