X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tools%2FRobot_Tool%2Fsuites%2Fbase%2Fforwarding_manager.txt;fp=tools%2FRobot_Tool%2Fsuites%2Fbase%2Fforwarding_manager.txt;h=4ec35fb522aa40ce8c011ae1c9b84935212c74b6;hb=59e81c38620fa1b61e15771191e35771450b9499;hp=0000000000000000000000000000000000000000;hpb=072f6e3a8d1bdf8f4c663843589c22d93ba07791;p=integration%2Ftest.git diff --git a/tools/Robot_Tool/suites/base/forwarding_manager.txt b/tools/Robot_Tool/suites/base/forwarding_manager.txt new file mode 100644 index 0000000000..4ec35fb522 --- /dev/null +++ b/tools/Robot_Tool/suites/base/forwarding_manager.txt @@ -0,0 +1,43 @@ +*** Settings *** +Documentation Test suite for the forwarding manager module. +Suite Teardown Delete All Sessions +Library Collections +Library RequestsLibrary +Library ../../libraries/Common.py +Variables ../../variables/Variables.py + +*** Variables *** +${name} test_route1 +${key} staticRoute +${REST_CONTEXT} /controller/nb/v2/staticroute + +*** Test Cases *** +Add a static route + [Documentation] Add a static route, list to validate the result. + [Tags] add + ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop + ... 10.0.0.2 + ${headers} Create Dictionary Content-Type application/json + Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth} + ${resp} Put session ${REST_CONTEXT}/${CONTAINER}/route/${name} data=${body} + Should Be Equal As Strings ${resp.status_code} 201 Response status code error + ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes + Should Be Equal As Strings ${resp.status_code} 200 Response status code error + ${result} To JSON ${resp.content} + ${content} Get From Dictionary ${result} ${key} + List Should Contain Value ${content} ${body} + +Remove a subnet + [Documentation] Remove a subnet, list to validate the result. + [Tags] remove + ${body} Create Dictionary name ${name} prefix 192.168.1.0/24 nextHop + ... 10.0.0.2 + ${headers} Create Dictionary Content-Type application/json + Create Session session http://${CONTROLLER}:8080 headers=${headers} auth=${auth} + ${resp} Delete session ${REST_CONTEXT}/${CONTAINER}/route/${name} + Should Be Equal As Strings ${resp.status_code} 204 Response status code error + ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/routes + Should Be Equal As Strings ${resp.status_code} 200 Response status code error + ${result} To JSON ${resp.content} + ${content} Get From Dictionary ${result} ${key} + List Should Not Contain Value ${content} ${body}