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 Resource ../../../libraries/Utils.robot
10 Variables ../../../variables/Variables.py
16 ${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${switches},1 --switch ovsk,protocols=OpenFlow13
17 ${PERFSCRIPT} ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/flow_add_delete_test.py
18 ${PARSESCRIPT} ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py
21 Check Switches Connected
22 [Documentation] Checks wheather switches are connected to controller.
23 [Setup] Start Http Session
24 Wait Until Keyword Succeeds 5 1 Are Switches Connected ${switches}
25 [Teardown] Stop Http Session
27 Configure And Deconfigure Flows
28 [Documentation] Runs the flow peformance script and the script that parses the results to csv file.
29 ${result}= Process.Run Process ${PERFSCRIPT} --host ${ODL_SYSTEM_IP} --flows ${flows}
30 ... --threads ${threads} --auth shell=yes
32 OperatingSystem.Create File out.log.txt content=${result.stdout}
34 Should Be Equal As Integers ${result.rc} 0
35 ${result}= Process.Run Process python ${PARSESCRIPT}
39 [Documentation] Starts http session.
40 Log http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
41 RequestsLibrary.Create Session tcsession http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
43 Are Switches Connected
44 [Arguments] ${switches}
45 [Documentation] Checks Topology Contains a fix number ${switches} of switces.
46 ${resp}= RequestsLibrary.Get Request tcsession /restconf/operational/network-topology:network-topology/topology/flow:1 headers=${ACCEPT_XML}
48 ${count}= XML.Get Element Count ${resp.content} xpath=node
49 Should Be Equal As Numbers ${count} ${switches}
52 [Documentation] Stops http session.
53 RequestsLibrary.Delete All Sessions