From dba37f2ec6b915649a10d8dae550bfd0291e4584 Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Wed, 23 Nov 2016 20:28:13 +0530 Subject: conf:Traffic-type naming convention and consistency Following changes are added following first review 1. Descriptions in integration/01_testcases.conf 2. Comment in conf/01_testcases.conf 3. Checking all cases of traffic types in traffic_controller_rfc2544.py 4. Removing whitespaces 5. Missing changes (throughput->rfc2544_throughput) 6. Syntax error in core/traffic_controller_rfc2544.py Currently the traffic-type values that are provided as part of the test case definition needs some fix to support additional traffic - apart from rfc2544. The Current and the proposed changed is summarized in the below table: |--------------------------------------------------------------------| | Parameter | Existing traffic_type value | Changed to | ---------------------------------------------------------------------- | Throughput | rfc2544 OR throughput | rfc2544_throughput | ---------------------------------------------------------------------- | Back2Back | back2back | rfc2544_back2back | ---------------------------------------------------------------------- | Continuous | continuous | rfc2544_continuous | ---------------------------------------------------------------------- JIRA: VSPERF-420 Change-Id: I22bd897f6389d2b568a6a3735c67f0003e813445 Signed-off-by: Sridhar K. N. Rao --- core/traffic_controller_rfc2544.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py index 980205f6..e230c832 100644 --- a/core/traffic_controller_rfc2544.py +++ b/core/traffic_controller_rfc2544.py @@ -50,15 +50,18 @@ class TrafficControllerRFC2544(TrafficController, IResults): else: traffic['l2'] = {'framesize': packet_size} - if traffic['traffic_type'] == 'back2back': + if traffic['traffic_type'] == 'rfc2544_back2back': result = self._traffic_gen_class.send_rfc2544_back2back( traffic, tests=self._tests, duration=self._duration, lossrate=self._lossrate) - elif traffic['traffic_type'] == 'continuous': + elif traffic['traffic_type'] == 'rfc2544_continuous': result = self._traffic_gen_class.send_cont_traffic( traffic, duration=self._duration) - else: + elif traffic['traffic_type'] == 'rfc2544_throughput': result = self._traffic_gen_class.send_rfc2544_throughput( traffic, tests=self._tests, duration=self._duration, lossrate=self._lossrate) + else: + raise RuntimeError("Unsupported traffic type {} was \ + detected".format(traffic['traffic_type'])) result = self._append_results(result, packet_size) self._results.append(result) -- cgit 1.2.3-korg