From e4aca4273b3fa9ee022ceff138f2f694942db4e5 Mon Sep 17 00:00:00 2001 From: Christian Trautman Date: Tue, 9 Aug 2016 15:52:14 -0400 Subject: Xena_2544_tput_options: Add options for rfc 2544 testing Adds options to Xena for testing options when running RFC 2544 throughput testing. JIRA: VSPERF-369 Change-Id: I3145bd1a4d697d7b06cafda4f9d77cce859d1839 Signed-off-by: Christian Trautman --- tools/pkt_gen/xena/xena.py | 11 +++++++++++ tools/pkt_gen/xena/xena_json.py | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'tools') diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py index 449ef5b4..8d45053e 100755 --- a/tools/pkt_gen/xena/xena.py +++ b/tools/pkt_gen/xena/xena.py @@ -309,6 +309,17 @@ class Xena(ITrafficGenerator): duration=self._duration, micro_tpld=True if self._params[ 'traffic']['l2']['framesize'] == 64 else False) j_file.enable_throughput_test() + j_file.modify_2544_tput_options( + settings.getValue('TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE'), + settings.getValue('TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE'), + settings.getValue('TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE'), + settings.getValue( + 'TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION'), + settings.getValue( + 'TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD'), + settings.getValue( + 'TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD') + ) elif testtype == '2544_b2b': j_file.set_test_options_back2back( diff --git a/tools/pkt_gen/xena/xena_json.py b/tools/pkt_gen/xena/xena_json.py index 2a15a932..1ce7b46f 100644 --- a/tools/pkt_gen/xena/xena_json.py +++ b/tools/pkt_gen/xena/xena_json.py @@ -233,6 +233,22 @@ class XenaJSON(object): self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ 'Enabled'] = 'true' + def modify_2544_tput_options(self, initial_value, minimum_value, + maximum_value, value_resolution, + use_pass_threshhold, pass_threshhold): + self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ + 'RateIterationOptions']['InitialValue'] = initial_value + self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ + 'RateIterationOptions']['MinimumValue'] = minimum_value + self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ + 'RateIterationOptions']['MaximumValue'] = maximum_value + self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ + 'RateIterationOptions']['ValueResolution'] = value_resolution + self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ + 'RateIterationOptions']['UsePassThreshold'] = use_pass_threshhold + self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][ + 'RateIterationOptions']['PassThreshold'] = pass_threshhold + def set_chassis_info(self, hostname, pwd): """ Set the chassis info -- cgit 1.2.3-korg