Fix duration value for IXIA traffic item 17/60717/2
authorMyron Sosyak <myronx.sosyak@intel.com>
Tue, 7 Aug 2018 16:31:03 +0000 (17:31 +0100)
committerMyron Sosyak <myronx.sosyak@intel.com>
Wed, 8 Aug 2018 07:17:59 +0000 (08:17 +0100)
Removed code that overrides duration value in the update_frame
function

JIRA: YARDSTICK-1369

Change-Id: Ice06e4fbba4ec93ae086671a2530d521510f89da
Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com>
yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py

index 82f406d..06c6b0b 100644 (file)
@@ -359,7 +359,6 @@ class IxNextgen(object):  # pragma: no cover
                 raise exceptions.IxNetworkFlowNotPresent(flow_group=fg_id)
 
             type = traffic_param.get('traffic_type', 'fixedDuration')
-            duration = traffic_param.get('duration', 30)
             rate = traffic_param['rate']
             rate_unit = (
                 'framesPerSecond' if traffic_param['rate_unit'] ==
index 2416aee..5970eca 100644 (file)
@@ -339,6 +339,11 @@ class TestIxNextgen(unittest.TestCase):
         self.assertEqual(6, len(self.ixnet_gen.ixnet.setMultiAttribute.mock_calls))
         self.assertEqual(4, len(mock_update_frame.mock_calls))
 
+        self.ixnet_gen.ixnet.setMultiAttribute.assert_has_calls([
+            mock.call('cfg_element/transmissionControl',
+                      '-type', 'continuous', '-duration', 50)
+        ])
+
     def test_update_frame_flow_not_present(self):
         with mock.patch.object(
                 self.ixnet_gen, '_get_config_element_by_flow_group_name',