summaryrefslogtreecommitdiffstats
path: root/core/component_factory.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/component_factory.py')
-rw-r--r--core/component_factory.py6
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,