diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-12-07 14:01:07 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-07 14:01:07 +0000 |
commit | 3d33e32f9fe9d8c8e6f4fb935d67fc39b2c0a483 (patch) | |
tree | 7d85bb6b92639121832f33087f6b47f3bf330f14 /core | |
parent | d3607cb18d6d3f55b53c06479c748b0184ba0ac5 (diff) | |
parent | dba37f2ec6b915649a10d8dae550bfd0291e4584 (diff) |
Merge "conf:Traffic-type naming convention and consistency"
Diffstat (limited to 'core')
-rw-r--r-- | core/traffic_controller_rfc2544.py | 9 |
1 files changed, 6 insertions, 3 deletions
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) |