aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-09 12:06:55 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-09 13:10:10 +0100
commit9fd6661f0480ee94c742611ce9c478e30ca5e416 (patch)
treee66fc0ec4123012148f6489e9943e69369f3e2d3 /yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
parentef78f436ce067ee2ffbf5a0fcc00e082edf61d6b (diff)
Fix IXIA IxNetwork IMIX configuration
IxNet library is not setting correctly the IMIX definition per traffic item. The correct input for "weightedRangePairs" parameter is: [[64, 64, 10], [128, 128, 15], [512, 512, 5]] JIRA: YARDSTICK-1296 Change-Id: Idb4034ce817250da5b9a434230b1be6dae0d3ba3 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py')
-rw-r--r--yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
index 393f60f7c..74deeecb5 100644
--- a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
+++ b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
@@ -166,9 +166,10 @@ class IxNextgen(object): # pragma: no cover
:return: list of paired frame sizes and weights
"""
weighted_range_pairs = []
- for size, weight in framesize.items():
- weighted_range_pairs.append(int(size.upper().replace('B', '')))
- weighted_range_pairs.append(int(weight))
+ for size, weight in ((s, w) for (s, w) in framesize.items()
+ if int(w) != 0):
+ size = int(size.upper().replace('B', ''))
+ weighted_range_pairs.append([size, size, int(weight)])
return weighted_range_pairs
def iter_over_get_lists(self, x1, x2, y2, offset=0):
@@ -339,7 +340,7 @@ class IxNextgen(object): # pragma: no cover
"percentLineRate" no used)
- Frame size: custom IMIX [1] definition; a list of packet size in
bytes and the weight. E.g.:
- [64, 10, 128, 15, 512, 5]
+ [[64, 64, 10], [128, 128, 15], [512, 512, 5]]
[1] https://en.wikipedia.org/wiki/Internet_Mix