summaryrefslogtreecommitdiffstats
path: root/docs/userguide/apexlake_framework/apexlake_api.rst
blob: 94f07dc06ebd6a3cbfd1a1697757271a1e3635c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* L
=================================
Apexlake API interface definition
=================================

The API interface provided by the framework in order to execute the test cases is defined in the following.


init
----

**static init()**

    Initializes the Framework

    **Returns** None


get_available_test_cases
------------------------

**static get_available_test_cases()**

    Returns a list of available test cases. This list include eventual modules developed by the user, if any.
    Each test case is returned as a string that represents the full name of the test case and that
    can be used to get more information calling get_test_case_features(test_case_name)

    **Returns** list of strings


get_test_case_features
----------------------

**static get_test_case_features(test_case)**

    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


execute_framework
-----------------

**static execute_framework** (test_cases,

                                iterations,

                                heat_template,

                                heat_template_parameters,

                                deployment_configuration,

                                openstack_credentials)

    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’] = ‘1000’

                test_case[’params’][’vlan_receiver’] = ‘1001’

                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