aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py')
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py
index 9db62e639..5c7b55e42 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/rfc2544_throughput_benchmark.py
@@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import absolute_import
+from six.moves import range
from experimental_framework.benchmarks import benchmark_base_class
from experimental_framework.packet_generators \
@@ -60,8 +62,10 @@ class RFC2544ThroughputBenchmark(benchmark_base_class.BenchmarkBaseClass):
features['allowed_values'] = dict()
features['allowed_values'][PACKET_SIZE] = ['64', '128', '256', '512',
'1024', '1280', '1514']
- features['allowed_values'][VLAN_SENDER] = map(str, range(-1, 4096))
- features['allowed_values'][VLAN_RECEIVER] = map(str, range(-1, 4096))
+ features['allowed_values'][VLAN_SENDER] = [str(x) for x in
+ range(-1, 4096)]
+ features['allowed_values'][VLAN_RECEIVER] = [str(x) for x in
+ range(-1, 4096)]
features['default_values'] = dict()
features['default_values'][PACKET_SIZE] = '1280'
features['default_values'][VLAN_SENDER] = '1007'
@@ -99,7 +103,7 @@ class RFC2544ThroughputBenchmark(benchmark_base_class.BenchmarkBaseClass):
:return: packet_sizes (list)
"""
packet_size = '1280' # default value
- if PACKET_SIZE in self.params.keys() and \
+ if PACKET_SIZE in list(self.params.keys()) and \
isinstance(self.params[PACKET_SIZE], str):
packet_size = self.params[PACKET_SIZE]
return packet_size