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 Mininet
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 120s 1s Verify Switches Connected ${exp_sw}
27 ${max_found}= Set Variable ${exp_sw}
28 Set Suite variable ${max_found}
31 [Teardown] Log Store Max Found
35 [Documentation] Starts mininet with requested number of switches
36 Log Start the test on the base edition
37 ${mininet_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=1800
38 Set Suite Variable ${mininet_conn_id}
39 Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
40 Put File ${CURDIR}/../../../libraries/DynamicMininet.py DynamicMininet.py
41 Execute Command sudo ovs-vsctl set-manager ptcp:6644
42 Execute Command sudo mn -c
45 Write start ${ODL_SYSTEM_IP} ${init_sw}
47 Wait Until Keyword Succeeds 10s 1s Verify Switches Connected ${init_sw}
50 [Arguments] ${nr_switches}
51 [Documentation] Adds requested number of switches to the network
52 Write add_switches ${nr_switches}
55 Verify Switches Connected
56 [Arguments] ${exp_switches}
57 [Documentation] Verifies if switches are connected/present in operational inventory
58 ${sw} ${rep} ${found}= Flow Stats Collected controller=${ODL_SYSTEM_IP}
59 Should Be Equal As Numbers ${sw} ${exp_switches}
62 [Documentation] Logs the found number
63 Log To Console ${max_found}
65 Append To File ${out_file} Max\n${max_found}