2 Documentation Test suite for the forwarding manager module.
3 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Library ../../libraries/Common.py
7 Variables ../../variables/Variables.py
12 ${REST_CONTEXT} /controller/nb/v2/staticroute
16 [Documentation] Add a static route, list to validate the result.
18 ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
20 ${headers} Create Dictionary Content-Type application/json
21 Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
22 ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
23 Should Be Equal As Strings ${resp.status_code} 201 Response status code error
24 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
25 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
26 ${result} To JSON ${resp.content}
27 ${content} Get From Dictionary ${result} ${key}
28 List Should Contain Value ${content} ${body}
31 [Documentation] Remove a subnet, list to validate the result.
33 ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
35 ${headers} Create Dictionary Content-Type application/json
36 Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth}
37 ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
38 Should Be Equal As Strings ${resp.status_code} 204 Response status code error
39 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
40 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
41 ${result} To JSON ${resp.content}
42 ${content} Get From Dictionary ${result} ${key}
43 List Should Not Contain Value ${content} ${body}