diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2015-10-13 06:35:33 +0100 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-10-21 13:59:21 +0000 |
commit | 3572d56f5733592db30f0df2273fe93e731cba2d (patch) | |
tree | c3e8d9a497e22a2138e24dcdc6fefd831f90a592 /core/component_factory.py | |
parent | ba33eda4f9ad307178668c2634de6bec1c53a0d3 (diff) |
Flow Classification extension
Flow definition can be changed by testcase setup. By default
only ingress ports are used to route traffic, but flow can be
extended by src and dst IP addresses used by the traffic
generator.
Change-Id: I694714537ad2d818192a39f3235d8e6bf0f59a49
JIRA: VSPERF-90
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Reviewed-by: Gene Snider <eugene.snider@huawei.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Tv Rao <tv.rao@freescale.com>
Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'core/component_factory.py')
-rw-r--r-- | core/component_factory.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/component_factory.py b/core/component_factory.py index 4da37fb7..21cdd61d 100644 --- a/core/component_factory.py +++ b/core/component_factory.py @@ -47,7 +47,7 @@ def create_traffic(traffic_type, trafficgen_class): return TrafficControllerRFC2544(trafficgen_class) -def create_vswitch(deployment_scenario, vswitch_class, bidir=True): +def create_vswitch(deployment_scenario, vswitch_class, traffic): """Return a new IVSwitchController for the deployment_scenario. The returned controller is configured with the given vSwitch class. @@ -56,15 +56,16 @@ def create_vswitch(deployment_scenario, vswitch_class, bidir=True): :param deployment_scenario: The deployment scenario name :param vswitch_class: Reference to vSwitch class to be used. + :param traffic: Dictionary with traffic specific details :return: IVSwitchController for the deployment_scenario """ deployment_scenario = deployment_scenario.lower() if deployment_scenario.find("p2p") >= 0: - return VswitchControllerP2P(vswitch_class) + return VswitchControllerP2P(vswitch_class, traffic) elif deployment_scenario.find("pvp") >= 0: - return VswitchControllerPVP(vswitch_class, bidir) + return VswitchControllerPVP(vswitch_class, traffic) elif deployment_scenario.find("pvvp") >= 0: - return VswitchControllerPVVP(vswitch_class, bidir) + return VswitchControllerPVVP(vswitch_class, traffic) def create_vnf(deployment_scenario, vnf_class): """Return a new VnfController for the deployment_scenario. |