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

Add Trex framework for phoenixwing traffic test #15724

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

forrestchu
Copy link

Description of PR

Summary:
Add Trex framework for phoenixwing traffic test

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

TRex framework is introduced into the 7-nodes srv6 testbed and will be used as a traffic generator and a packet counter. The traffic test and convergence test of SRv6 cases can be covered by using TRex.

How did you do it?

Based on Test doc #15221

How did you verify/test it?

Both sanity test cases are running daily for phoenix wing.

Any platform specific information?

cisco-8101-p4-32x100-vs

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

7-node srv6 testbed listed in testplan #15221

Documentation

#15221

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/srv6/trex_agent.py
Fixing tests/srv6/srv6_utils.py
Fixing tests/srv6/trex_cfg.yaml
Fixing tests/srv6/trex_utils.py

fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tests/srv6/test_srv6_basic_sanity.py
Fixing tests/srv6/trex_agent.py
Fixing tests/srv6/trex_cfg.yaml
Fixing tests/srv6/trex_utils.py
...
[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>

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tests/srv6/test_srv6_basic_sanity.py
Fixing tests/srv6/trex_agent.py
Fixing tests/srv6/srv6_utils.py
Fixing tests/srv6/trex_cfg.yaml
Fixing tests/srv6/trex_utils.py

check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/srv6/srv6_utils.py:10:1: E302 expected 2 blank lines, found 1
...
[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>

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tests/srv6/trex_cfg.yaml

check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/srv6/srv6_utils.py:16:1: E302 expected 2 blank lines, found 1
tests/srv6/srv6_utils.py:351:1: E302 expected 2 blank lines, found 0
tests/srv6/srv6_utils.py:359:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:359:32: F821 undefined name 'Dot1Q'
tests/srv6/srv6_utils.py:359:40: F821 undefined name 'IP'
...
[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>

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tests/srv6/trex_cfg.yaml

check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/srv6/srv6_utils.py:368:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:368:32: F821 undefined name 'Dot1Q'
tests/srv6/srv6_utils.py:368:40: F821 undefined name 'IP'
tests/srv6/srv6_utils.py:369:17: F821 undefined name 'UDP'
tests/srv6/srv6_utils.py:371:24: F821 undefined name 'Ether'
...
[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>

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

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

tests/srv6/srv6_utils.py:368:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:368:32: F821 undefined name 'Dot1Q'
tests/srv6/srv6_utils.py:368:40: F821 undefined name 'IP'
tests/srv6/srv6_utils.py:369:17: F821 undefined name 'UDP'
tests/srv6/srv6_utils.py:371:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:371:32: F821 undefined name 'Dot1Q'
tests/srv6/srv6_utils.py:371:40: F821 undefined name 'IPv6'
tests/srv6/srv6_utils.py:372:17: F821 undefined name 'UDP'
tests/srv6/srv6_utils.py:375:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:375:32: F821 undefined name 'IP'
tests/srv6/srv6_utils.py:376:17: F821 undefined name 'UDP'
...
[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>

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

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

tests/srv6/srv6_utils.py:368:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:368:32: F821 undefined name 'Dot1Q'
tests/srv6/srv6_utils.py:368:40: F821 undefined name 'IP'
tests/srv6/srv6_utils.py:369:17: F821 undefined name 'UDP'
tests/srv6/srv6_utils.py:371:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:371:32: F821 undefined name 'Dot1Q'
tests/srv6/srv6_utils.py:371:40: F821 undefined name 'IPv6'
tests/srv6/srv6_utils.py:372:17: F821 undefined name 'UDP'
tests/srv6/srv6_utils.py:375:24: F821 undefined name 'Ether'
tests/srv6/srv6_utils.py:375:32: F821 undefined name 'IP'
tests/srv6/srv6_utils.py:376:17: F821 undefined name 'UDP'
...
[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>

Signed-off-by: 伍木 <wumu.zsl@alibaba-inc.com>
Signed-off-by: 伍木 <wumu.zsl@alibaba-inc.com>
@yuezhoujk
Copy link

/azp run Azure.sonic-mgmt

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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