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=${node}
22 ... priority=1 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
23 ${headers} Create Dictionary Content-Type application/json
24 Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
25 ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
26 Should Be Equal As Strings ${resp.status_code} 201 Response status code error
27 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
28 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
29 ${result} To JSON ${resp.content}
30 ${content} Get From Dictionary ${result} ${key}
31 List Should Contain Value ${content} ${body}
34 [Documentation] Remove a flow, list to validate the result.
36 ${node} Create Dictionary type=OF id=${node_id}
37 ${actions} Create List OUTPUT=1
38 ${body} Create Dictionary name=${name} installInHw=true node=${node}
39 ... priority=1 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
40 ${headers} Create Dictionary Content-Type=application/json
41 Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
42 ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name}
43 Should Be Equal As Strings ${resp.status_code} 204 Response status code error
44 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
45 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
46 ${result} To JSON ${resp.content}
47 ${content} Get From Dictionary ${result} ${key}
48 List Should Not Contain Value ${content} ${body}