Upgrade RF syntax for v3.2 compatibility
[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 Suite Setup       Workflow Setup
4 Suite Teardown    Workflow Teardown
5 Library           OperatingSystem
6 Resource          ../../../variables/Variables.robot
7 Resource          ../../../libraries/WorkflowsOpenFlow.robot
8 Resource          ../../../libraries/KarafKeywords.robot
9
10 *** Variables ***
11 @{SWITCH_LIST}    ${16}    ${32}    ${40}    ${48}    ${52}    ${56}    ${60}
12 ${LINKS_RESULT_FILE}    links.csv
13 ${TIME_RESULT_FILE}    time.csv
14
15 *** Test Cases ***
16 Find Max Links
17     [Documentation]    Find max number of Links supported. Fully mesh topology starting from
18     ...    ${MIN_SWITCHES} switches till ${MAX_SWITCHES} switches will be attempted in steps of ${STEP_SWITCHES}
19     ${error_message}=    Set Variable    Fail initializing suite
20     ${maximum_links}=    Set Variable    ${0}
21     ${discover_time}=    Set Variable    0
22     FOR    ${switches}    IN    @{SWITCH_LIST}
23         ${status}    ${error_message}    ${topology_discover_time}    WorkflowsOpenFlow.Workflow Full Mesh Topology    ${switches}
24         Exit For Loop If    '${status}' == 'FAIL'
25         ${maximum_links}=    Evaluate    ${switches} * ${switches-1}
26         ${discover_time}=    Set Variable    ${topology_discover_time}
27     END
28     Log to console    ${\n}
29     Log To Console    Execution stopped because: ${error_message}
30     Log To Console    Max Links: ${maximum_links}
31     OperatingSystem.Append To File    ${LINKS_RESULT_FILE}    Max Links\n
32     OperatingSystem.Append To File    ${LINKS_RESULT_FILE}    ${maximum_links}\n
33     OperatingSystem.Append To File    ${TIME_RESULT_FILE}    Discover Time\n
34     OperatingSystem.Append To File    ${TIME_RESULT_FILE}    ${discover_time}\n