2 Documentation Suite to measure setup reate using add-flows-rpc operation
3 Suite Setup Create Http Session And Upload Files
4 Suite Teardown Delete Http Session And Store Plot Data
5 Library OperatingSystem
8 Library RequestsLibrary
9 Library ../../../libraries/Common.py
10 Library ../../../libraries/ScaleClient.py
11 Variables ../../../variables/Variables.py
12 Resource ../../../variables/openflowplugin/Variables.robot
21 @{cntls} ${ODL_SYSTEM_IP}
22 ${start_cmd} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13
23 ${getf_cmd} sh ./get-total-found.sh
24 ${getr_cmd} sh ./get-total-reported.sh
27 ${outfile} flows_setup_time.csv
35 [Documentation] Setup of ${flnr} flows using rpc calls
36 ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread}
38 ${starttime}= Get Time epoch
39 ${res}= Operations Add Flows Rpc flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr}
41 Set Suite Variable ${flows}
42 ${http200ok}= Create List ${200}
43 ${validation}= Validate Responses ${res} ${http200ok}
44 Should Be True ${validation}
45 [Teardown] Save Setup Time ${starttime}
48 [Documentation] Waits till ${flnr} flows are initially collected
49 Inventory Change Reached ${swnr} ${flnr}
50 [Teardown] Log Switch Details
53 [Documentation] Flows deconfiguration
54 ${res}= Operations Remove Flows Rpc flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr}
56 ${http200ok}= Create List ${200}
57 ${validation}= Validate Responses ${res} ${http200ok}
58 Should Be True ${validation}
60 Check No Flows In Operational After Remove
61 [Documentation] No flows should be found after their removeal
62 Inventory Change Reached ${swnr} 0
63 [Teardown] Log Switch Details
70 [Documentation] Starts mininet with requested number of switches (${swnr})
71 Log Starting mininet with ${swnr} switches
72 Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=600
73 Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
74 Execute Command sudo ovs-vsctl set-manager ptcp:6644
75 Execute Command sudo mn -c
78 Wait Until Keyword Succeeds 10s 1s Are Switches Connected Topo
80 Create Http Session And Upload Files
81 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
82 Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=600
83 Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
84 Put File ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/ovs-scripts/* ./
88 [Documentation] Stops mininet
92 Read Until ${TOOLS_SYSTEM_PROMPT}
95 Delete Http Session And Store Plot Data
97 ${rate}= Evaluate (${flnr}/${setuptime})
98 Append To File ${outfile} FlowsSetupRate,FlowsSetupTime\n
99 Append To File ${outfile} ${rate},${setuptime}\n
101 Are Switches Connected Topo
102 [Documentation] Checks wheather switches are connected to controller
103 ${resp}= Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML}
105 ${count}= Get Element Count ${resp.content} xpath=node
106 Should Be Equal As Numbers ${count} ${swnr}
108 Check Flows Inventory
109 [Arguments] ${rswitches} ${rflows}
110 [Documentation] Checks in inventory has required state
111 ${sw} ${repf} ${foundf}= Flow Stats Collected controller=${ODL_SYSTEM_IP}
112 Should Be Equal As Numbers ${rswitches} ${sw}
113 Should Be Equal As Numbers ${rflows} ${foundf}
116 [Arguments] ${starttime}
117 [Documentation] Count the difference and stores it
118 ${endtime}= Get Time epoch
119 Log Stats collection finished at time ${endtime}
120 ${setuptime}= Evaluate int(${endtime})-int(${starttime})
121 Set Suite Variable ${setuptime}
123 Inventory Change Reached
124 [Arguments] ${rswitches} ${rflows}
125 [Documentation] This keywordwaits till inventory reaches required state
126 Wait Until Keyword Succeeds ${ichange} ${iperiod} Check Flows Inventory ${rswitches} ${rflows}
130 ${log}= Read Until mininet>
133 ${log}= Read Until mininet>