*** Settings *** Documentation Test suite for IP,Ethernet,QoS, SCTP dst/src port and Action dec TTL Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown Delete All Sessions Library SSHLibrary Library Collections Library OperatingSystem Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py *** Variables *** ${REST_CON} /restconf/config/opendaylight-inventory:nodes ${FILE} ${CURDIR}/../../../variables/xmls/f11.xml ${FLOW} 134 ${TABLE} 2 @{FLOWELMENTS} dl_dst=ff:ff:29:01:19:61 table=2 nw_ecn=3 dl_src=00:00:00:11:23:ae nw_src=17.0.0.0 nw_dst=172.168.0.0 dec_ttl ... icmp nw_tos=108 in_port=0 icmp_type=6 icmp_code=3 *** Test Cases *** Add a flow - Output to physical port# [Documentation] Push a flow through REST-API [Tags] Push ${body} OperatingSystem.Get File ${FILE} Set Suite Variable ${body} ${resp} RequestsLibrary.Put session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${HEADERS_XML} data=${body} Should Be Equal As Strings ${resp.status_code} 200 Verify after adding flow config - Output to physical port# [Documentation] Verify the flow [Tags] Get ${resp} RequestsLibrary.Get session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} headers=${ACCEPT_XML} Should Be Equal As Strings ${resp.status_code} 200 compare xml ${body} ${resp.content} Verify flows after adding flow config on OVS [Documentation] Checking Flows on switch [Tags] Switch sleep 1 write dpctl dump-flows -O OpenFlow13 ${body} OperatingSystem.Get File ${FILE} ${switchoutput} Read Until > : FOR ${flowElement} IN @{FLOWELMENTS} \ should Contain ${switchoutput} ${flowElement} Remove a flow - Output to physical port# [Documentation] Remove a flow [Tags] remove ${resp} RequestsLibrary.Delete session ${REST_CON}/node/openflow:1/table/${TABLE}/flow/${FLOW} Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting flow config - Output to physical port# [Documentation] Verify the flow [Tags] Get ${resp} RequestsLibrary.Get session ${REST_CON}/node/openflow:1/table/${TABLE} Should Not Contain ${resp.content} ${FLOW} Verify flows after deleting flow config on OVS [Documentation] Checking Flows on switch [Tags] Switch Sleep 1 write dpctl dump-flows -O OpenFlow13 ${body} OperatingSystem.Get File ${FILE} ${switchoutput} Read Until > : FOR ${flowElement} IN @{FLOWELMENTS} \ should Not Contain ${switchoutput} ${flowElement}