Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / openflowplugin / Maximum_Links / 010__finding_max_links.robot
1 *** Settings ***
2 Documentation       Test suite for finding out max number of Links
3
4 Library             OperatingSystem
5 Resource            ../../../variables/Variables.robot
6 Resource            ../../../libraries/WorkflowsOpenFlow.robot
7 Resource            ../../../libraries/KarafKeywords.robot
8
9 Suite Setup         Workflow Setup
10 Suite Teardown      Workflow Teardown
11
12
13 *** Variables ***
14 @{SWITCH_LIST}          ${16}    ${32}    ${40}    ${48}    ${52}
15 ${LINKS_RESULT_FILE}    links.csv
16 ${TIME_RESULT_FILE}     time.csv
17
18
19 *** Test Cases ***
20 Find Max Links
21     [Documentation]    Find max number of Links supported. Fully mesh topology starting from
22     ...    ${MIN_SWITCHES} switches till ${MAX_SWITCHES} switches will be attempted in steps of ${STEP_SWITCHES}
23     ${error_message}=    Set Variable    Fail initializing suite
24     ${maximum_links}=    Set Variable    ${0}
25     ${discover_time}=    Set Variable    0
26     FOR    ${switches}    IN    @{SWITCH_LIST}
27         ${status}    ${error_message}    ${topology_discover_time}=    WorkflowsOpenFlow.Workflow Full Mesh Topology
28         ...    ${switches}
29         IF    '${status}' == 'FAIL'            BREAK
30         ${maximum_links}=    Evaluate    ${switches} * ${switches-1}
31         ${discover_time}=    Set Variable    ${topology_discover_time}
32     END
33     Log to console    ${\n}
34     Log To Console    Execution stopped because: ${error_message}
35     Log To Console    Max Links: ${maximum_links}
36     OperatingSystem.Append To File    ${LINKS_RESULT_FILE}    Max Links\n
37     OperatingSystem.Append To File    ${LINKS_RESULT_FILE}    ${maximum_links}\n
38     OperatingSystem.Append To File    ${TIME_RESULT_FILE}    Discover Time\n
39     OperatingSystem.Append To File    ${TIME_RESULT_FILE}    ${discover_time}\n