2 Documentation Test suite for RESTCONF FRM
5 Library RequestsLibrary
6 Library ../../../libraries/Common.py
7 Variables ../../../variables/Variables.py
8 Resource ../../../libraries/Utils.robot
9 Resource ../../../variables/openflowplugin/Variables.robot
11 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
12 Suite Teardown Delete All Sessions
17 ... <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
21 Add a flow - Output to physical port#
22 [Documentation] Push a flow through REST-API
23 ${resp} RequestsLibrary.PUT On Session
25 ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152
26 ... headers=${HEADERS_XML}
29 Verify after adding flow config - Output to physical port#
30 [Documentation] Verify the flow
31 ${resp} RequestsLibrary.GET On Session
33 ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config
34 ... expected_status=200
35 Should Contain ${resp.text} 152
37 Verify after adding flow operational - Output to physical port#
38 [Documentation] Verify the flow
39 ${elements} Create List 10.0.20.1
40 Wait Until Keyword Succeeds
43 ... Check For Elements At URI
44 ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152?content=nonconfig
47 Remove a flow - Output to physical port#
48 [Documentation] Remove a flow
49 ${resp} RequestsLibrary.DELETE On Session
51 ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152
52 ... expected_status=204
54 Verify after deleting flow config - Output to physical port#
55 [Documentation] Verify the flow
56 ${resp} RequestsLibrary.GET On Session
58 ... url=${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config
59 ... expected_status=200
60 Should Not Contain ${resp.text} 152
61 # Standing bug #368 - This has been fixed
63 Verify after deleting flow operational - Output to physical port#
64 [Documentation] Verify the flow
65 ${elements} Create List 10.0.20.1
66 Wait Until Keyword Succeeds
69 ... Check For Elements Not At URI
70 ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=nonconfig