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

Pfc tests migration from abstract to snappi #3641

Closed

Conversation

ANISH-GOTTAPU
Copy link
Contributor

@ANISH-GOTTAPU ANISH-GOTTAPU commented Jun 8, 2021

Description of PR

Migration of PFC tests from ixnetwork-open-traffic-generator to snappi

Summary:
Test case(new/improvement)

Type of change

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

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 to snappi

How did you do it?

Replaced the code where abstract is used to snappi

How did you verify/test it?

verified all the tests in sonic-mgmt using pytest with DUT and IXIA connections
snappi version used for the development of tests snappi[ixnetwork]==0.4.1

@ANISH-GOTTAPU ANISH-GOTTAPU requested a review from a team as a code owner June 8, 2021 14:12
@lgtm-com
Copy link

lgtm-com bot commented Jun 8, 2021

This pull request introduces 1 alert when merging 903b055 into 4309468 - view on LGTM.com

new alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Jun 9, 2021

This pull request introduces 1 alert when merging cf37111 into 4327148 - view on LGTM.com

new alerts:

  • 1 for Unused import

@@ -0,0 +1,425 @@
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is also created in #3653

@@ -0,0 +1,74 @@
import pytest
import random
from tests.common.ixia.common_helpers import enable_packet_aging, start_pfcwd
Copy link
Contributor

Choose a reason for hiding this comment

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

Use tests.common.snappi.common_helpers instead.

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.qos_fixtures import prio_dscp_map, all_prio_list, lossless_prio_list,\
Copy link
Contributor

Choose a reason for hiding this comment

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

ixia -> snappi


from files.helper import run_pfc_test

pytestmark = [pytest.mark.topology('tgen')]
Copy link
Contributor

Choose a reason for hiding this comment

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

@pytest.mark.topology("snappi")

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.qos_fixtures import prio_dscp_map, all_prio_list, lossless_prio_list,\
Copy link
Contributor

Choose a reason for hiding this comment

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

ixia -> snappi


logger = logging.getLogger(__name__)

pytestmark = [pytest.mark.topology('tgen')]
Copy link
Contributor

Choose a reason for hiding this comment

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

tgen -> snappi

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.qos_fixtures import prio_dscp_map, all_prio_list, lossless_prio_list,\
Copy link
Contributor

Choose a reason for hiding this comment

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

ixia -> snappi


logger = logging.getLogger(__name__)

pytestmark = [pytest.mark.topology('tgen')]
Copy link
Contributor

Choose a reason for hiding this comment

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

tgen -> snappi

@ANISH-GOTTAPU
Copy link
Contributor Author

@baiwei0427 : This PR was raised before test_snappi, once test_snappi is merged, I will pull the master and update this PR accordingly

@baiwei0427
Copy link
Contributor

@baiwei0427 : This PR was raised before test_snappi, once test_snappi is merged, I will pull the master and update this PR accordingly

Thanks! Please change all 'ixia' and 'tgen' to 'snappi'

@ANISH-GOTTAPU ANISH-GOTTAPU mentioned this pull request Jul 9, 2021
2 tasks
@ANISH-GOTTAPU
Copy link
Contributor Author

closing this as it is addressed in #3794

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