aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-19 12:30:59 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-20 13:48:29 +0000
commit02f4147b37e6ed4fb8a0f7f344e3b9b50a06b0b2 (patch)
tree3d500cea3f3e0e28a323dba75a3978726f270d61 /yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
parent5b37f2eb188c390ce6942940e0ad9f33900dafd5 (diff)
Accept line rate percentage or fps a initial rate for IXIA RFC2544
Accept line rate percentage or fps a initial rate for IXIA RFC2544 traffic profile: traffic_profile: traffic_type : IXIARFC2544Profile frame_rate : 100% traffic_profile: traffic_type : IXIARFC2544Profile frame_rate : 5000fps JIRA: YARDSTICK-1336 Change-Id: I85b3dd0daf563bb7af098a3aa5bb872961fb009b Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py')
-rw-r--r--yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
index 541855aa8..afa4cc3dc 100644
--- a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
+++ b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
@@ -28,7 +28,8 @@ TRAFFIC_PARAMETERS = {
'id': 1,
'bidir': 'False',
'duration': 60,
- 'iload': '100',
+ 'rate': 10000.5,
+ 'rate_unit': 'fps',
'outer_l2': {
'framesize': {'64B': '25', '256B': '75'}
},
@@ -65,7 +66,8 @@ TRAFFIC_PARAMETERS = {
'id': 2,
'bidir': 'False',
'duration': 60,
- 'iload': '100',
+ 'rate': 75.2,
+ 'rate_unit': '%',
'outer_l2': {
'framesize': {'128B': '35', '1024B': '65'}
},
@@ -396,6 +398,12 @@ class TestIxNextgen(unittest.TestCase):
self.assertEqual(6, len(ixnet_gen.ixnet.setMultiAttribute.mock_calls))
self.assertEqual(4, len(mock_update_frame.mock_calls))
+ ixnet_gen.ixnet.setMultiAttribute.assert_has_calls(
+ [mock.call('cfg_element/frameRate', '-rate', 10000.5,
+ '-type', 'framesPerSecond'),
+ mock.call('cfg_element/frameRate', '-rate', 75.2, '-type',
+ 'percentLineRate')],
+ any_order=True)
def test_update_frame_flow_not_present(self):
ixnet_gen = ixnet_api.IxNextgen()