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