2 Documentation Test suite with connection of multiple switches
3 Suite Setup Utils.Start Mininet
4 Suite Teardown Utils.Stop Mininet
5 Library OperatingSystem
8 Library RequestsLibrary
9 Variables ../../../variables/Variables.py
10 Resource ../../../libraries/Utils.robot
11 Resource ../../../variables/openflowplugin/Variables.robot
17 ${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${switches},1 --switch ovsk,protocols=OpenFlow13
18 ${PERFSCRIPT} ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/flow_add_delete_test.py
19 ${PARSESCRIPT} ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py
22 Check Switches Connected
23 [Documentation] Checks wheather switches are connected to controller.
24 [Setup] Start Http Session
25 Wait Until Keyword Succeeds 5 1 Are Switches Connected ${switches}
26 [Teardown] Stop Http Session
28 Configure And Deconfigure Flows
29 [Documentation] Runs the flow peformance script and the script that parses the results to csv file.
30 ${result}= Process.Run Process ${PERFSCRIPT} --host ${ODL_SYSTEM_IP} --flows ${flows}
31 ... --threads ${threads} --auth shell=yes
33 OperatingSystem.Create File out.log.txt content=${result.stdout}
35 Should Be Equal As Integers ${result.rc} 0
36 ${result}= Process.Run Process python ${PARSESCRIPT}
40 [Documentation] Starts http session.
41 Log http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
42 RequestsLibrary.Create Session tcsession http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
44 Are Switches Connected
45 [Arguments] ${switches}
46 [Documentation] Checks Topology Contains a fix number ${switches} of switces.
47 ${resp}= RequestsLibrary.Get Request tcsession ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML}
49 ${count}= XML.Get Element Count ${resp.content} xpath=node
50 Should Be Equal As Numbers ${count} ${switches}
53 [Documentation] Stops http session.
54 RequestsLibrary.Delete All Sessions