aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py')
-rw-r--r--yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py31
1 files changed, 29 insertions, 2 deletions
diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
index ccf077220..d84fda789 100644
--- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
+++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
@@ -28,6 +28,7 @@ from yardstick.benchmark.contexts import base as ctx_base
from yardstick.network_services.libs.ixia_libs.ixnet import ixnet_api
from yardstick.network_services.traffic_profile import base as tp_base
from yardstick.network_services.vnf_generic.vnf import tg_rfc2544_ixia
+from yardstick.network_services.traffic_profile import ixia_rfc2544
TEST_FILE_YAML = 'nsb_test_case.yaml'
@@ -501,6 +502,8 @@ class TestIxiaBasicScenario(unittest.TestCase):
'Valid_Frames_Rx': ['150', '150'],
'Frames_Tx_Rate': ['0.0', '0.0'],
'Valid_Frames_Rx_Rate': ['0.0', '0.0'],
+ 'Bytes_Rx': ['9600', '9600'],
+ 'Bytes_Tx': ['9600', '9600'],
'Tx_Rate_Kbps': ['0.0', '0.0'],
'Rx_Rate_Mbps': ['0.0', '0.0'],
'Tx_Rate_Mbps': ['0.0', '0.0'],
@@ -528,9 +531,13 @@ class TestIxiaBasicScenario(unittest.TestCase):
def test_create_traffic_model(self):
self.mock_IxNextgen.get_vports.return_value = [1, 2, 3, 4]
- self.scenario.create_traffic_model()
+ yaml_data = {'traffic_profile': {}
+ }
+ traffic_profile = ixia_rfc2544.IXIARFC2544Profile(yaml_data)
+ self.scenario.create_traffic_model(traffic_profile)
self.scenario.client.get_vports.assert_called_once()
- self.scenario.client.create_traffic_model.assert_called_once_with([1, 3], [2, 4])
+ self.scenario.client.create_traffic_model.assert_called_once_with(
+ [1, 3], [2, 4], traffic_profile)
def test_apply_config(self):
self.assertIsNone(self.scenario.apply_config())
@@ -551,10 +558,14 @@ class TestIxiaBasicScenario(unittest.TestCase):
expected_samples = {'xe0': {
'in_packets': 150,
'out_packets': 150,
+ 'in_bytes': 9600,
+ 'out_bytes': 9600,
'rx_throughput_mbps': 0.0,
'rx_throughput_kps': 0.0,
'RxThroughput': 5.0,
'TxThroughput': 5.0,
+ 'RxThroughputBps': 320.0,
+ 'TxThroughputBps': 320.0,
'tx_throughput_mbps': 0.0,
'tx_throughput_kps': 0.0,
'Store-Forward_Max_latency_ns': 100,
@@ -563,10 +574,14 @@ class TestIxiaBasicScenario(unittest.TestCase):
'xe1': {
'in_packets': 150,
'out_packets': 150,
+ 'in_bytes': 9600,
+ 'out_bytes': 9600,
'rx_throughput_mbps': 0.0,
'rx_throughput_kps': 0.0,
'RxThroughput': 5.0,
'TxThroughput': 5.0,
+ 'RxThroughputBps': 320.0,
+ 'TxThroughputBps': 320.0,
'tx_throughput_mbps': 0.0,
'tx_throughput_kps': 0.0,
'Store-Forward_Max_latency_ns': 200,
@@ -1169,6 +1184,8 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'port_statistics': [
{'Frames_Tx': '3000',
'Valid_Frames_Rx': '3000',
+ 'Bytes_Rx': '192000',
+ 'Bytes_Tx': '192000',
'Rx_Rate_Kbps': '0.0',
'Tx_Rate_Kbps': '0.0',
'Rx_Rate_Mbps': '0.0',
@@ -1176,6 +1193,8 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'port_name': 'Ethernet - 001'},
{'Frames_Tx': '3000',
'Valid_Frames_Rx': '3000',
+ 'Bytes_Rx': '192000',
+ 'Bytes_Tx': '192000',
'Rx_Rate_Kbps': '0.0',
'Tx_Rate_Kbps': '0.0',
'Rx_Rate_Mbps': '0.0',
@@ -1215,6 +1234,10 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'TxThroughput': 100.0,
'in_packets': 3000,
'out_packets': 3000,
+ 'in_bytes': 192000,
+ 'out_bytes': 192000,
+ 'RxThroughputBps': 6400.0,
+ 'TxThroughputBps': 6400.0,
'rx_throughput_kps': 0.0,
'rx_throughput_mbps': 0.0,
'sessions_down': 0,
@@ -1230,6 +1253,10 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'TxThroughput': 100.0,
'in_packets': 3000,
'out_packets': 3000,
+ 'in_bytes': 192000,
+ 'out_bytes': 192000,
+ 'RxThroughputBps': 6400.0,
+ 'TxThroughputBps': 6400.0,
'rx_throughput_kps': 0.0,
'rx_throughput_mbps': 0.0,
'tx_throughput_kps': 0.0,