2 Documentation Test suite for finding out max number of switches
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
14 ${SWITCHES_RESULT_FILE} switches.csv
15 ${TIME_RESULT_FILE} time.csv
19 [Documentation] Find max number of switches starting from ${MIN_SWITCHES} till reaching ${MAX_SWITCHES} in steps of ${STEP_SWITCHES}
20 ${error_message}= Set Variable Fail initializing suite
21 ${maximum_switches}= Set Variable ${0}
22 ${discover_time}= Set Variable 0
23 ${start}= Convert to Integer ${MIN_SWITCHES}
24 ${stop}= Convert to Integer ${MAX_SWITCHES}
25 ${step}= Convert to Integer ${STEP_SWITCHES}
26 FOR ${switches} IN RANGE ${start} ${stop+1} ${step}
27 ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Linear Topology ${switches}
28 Exit For Loop If '${status}' == 'FAIL'
29 ${maximum_switches}= Set variable ${switches}
30 ${discover_time}= Set Variable ${topology_discover_time}
33 Log To Console Execution stopped because: ${error_message}
34 Log To Console Max Switches: ${maximum_switches}
35 OperatingSystem.Append To File ${SWITCHES_RESULT_FILE} Max Switches\n
36 OperatingSystem.Append To File ${SWITCHES_RESULT_FILE} ${maximum_switches}\n
37 OperatingSystem.Append To File ${TIME_RESULT_FILE} Discover Time\n
38 OperatingSystem.Append To File ${TIME_RESULT_FILE} ${discover_time}\n