2 Documentation Test suite to find maximum switches which can be connected to the controller
5 Resource ../../../libraries/Utils.robot
6 Variables ../../../variables/Variables.py
7 Library ../../../libraries/ScaleClient.py
8 Library OperatingSystem
10 Suite Setup Start Suite
11 Suite Teardown Utils.Stop Mininet
15 ${start} sudo python DynamicMininet.py
20 ${outfile} max_found.csv
25 [Documentation] Will find out max switches starting from ${start_sw} till reaching ${max_sw} with step defined by ${step_sw}
26 ${init_sw} Convert to Integer ${init_sw}
27 ${max_sw} Convert to Integer ${max_sw}
28 ${step_sw} Convert to Integer ${step_sw}
29 FOR ${exp_sw} IN RANGE ${init_sw} ${max_sw+1} ${step_sw}
30 BuiltIn.Wait Until Keyword Succeeds 120s 1s Verify Switches Connected ${exp_sw}
31 ${max_found} Set Variable ${exp_sw}
32 Set Suite variable ${max_found}
35 [Teardown] Log Store Max Found
40 [Documentation] Starts mininet with requested number of switches
41 Log Start the test on the base edition
42 ${mininet_conn_id} Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=1800
43 Set Suite Variable ${mininet_conn_id}
44 Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
45 Put File ${CURDIR}/../../../libraries/DynamicMininet.py DynamicMininet.py
46 Execute Command sudo ovs-vsctl set-manager ptcp:6644
47 Execute Command sudo mn -c
50 Write start ${ODL_SYSTEM_IP} ${init_sw}
52 Wait Until Keyword Succeeds 10s 1s Verify Switches Connected ${init_sw}
55 [Documentation] Adds requested number of switches to the network
56 [Arguments] ${nr_switches}
57 Write add_switches ${nr_switches}
60 Verify Switches Connected
61 [Documentation] Verifies if switches are connected/present in operational inventory
62 [Arguments] ${exp_switches}
63 ${sw} ${rep} ${found} Flow Stats Collected controller=${ODL_SYSTEM_IP}
64 Should Be Equal As Numbers ${sw} ${exp_switches}
67 [Documentation] Logs the found number
68 Log To Console ${max_found}
70 Append To File ${out_file} Max\n${max_found}