2 Documentation Test suite to find maximum switches which can be connected to the controller
3 Suite Setup Start Suite
4 Suite Teardown Utils.Stop Suite
6 Resource ../../../libraries/Utils.robot
7 Variables ../../../variables/Variables.py
8 Library ../../../libraries/ScaleClient.py
9 Library OperatingSystem
12 ${start} sudo python DynamicMininet.py
17 ${outfile} max_found.csv
21 [Documentation] Will find out max switches starting from ${start_sw} till reaching ${max_sw} with step defined by ${step_sw}
22 ${init_sw} Convert to Integer ${init_sw}
23 ${max_sw} Convert to Integer ${max_sw}
24 ${step_sw} Convert to Integer ${step_sw}
25 : FOR ${exp_sw} IN RANGE ${init_sw} ${max_sw+1} ${step_sw}
26 \ BuiltIn.Wait Until Keyword Succeeds 35s 1s Verify Switches Connected ${exp_sw}
27 \ ${max_found}= Set Variable ${exp_sw}
28 \ Set Suite variable ${max_found}
30 [Teardown] Log Store Max Found
34 [Documentation] Starts mininet with requested number of switches
35 Log Start the test on the base edition
36 ${mininet_conn_id}= Open Connection ${MININET} prompt=> timeout=1800
37 Set Suite Variable ${mininet_conn_id}
38 Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
39 Put File ${CURDIR}/../../../libraries/DynamicMininet.py DynamicMininet.py
40 Execute Command sudo ovs-vsctl set-manager ptcp:6644
41 Execute Command sudo mn -c
44 Write start ${CONTROLLER} ${init_sw}
46 Wait Until Keyword Succeeds 10s 1s Verify Switches Connected ${init_sw}
49 [Arguments] ${nr_switches}
50 [Documentation] Adds requested number of switches to the network
51 Write add_switches ${nr_switches}
54 Verify Switches Connected
55 [Arguments] ${exp_switches}
56 [Documentation] Verifies if switches are connected/present in operational inventory
57 ${sw} ${rep} ${found}= Flow Stats Collected controller=${CONTROLLER}
58 Should Be Equal As Numbers ${sw} ${exp_switches}
61 [Documentation] Logs the found number
62 Log To Console ${max_found}
63 Append To File ${out_file} Max\n${max_found}