2 Documentation Test suite for the forwarding rule manager module.
3 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Library ../../libraries/Common.py
7 Variables ../../variables/Variables.py
12 ${node_id} 00:00:00:00:00:00:00:02
13 ${REST_CONTEXT} /controller/nb/v2/flowprogrammer
17 [Documentation] Add a flow, list to validate the result.
19 ${node} Create Dictionary type OF id ${node_id}
20 ${actions} Create List OUTPUT=1
21 ${body} Create Dictionary name ${name} installInHw true node
22 ... ${node} priority 1 etherType 0x800 nwDst
23 ... 10.0.0.1/32 actions ${actions}
24 ${headers} Create Dictionary Content-Type application/json
25 Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
26 ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
27 Should Be Equal As Strings ${resp.status_code} 201 Response status code error
28 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
29 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
30 ${result} To JSON ${resp.content}
31 ${content} Get From Dictionary ${result} ${key}
32 List Should Contain Value ${content} ${body}
35 [Documentation] Remove a flow, list to validate the result.
37 ${node} Create Dictionary type OF id ${node_id}
38 ${actions} Create List OUTPUT=1
39 ${body} Create Dictionary name ${name} installInHw true node
40 ... ${node} priority 1 etherType 0x800 nwDst
41 ... 10.0.0.1/32 actions ${actions}
42 ${headers} Create Dictionary Content-Type application/json
43 Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
44 ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
45 Should Be Equal As Strings ${resp.status_code} 204 Response status code error
46 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
47 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
48 ${result} To JSON ${resp.content}
49 ${content} Get From Dictionary ${result} ${key}
50 List Should Not Contain Value ${content} ${body}