-
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
Snappi sample #3653
Snappi sample #3653
Conversation
update to master
updating the name
updating to master repo
merging master
Routing Policy Tests
Revert "Routing Policy Tests"--reverting the PR to clean the master
This PR is dependant on sonic-net/sonic-buildimage#7829 |
This pull request introduces 1 alert when merging 96d8762 into 6a4da3c - view on LGTM.com new alerts:
|
from ipaddress import ip_address, IPv4Address | ||
from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ | ||
fanout_graph_facts | ||
from tests.common.ixia.common_helpers import get_vlan_subnet, get_addrs_in_subnet,\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you create a new folder test.common.snappi to hold all the helper functions used to snappi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created new folder and moved helper files as suggested
@pytest.fixture(scope="module") | ||
def snappi_api_serv_ip(tbinfo): | ||
""" | ||
In a tgen testbed, there is no PTF docker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tgen -> snappi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
|
||
def __l3_intf_config(config, port_config_list, duthost, ixia_ports): | ||
""" | ||
Generate Tgen configuration of layer 3 interfaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tgen -> Snappi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
ip_stack.prefix = prefix | ||
ip_stack.gateway = gw_addr | ||
|
||
port_config = IxiaPortConfig(id=port_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IxiaPortConfig -> SnappiPortConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created new file in snappi folder and updated the class name
tests/snappi/test_snappi.py
Outdated
fanout_graph_facts | ||
from tests.common.fixtures.snappi_fixtures import snappi_api_serv_ip, snappi_api_serv_port,\ | ||
snappi_api, tgen_testbed_config | ||
from tests.common.ixia.port import select_ports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ixia -> snappi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
return testbed_config | ||
|
||
|
||
def test_snappi(snappi_api, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align all the arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
updated lab.yml to take |
This pull request introduces 3 alerts when merging 769106c into a26f2d5 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging e48be1a into ca982e6 - view on LGTM.com new alerts:
|
@ANISH-GOTTAPU Can you fix LGTM alerts? |
@neethajohn Can you merge this PR? |
This reverts commit 3da7456.
Sorry @neethajohn @ANISH-GOTTAPU , I have to revert this PR since it causes regression. Please check #3766 for more info. Thanks |
* Sample traffic test using snappi * Snappi helpers for traffic generation What is the motivation for this PR? The motivation for this PR is to migrate the tests that are written with ixnetwork open traffic generator to snappi How did you do it? Replaced the code where abstract is used to snappi How did you verify/test it? verified the tests in sonic-mgmt using pytest with DUT and IXIA connections snappi version used for the development of tests snappi[ixnetwork]==0.4.14
This reverts commit 3da7456.
sonic-net#3806) This reverts commit 1b53581. Reverts sonic-net#3766 since the build is using the new docker
Description of PR
Migration of ixa/test_tgen from
ixnetwork open traffic generator
tosnappi
Summary:
Test case(new/improvement)
Type of change
Approach
What is the motivation for this PR?
The motivation for this PR is to migrate the tests that are written with
ixnetwork open traffic generator
tosnappi
How did you do it?
Replaced the code where abstract is used to snappi
How did you verify/test it?
verified the tests in sonic-mgmt using pytest with DUT and IXIA connections
snappi version used for the development of tests
snappi[ixnetwork]==0.4.14