2 Documentation Test suite for the forwarding manager module.
3 Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
4 Suite Teardown Delete All Sessions
7 Library ../../libraries/RequestsLibrary.py
8 Library ../../libraries/Common.py
9 Variables ../../variables/Variables.py
14 ${REST_CONTEXT} /controller/nb/v2/staticroute
15 ${REST_CONTEXT_HT} /controller/nb/v2/hosttracker
19 [Documentation] Add a static route, list to validate the result.
21 ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
23 ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body}
24 Should Be Equal As Strings ${resp.status_code} 201
25 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
26 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
27 ${result} To JSON ${resp.content}
28 ${content} Get From Dictionary ${result} ${key}
29 List Should Contain Value ${content} ${body}
32 [Documentation] Remove a static route, list to validate the result.
34 ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop
36 ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name}
37 Should Be Equal As Strings ${resp.status_code} 204
38 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes
39 Should Be Equal As Strings ${resp.status_code} 200
40 ${result} To JSON ${resp.content}
41 ${content} Get From Dictionary ${result} ${key}
42 List Should Not Contain Value ${content} ${body}