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 Variables ../../../variables/Variables.py
13 Library ../../../libraries/XmlComparator.py
16 ${XmlsDir} ${CURDIR}/../../../../csit/variables/xmls
19 ${switch_name} s${switch_idx}
22 Update With Delete And Add
23 [Documentation] Updates a flow by changing priority which causes delete and add flow reaction
24 Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
25 Add Flow Via Restconf ${switch_idx} ${table_id} ${data}
26 Check Config Flow ${True} ${data}
28 Wait Until Keyword Succeeds 30s 1s Check Operational Flow ${True} ${data}
29 ${upddata}= Replace String ${data} <priority>2</priority> <priority>3</priority>
30 Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${upddata}
31 Check Config Flow ${True} ${upddata}
33 Wait Until Keyword Succeeds 30s 1s Check Operational Flow ${True} ${upddata}
34 [Teardown] Delete Flow
38 [Documentation] Logs the switch content
39 Write dpctl dump-flows -O OpenFlow13
40 ${switchouput}= Read Until mininet>
44 [Documentation] Starts mininet and verify if topology is in operational ds
46 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
47 Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1
50 [Documentation] Stops mininet
55 [Documentation] Removes used flow
56 ${resp}= RequestsLibrary.Delete Request session ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
58 ${msg}= Set Variable Delete flow for ${CONFIG_NODES_API}/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
59 Should Be Equal As Strings ${resp.status_code} 200 msg=${msg}