yardstick.vTC.apexlake.experimental_framework package¶
Subpackages¶
- yardstick.vTC.apexlake.experimental_framework.benchmarks package
- Submodules
- yardstick.vTC.apexlake.experimental_framework.benchmarks.benchmark_base_class module
- yardstick.vTC.apexlake.experimental_framework.benchmarks.instantiation_validation_benchmark module
- yardstick.vTC.apexlake.experimental_framework.benchmarks.instantiation_validation_noisy_neighbors_benchmark module
- yardstick.vTC.apexlake.experimental_framework.benchmarks.multi_tenancy_throughput_benchmark module
- yardstick.vTC.apexlake.experimental_framework.benchmarks.rfc2544_throughput_benchmark module
- yardstick.vTC.apexlake.experimental_framework.benchmarks.test_benchmark module
- Module contents
- yardstick.vTC.apexlake.experimental_framework.constants package
- yardstick.vTC.apexlake.experimental_framework.libraries package
- yardstick.vTC.apexlake.experimental_framework.packet_generators package
Submodules¶
yardstick.vTC.apexlake.experimental_framework.api module¶
-
class
yardstick.vTC.apexlake.experimental_framework.api.
FrameworkApi
[source]¶ Bases:
object
-
static
execute_framework
(test_cases, iterations, heat_template, heat_template_parameters, deployment_configuration, openstack_credentials)[source]¶ Executes the framework according the inputs
Parameters: - test_cases –
Test cases to be ran on the workload (dict() of dict())
Example: test_case = dict() test_case[‘name’] = ‘module.Class’ test_case[‘params’] = dict() test_case[‘params’][‘throughput’] = ‘1’ test_case[‘params’][‘vlan_sender’] = ‘1007’ test_case[‘params’][‘vlan_receiver’] = ‘1006’ test_cases = [test_case]
- iterations – Number of cycles to be executed (int)
- heat_template – (string) File name of the heat template of the workload to be deployed. It contains the parameters to be evaluated in the form of #parameter_name. (See heat_templates/vTC.yaml as example).
- heat_template_parameters – (dict) Parameters to be provided as input to the heat template. See http://docs.openstack.org/developer/heat/ template_guide/hot_guide.html - section “Template input parameters” for further info.
- deployment_configuration – ( dict[string] = list(strings) ) ) Dictionary of parameters representing the deployment configuration of the workload The key is a string corresponding to the name of the parameter, the value is a list of strings representing the value to be assumed by a specific param. The parameters are user defined: they have to correspond to the place holders (#parameter_name) specified in the heat template.
Returns: dict() Containing results
- test_cases –
-
static
get_test_case_features
(test_case)[source]¶ Returns a list of features (description, requested parameters, allowed values, etc.) for a specified test case.
Parameters: test_case – name of the test case (string) The string represents the test case and can be obtained calling “get_available_test_cases()” method. Returns: dict() containing the features of the test case
-
static
yardstick.vTC.apexlake.experimental_framework.benchmarking_unit module¶
The Benchmarking Unit manages the Benchmarking of VNFs orchestrating the initialization, execution and finalization
-
class
yardstick.vTC.apexlake.experimental_framework.benchmarking_unit.
BenchmarkingUnit
(heat_template_name, openstack_credentials, heat_template_parameters, iterations, benchmarks)[source]¶ Management of the overall Benchmarking process
-
static
extract_experiment_name
(template_file_name)[source]¶ Generates a unique experiment name for a given template.
Parameters: template_file_name – (str) File name of the template used during the experiment string Returns: (str) Experiment Name
-
finalize
()[source]¶ Finalizes the Benchmarking Unit Destroys all the stacks deployed by the framework and save results on csv file.
Returns: None
-
static
get_benchmark_class
(complete_module_name)[source]¶ Returns the classes included in a given module.
Parameters: complete_module_name – (str) Complete name of the module as returned by get_available_test_cases. Returns: Class related to the benchmark/TC present in the requested module.
-
get_benchmark_name
(name, instance=0)[source]¶ Returns the name to be used for the benchmark/test case (TC). This is required since each benchmark/TC could be run more than once within the same cycle, with different initialization parameters. In order to distinguish between them, a unique name is generated.
Parameters: - name – (str) original name of the benchmark/TC
- instance – (int) number of instance already in the queue for this type of benchmark/TC.
Returns: (str) name to be assigned to the benchmark/TC
-
get_experiment_configuration
(template_file_name)[source]¶ Reads and returns the configuration for the specific experiment (heat template)
Parameters: template_file_name – (str) Name of the file for the heat template for which it is requested the configuration Returns: dict() Configuration parameters and values
-
static
yardstick.vTC.apexlake.experimental_framework.common module¶
-
class
yardstick.vTC.apexlake.experimental_framework.common.
ConfigurationFile
(sections, config_file='conf.cfg')[source]¶ Used to extract data from the configuration file
-
yardstick.vTC.apexlake.experimental_framework.common.
get_credentials
()[source]¶ Returns the credentials for OpenStack access from the configuration file :return: dictionary
-
yardstick.vTC.apexlake.experimental_framework.common.
get_deployment_configuration_variables_from_conf_file
()[source]¶
-
yardstick.vTC.apexlake.experimental_framework.common.
get_file_first_line
(file_name)[source]¶ Returns the first line of a file
Parameters: file_name – name of the file to be read (str) Returns: str
-
yardstick.vTC.apexlake.experimental_framework.common.
get_heat_template_params
()[source]¶ Returns the list of deployment parameters from the configuration file for the heat template
Returns: dict
-
yardstick.vTC.apexlake.experimental_framework.common.
get_testcase_params
()[source]¶ Returns the list of testcase parameters from the configuration file
Returns: dict
yardstick.vTC.apexlake.experimental_framework.deployment_unit module¶
-
class
yardstick.vTC.apexlake.experimental_framework.deployment_unit.
DeploymentUnit
(openstack_credentials)[source]¶ This unit is in charge to manage the deployment of the workloads under test and any other workloads necessary to the benchmark
-
deploy_heat_template
(template_file, stack_name, parameters, attempt=0)[source]¶ Deploys a heat template and in case of failure retries 3 times :param template_file: full path file name of the heat template :param stack_name: name of the stack to deploy :param parameters: parameters to be given to the heat template :param attempt: number of current attempt :return: returns True in case the creation is completed
returns False in case the creation is failed
-
yardstick.vTC.apexlake.experimental_framework.heat_manager module¶
yardstick.vTC.apexlake.experimental_framework.heat_template_generation module¶
Generation of the heat templates from the base template
-
class
yardstick.vTC.apexlake.experimental_framework.heat_template_generation.
TreeNode
[source]¶ This class represent the node of the configuration tree. Each node represents a single configuration value for a single configuration parameter.
-
add_child
(node)[source]¶ Adds a node as a child for the current node :param node: node to be added as a child (type: TreeNode) :return: None
-
static
get_leaves
(node)[source]¶ Returns all the leaves of a tree. :param node: root of the tree (TreeNode) :return type: list
-
get_path
()[source]¶ Returns all the path from the current node to the root of the tree. :return type: list of TreeNode
-
get_variable_name
()[source]¶ Returns the name of the variable correspondent to the current node :return type: str
-
get_variable_value
()[source]¶ Returns the value of the variable correspondent to the current node :return type: str or int
-
-
yardstick.vTC.apexlake.experimental_framework.heat_template_generation.
generates_templates
(base_heat_template, deployment_configuration)[source]¶ Generates the heat templates for the experiments :return: None
-
yardstick.vTC.apexlake.experimental_framework.heat_template_generation.
get_all_heat_templates
(template_dir, template_file_extension)[source]¶ Loads and returns all the generated heat templates :param template_dir: directory to search in (type: str) :param template_file_extension: extension of the file for templates
(type: str)Returns: type: list
Module contents¶
Experimental Framework