2 Documentation Test suite with independent flow tests
3 Suite Setup Initialization Phase
4 Suite Teardown Final Phase
8 Library RequestsLibrary
10 Resource ../../../libraries/Utils.robot
11 Resource ../../../libraries/FlowLib.robot
12 Resource ../../../variables/openflowplugin/Variables.robot
13 Variables ../../../variables/Variables.py
14 Library ../../../libraries/XmlComparator.py
17 ${XmlsDir} ${CURDIR}/../../../../csit/variables/xmls
20 ${switch_name} s${switch_idx}
23 Update With Delete And Add
24 [Documentation] Updates a flow by changing priority which causes delete and add flow reaction
25 Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
26 Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
27 Check Config Flow ${True} ${data}
29 Wait Until Keyword Succeeds 30s 1s Check Operational Flow ${True} ${data}
30 ${upddata}= Replace String ${data} <priority>2</priority> <priority>3</priority>
31 Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${upddata}
32 Check Config Flow ${True} ${upddata}
34 Wait Until Keyword Succeeds 30s 1s Check Operational Flow ${True} ${upddata}
35 [Teardown] Delete Flow
39 [Documentation] Logs the switch content
40 Write dpctl dump-flows -O OpenFlow13
41 ${switchouput}= Read Until mininet>
45 [Documentation] Starts mininet and verify if topology is in operational ds
47 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
48 Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1
51 [Documentation] Stops mininet
56 [Documentation] Removes used flow
57 ${resp}= RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}
59 ${msg}= Set Variable Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received.
60 Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}