diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2016-09-14 22:42:05 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2016-09-21 14:24:02 +0530 |
commit | 1e1138cdc36ab308568e51314d967f7d13bdacc5 (patch) | |
tree | 4ec52ee6ff10bd2c94ece2f3e99f9bbedc643d71 /core/component_factory.py | |
parent | acdb444a54124834acdde45107062eaf1452c119 (diff) |
pkt_gen: Spirent Testcenter RFC 2889 Support
The changes/additions, apart from spirent testcenter-specific, also
includes
to some files in conf (01_testcase and 03_traffic) and core (result-
constants, traffic_controller and component_factory) folders.
Currently, only RFC2889 Forwarding testcase is supported.
Incorporated following review suggestions:
1. Log level fixes
2. Removing unused function in results_constants.py
3. Added documentation to docs/configguide/trafficgen.rst. Userguide
will be updated once other RFC2889 tests are implemented.
4. string matching in component_factory.
5. Remove Trailing Whitespaces
JIRA: VSPERF-286
Change-Id: I0195720ab2f8cf2c3a5aa490d66166bdca0afcb0
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Diffstat (limited to 'core/component_factory.py')
-rw-r--r-- | core/component_factory.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/component_factory.py b/core/component_factory.py index 7f453bd2..ef7ba86f 100644 --- a/core/component_factory.py +++ b/core/component_factory.py @@ -16,6 +16,7 @@ """ from core.traffic_controller_rfc2544 import TrafficControllerRFC2544 +from core.traffic_controller_rfc2889 import TrafficControllerRFC2889 from core.vswitch_controller_clean import VswitchControllerClean from core.vswitch_controller_p2p import VswitchControllerP2P from core.vswitch_controller_pxp import VswitchControllerPXP @@ -47,7 +48,10 @@ def create_traffic(traffic_type, trafficgen_class): :param trafficgen_class: Reference to traffic generator class to be used. :return: A new ITrafficController """ - return TrafficControllerRFC2544(trafficgen_class) + if traffic_type.lower().startswith('rfc2889'): + return TrafficControllerRFC2889(trafficgen_class) + else: + return TrafficControllerRFC2544(trafficgen_class) def create_vswitch(deployment_scenario, vswitch_class, traffic, |