2 Documentation Suite checks if StatMngr is able to collect flows correctly
3 Suite Setup Create Http Session
4 Suite Teardown Delete Http Session
5 Library OperatingSystem
9 Variables ../../../variables/Variables.py
10 Library RequestsLibrary
11 Library ../../../libraries/Common.py
12 Library ../../../libraries/ScaleClient.py
19 @{cntls} ${ODL_SYSTEM_IP}
20 ${start_cmd} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13
27 [Documentation] Configuration of 16k flows into config datastore
28 ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread}
30 ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5
32 Set Suite Variable ${flows}
35 [Documentation] Operational datastore check if all flows are present there
36 Wait Until Keyword Succeeds 110s 5s Check Flows Inventory ${flows} ${ODL_SYSTEM_IP}
39 [Documentation] Removal of 16k flows from config datastore
40 ${res}= Deconfigure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5
43 Check No Flows In Operational
44 [Documentation] Operational datastore to be without any flows
45 ${noflows}= Create List
46 Wait Until Keyword Succeeds 110s 5s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP}
49 [Documentation] Configuration of 16k flows into config datastore again
50 ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5
53 Are Flows Operational Again
54 [Documentation] Operational datastore check if all flows are present there
55 Wait Until Keyword Succeeds 110s 5s Check Flows Inventory ${flows} ${ODL_SYSTEM_IP}
58 [Documentation] Disconnect/Stop mininet
61 Check No Flows In Operational After Disconnect
62 [Documentation] With mininet stopped no switches in operational datastore sould be found
63 Wait Until Keyword Succeeds 110s 5s Check No Switches Inventory
66 [Documentation] Reconnection of the mininet
69 Check Flows Are Operational Again
70 [Documentation] All 16k switches should be present in the operational datastore after mininet reconnection
71 Wait Until Keyword Succeeds 110s 5s Check Flows Inventory ${flows} ${ODL_SYSTEM_IP}
74 [Documentation] Flows deconfiguration
75 ${res}= Deconfigure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5
78 Check No Flows In Operational Last
79 [Documentation] Operational datastore to be without any flows
80 ${noflows}= Create List
81 Wait Until Keyword Succeeds 110s 5s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP}
88 [Documentation] Starts mininet with requested number of switches (${swnr})
89 Log Starting mininet with ${swnr} switches
90 Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=600
91 Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
92 Execute Command sudo ovs-vsctl set-manager ptcp:6644
93 Execute Command sudo mn -c
96 Wait Until Keyword Succeeds 10s 1s Are Switches Connected Topo
99 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
102 [Documentation] Stops mininet
106 Read Until ${DEFAULT_LINUX_PROMPT}
112 Are Switches Connected Topo
113 [Documentation] Checks wheather switches are connected to controller
114 ${resp}= Get Request session ${OPERATIONAL_TOPO_API}/topology/flow:1 headers=${ACCEPT_XML}
116 ${count}= Get Element Count ${resp.content} xpath=node
117 Should Be Equal As Numbers ${count} ${swnr}
119 Check Flows Inventory
120 [Arguments] ${fldets} ${cntl}
121 ${res}= Flow Stats Collected flow_details=${fldets} controller=${cntl}
122 Should Be True ${res}
124 Check No Switches Inventory
125 ${resp}= Get Request session ${OPERATIONAL_NODES_API}
127 Should Be Equal As Strings '${resp.content}' '{"nodes":{}}'