aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2018-12-17 09:01:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-12-17 09:01:01 +0000
commitde9fb89a94345d4c71a7193d4dc10e329a5dea8d (patch)
tree692e725ffb02efa6bee382f34c2a2ab1dec5f7db /yardstick/network_services/traffic_profile
parent686525d589afae49751fe56a2a90d67db5a70f95 (diff)
parente64ab8cb45beb8828e05d66af85033cf02bc4df6 (diff)
Merge "Add support for configuring frame rate per traffic flow for IXIA"
Diffstat (limited to 'yardstick/network_services/traffic_profile')
-rw-r--r--yardstick/network_services/traffic_profile/base.py4
-rw-r--r--yardstick/network_services/traffic_profile/ixia_rfc2544.py6
2 files changed, 8 insertions, 2 deletions
diff --git a/yardstick/network_services/traffic_profile/base.py b/yardstick/network_services/traffic_profile/base.py
index ea3f17874..2fdf6ce4a 100644
--- a/yardstick/network_services/traffic_profile/base.py
+++ b/yardstick/network_services/traffic_profile/base.py
@@ -36,7 +36,7 @@ class TrafficProfileConfig(object):
self.description = tp_config.get('description')
tprofile = tp_config['traffic_profile']
self.traffic_type = tprofile.get('traffic_type')
- self.frame_rate, self.rate_unit = self._parse_rate(
+ self.frame_rate, self.rate_unit = self.parse_rate(
tprofile.get('frame_rate', self.DEFAULT_FRAME_RATE))
self.test_precision = tprofile.get('test_precision')
self.packet_sizes = tprofile.get('packet_sizes')
@@ -46,7 +46,7 @@ class TrafficProfileConfig(object):
self.step_interval = tprofile.get('step_interval')
self.enable_latency = tprofile.get('enable_latency', False)
- def _parse_rate(self, rate):
+ def parse_rate(self, rate):
"""Parse traffic profile rate
The line rate can be defined in fps or percentage over the maximum line
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index 83d24a412..14edf2d5b 100644
--- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
+++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
@@ -78,6 +78,12 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
'outer_l4': {},
}
+ frame_rate = value.get('frame_rate')
+ if frame_rate:
+ flow_rate, flow_rate_unit = self.config.parse_rate(frame_rate)
+ result[traffickey]['rate'] = flow_rate
+ result[traffickey]['rate_unit'] = flow_rate_unit
+
outer_l2 = value.get('outer_l2')
if outer_l2:
result[traffickey]['outer_l2'].update({