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