aboutsummaryrefslogtreecommitdiffstats
path: root/core/component_factory.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-10-11 12:41:57 +0100
committerMartin Klozik <martinx.klozik@intel.com>2016-10-27 13:20:19 +0000
commit9c13028cf9b29da86e5b12c5d3b8c4d6bd858545 (patch)
treebfff243bcfa31ec2db5b92a0d507bcecbc7fcd2c /core/component_factory.py
parentadfdd0db071cf8247434cb456cc676144323719f (diff)
teststeps: Generic support of step driven tests
In the past, step driven testcases were supported only by integration testcases. This patch adds generic support of TestSteps for both integration and performance testcases. Step driven test were improved to support modification of existing deployment. As part of the patch a refactoring of traffic controllers were performed. Traffic controllers were modified to support trafficgen-off and trafficgen-pause modes in all possible ways of trafficgen invocation. JIRA: VSPERF-362 Change-Id: Ic8b7a9b0e7165f0a15a52279ed0f0952da9fedb8 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Bill Michalowski <bmichalo@redhat.com> Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com> Reviewed-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Diffstat (limited to 'core/component_factory.py')
-rw-r--r--core/component_factory.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/component_factory.py b/core/component_factory.py
index ef7ba86f..236a61ed 100644
--- a/core/component_factory.py
+++ b/core/component_factory.py
@@ -46,7 +46,7 @@ def create_traffic(traffic_type, trafficgen_class):
:param traffic_type: Name of traffic type
:param trafficgen_class: Reference to traffic generator class to be used.
- :return: A new ITrafficController
+ :return: A new TrafficController
"""
if traffic_type.lower().startswith('rfc2889'):
return TrafficControllerRFC2889(trafficgen_class)
@@ -87,7 +87,7 @@ def create_vswitch(deployment_scenario, vswitch_class, traffic,
raise RuntimeError("Unknown deployment scenario '{}'.".format(deployment_scenario))
-def create_vnf(deployment_scenario, vnf_class):
+def create_vnf(deployment_scenario, vnf_class, extra_vnfs):
"""Return a new VnfController for the deployment_scenario.
The returned controller is configured with the given VNF class.
@@ -96,9 +96,13 @@ def create_vnf(deployment_scenario, vnf_class):
:param deployment_scenario: The deployment scenario name
:param vswitch_class: Reference to vSwitch class to be used.
+ :param extra_vnfs: The number of VNFs not involved in given
+ deployment scenario. It will be used to correctly expand
+ configuration values and initialize shared dirs. This parameter
+ is used in case, that additional VNFs are executed by TestSteps.
:return: VnfController for the deployment_scenario
"""
- return VnfController(deployment_scenario, vnf_class)
+ return VnfController(deployment_scenario, vnf_class, extra_vnfs)
def create_collector(collector_class, result_dir, test_name):
"""Return a new Collector of the given class