2 Documentation Test suite for Tunnel ID
3 Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
4 Suite Teardown Delete All Sessions
7 Library OperatingSystem
8 Library ../../../libraries/RequestsLibrary.py
9 Library ../../../libraries/Common.py
10 Variables ../../../variables/Variables.py
13 ${REST_CON} /restconf/config/opendaylight-inventory:nodes
14 ${REST_OPR} /restconf/operational/opendaylight-inventory:nodes
15 ${FILE} ${CURDIR}/../../../variables/xmls/f24.xml
18 @{FLOWELMENTS} tun_id=0xa1f TABLE
21 Add a flow - Output to physical port#
22 [Documentation] Push a flow through REST-API
24 ${body} OperatingSystem.Get File ${FILE}
25 Set Suite Variable ${body}
26 ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
27 Should Be Equal As Strings ${resp.status_code} 200
29 Verify after adding flow config - Output to physical port#
30 [Documentation] Verify the flow
32 ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
33 Should Be Equal As Strings ${resp.status_code} 200
34 compare xml ${body} ${resp.content}
36 Verify flows after adding flow config on OVS
37 [Documentation] Checking Flows on switch
40 write dpctl dump-flows -O OpenFlow13
41 ${body} OperatingSystem.Get File ${FILE}
44 : FOR ${flowElement} IN @{FLOWELMENTS}
45 \ should Contain ${switchouput} ${flowElement}
47 Remove a flow - Output to physical port#
48 [Documentation] Remove a flow
50 ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
51 Should Be Equal As Strings ${resp.status_code} 200
53 Verify after deleting flow config - Output to physical port#
54 [Documentation] Verify the flow
56 ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
57 Should Not Contain ${resp.content} ${FLOW}
59 Verify flows after deleting flow config on OVS
60 [Documentation] Checking Flows on switch
63 write dpctl dump-flows -O OpenFlow13
64 ${body} OperatingSystem.Get File ${FILE}
67 : FOR ${flowElement} IN @{FLOWELMENTS}
68 \ should Not Contain ${switchouput} ${flowElement}