From: Ross Brattain Date: Tue, 13 Feb 2018 01:34:40 +0000 (-0800) Subject: NSB: Rename traffic_profile to trex_traffic_profile X-Git-Tag: opnfv-6.0.0~128 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=710fd29fe4a5e6f747ff397a4f54f966999279a2;p=yardstick.git NSB: Rename traffic_profile to trex_traffic_profile Make it more clear that traffic_profile is not a generic class. Eventually we can refactor a more generic traffic profile. Change-Id: I1bf44a8cafcdeb8d74efb9e85a34f6d7b526d036 Signed-off-by: Ross Brattain --- diff --git a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py index f13945abf..f83d3341d 100644 --- a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py +++ b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py @@ -29,7 +29,7 @@ stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) stl_patch.start() if stl_patch: - from yardstick.network_services.traffic_profile.traffic_profile \ + from yardstick.network_services.traffic_profile.trex_traffic_profile \ import TrexProfile from yardstick.network_services.traffic_profile.ixia_rfc2544 import \ IXIARFC2544Profile diff --git a/tests/unit/network_services/traffic_profile/test_rfc2544.py b/tests/unit/network_services/traffic_profile/test_rfc2544.py index 221233710..fe563e9fd 100644 --- a/tests/unit/network_services/traffic_profile/test_rfc2544.py +++ b/tests/unit/network_services/traffic_profile/test_rfc2544.py @@ -29,7 +29,7 @@ stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) stl_patch.start() if stl_patch: - from yardstick.network_services.traffic_profile.traffic_profile \ + from yardstick.network_services.traffic_profile.trex_traffic_profile \ import TrexProfile from yardstick.network_services.traffic_profile.rfc2544 import \ RFC2544Profile @@ -164,8 +164,6 @@ class TestRFC2544Profile(unittest.TestCase): "in_packets": 1000, "out_packets": 1002, } - tol_min = 0.0 - tolerance = 1.0 expected = { 'DropPercentage': 0.1996, 'RxThroughput': 33.333333333333336, @@ -208,8 +206,6 @@ class TestRFC2544Profile(unittest.TestCase): "tx_throughput_mbps": 10, "in_packets": 1000, "out_packets": 0} - tol_min = 0.0 - tolerance = 0.0 r_f_c2544_profile.throughput_max = 0 expected = { 'DropPercentage': 100.0, 'RxThroughput': 100 / 3.0, diff --git a/tests/unit/network_services/traffic_profile/test_traffic_profile.py b/tests/unit/network_services/traffic_profile/test_trex_traffic_profile.py similarity index 93% rename from tests/unit/network_services/traffic_profile/test_traffic_profile.py rename to tests/unit/network_services/traffic_profile/test_trex_traffic_profile.py index 37b9a08d0..c34b97531 100644 --- a/tests/unit/network_services/traffic_profile/test_traffic_profile.py +++ b/tests/unit/network_services/traffic_profile/test_trex_traffic_profile.py @@ -29,16 +29,16 @@ stl_patch.start() if stl_patch: from yardstick.network_services.traffic_profile.base import TrafficProfile - from yardstick.network_services.traffic_profile.traffic_profile import TrexProfile - from yardstick.network_services.traffic_profile.traffic_profile import SRC - from yardstick.network_services.traffic_profile.traffic_profile import DST - from yardstick.network_services.traffic_profile.traffic_profile import ETHERNET - from yardstick.network_services.traffic_profile.traffic_profile import IP - from yardstick.network_services.traffic_profile.traffic_profile import IPv6 - from yardstick.network_services.traffic_profile.traffic_profile import UDP - from yardstick.network_services.traffic_profile.traffic_profile import SRC_PORT - from yardstick.network_services.traffic_profile.traffic_profile import DST_PORT - from yardstick.network_services.traffic_profile.traffic_profile import TYPE_OF_SERVICE + from yardstick.network_services.traffic_profile.trex_traffic_profile import TrexProfile + from yardstick.network_services.traffic_profile.trex_traffic_profile import SRC + from yardstick.network_services.traffic_profile.trex_traffic_profile import DST + from yardstick.network_services.traffic_profile.trex_traffic_profile import ETHERNET + from yardstick.network_services.traffic_profile.trex_traffic_profile import IP + from yardstick.network_services.traffic_profile.trex_traffic_profile import IPv6 + from yardstick.network_services.traffic_profile.trex_traffic_profile import UDP + from yardstick.network_services.traffic_profile.trex_traffic_profile import SRC_PORT + from yardstick.network_services.traffic_profile.trex_traffic_profile import DST_PORT + from yardstick.network_services.traffic_profile.trex_traffic_profile import TYPE_OF_SERVICE class TestTrexProfile(unittest.TestCase): diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py index 3ab157dc7..7f047226b 100644 --- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py +++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py @@ -15,7 +15,7 @@ from __future__ import absolute_import import logging -from yardstick.network_services.traffic_profile.traffic_profile import \ +from yardstick.network_services.traffic_profile.trex_traffic_profile import \ TrexProfile LOG = logging.getLogger(__name__) diff --git a/yardstick/network_services/traffic_profile/rfc2544.py b/yardstick/network_services/traffic_profile/rfc2544.py index b1ca8a345..83020c85c 100644 --- a/yardstick/network_services/traffic_profile/rfc2544.py +++ b/yardstick/network_services/traffic_profile/rfc2544.py @@ -21,7 +21,7 @@ from trex_stl_lib.trex_stl_client import STLStream from trex_stl_lib.trex_stl_streams import STLFlowLatencyStats from trex_stl_lib.trex_stl_streams import STLTXCont -from yardstick.network_services.traffic_profile.traffic_profile \ +from yardstick.network_services.traffic_profile.trex_traffic_profile \ import TrexProfile LOGGING = logging.getLogger(__name__) diff --git a/yardstick/network_services/traffic_profile/traffic_profile.py b/yardstick/network_services/traffic_profile/trex_traffic_profile.py similarity index 100% rename from yardstick/network_services/traffic_profile/traffic_profile.py rename to yardstick/network_services/traffic_profile/trex_traffic_profile.py