2 Documentation Test suite for Ethernet,QoS, ARP and Action drop
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/f17.xml
18 @{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 dl_src=00:00:00:11:23:ae dec_mpls_ttl mpls mpls_label=567 mpls_tc=3
19 ... mpls_bos=1 # mpls_label=567,mpls_tc=3,mpls_bos=1
22 Add a flow - Output to physical port#
23 [Documentation] Push a flow through REST-API
25 ${body} OperatingSystem.Get File ${FILE}
26 Set Suite Variable ${body}
27 ${resp} Putxml session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} data=${body}
28 Should Be Equal As Strings ${resp.status_code} 200
30 Verify after adding flow config - Output to physical port#
31 [Documentation] Verify the flow
33 ${resp} get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML}
34 Should Be Equal As Strings ${resp.status_code} 200
35 compare xml ${body} ${resp.content}
37 Verify flows after adding flow config on OVS
38 [Documentation] Checking Flows on switch
41 write dpctl dump-flows -O OpenFlow13
42 ${body} OperatingSystem.Get File ${FILE}
45 : FOR ${flowElement} IN @{FLOWELMENTS}
46 \ should Contain ${switchouput} ${flowElement}
48 Remove a flow - Output to physical port#
49 [Documentation] Remove a flow
51 ${resp} Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW}
52 Should Be Equal As Strings ${resp.status_code} 200
54 Verify after deleting flow config - Output to physical port#
55 [Documentation] Verify the flow
57 ${resp} Get session ${REST_CON}/node/openflow:1/table/${TABLE}
58 Should Not Contain ${resp.content} ${FLOW}
60 Verify flows after deleting flow config on OVS
61 [Documentation] Checking Flows on switch
64 write dpctl dump-flows -O OpenFlow13
65 ${body} OperatingSystem.Get File ${FILE}
68 : FOR ${flowElement} IN @{FLOWELMENTS}
69 \ should Not Contain ${switchouput} ${flowElement}