X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=test%2Fcsit%2Fsuites%2Fopenflowplugin%2FAD_SAL_NSF_OF13%2F020__topology_manager.robot;fp=test%2Fcsit%2Fsuites%2Fopenflowplugin%2FAD_SAL_NSF_OF13%2F020__topology_manager.robot;h=3fb8747dc63bb4dee0c4d39ad8e922597a8be855;hb=8e0ab6442b34b051b8626b5274b8d52eec0fd8ba;hp=3deeaeeb9c895ce192cb4590e0a38ba7d1b2c4f6;hpb=ec154c22cfcb10e50b74a79554ce57ec7a0686a0;p=integration%2Ftest.git diff --git a/test/csit/suites/openflowplugin/AD_SAL_NSF_OF13/020__topology_manager.robot b/test/csit/suites/openflowplugin/AD_SAL_NSF_OF13/020__topology_manager.robot index 3deeaeeb9c..3fb8747dc6 100644 --- a/test/csit/suites/openflowplugin/AD_SAL_NSF_OF13/020__topology_manager.robot +++ b/test/csit/suites/openflowplugin/AD_SAL_NSF_OF13/020__topology_manager.robot @@ -3,7 +3,7 @@ Documentation Test suite for Topology Manager Suite Setup Create Session session http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS} Suite Teardown Delete All Sessions Library Collections -Library ../../../libraries/RequestsLibrary.py +Library RequestsLibrary Library ../../../libraries/Common.py Variables ../../../variables/Variables.py Resource ../../../libraries/Utils.robot @@ -13,7 +13,6 @@ ${node1} "00:00:00:00:00:00:00:01" ${node2} "00:00:00:00:00:00:00:02" ${node3} "00:00:00:00:00:00:00:03" ${name} test_userlink1 -${key} userLinks ${REST_CONTEXT} /controller/nb/v2/topology *** Test Cases *** @@ -27,25 +26,24 @@ Get Topology Add a userlink [Documentation] Add a userlink, list to validate the result. [Tags] adsal - ${body} Create Dictionary name=${name} status=Success srcNodeConnector=OF|1@OF|00:00:00:00:00:00:00:02 - ... dstNodeConnector=OF|1@OF|00:00:00:00:00:00:00:03 + ${body} Set Variable {"name":"${name}", "status":"Success", "srcNodeConnector":"OF|1@OF|00:00:00:00:00:00:00:02", "dstNodeConnector":"OF|1@OF|00:00:00:00:00:00:00:03"} + ${expected_content} To JSON ${body} ${resp} RequestsLibrary.Put session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} data=${body} Should Be Equal As Strings ${resp.status_code} 201 ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/userLinks Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} - ${content} Get From Dictionary ${result} ${key} - List Should Contain Value ${content} ${body} + ${resp_content} Get From Dictionary ${result} userLinks + List Should Contain Value ${resp_content} ${expected_content} Remove a userlink [Documentation] Remove a userlink, list to validate the result. [Tags] adsal - ${body} Create Dictionary name=${name} status=Success srcNodeConnector=OF|1@OF|00:00:00:00:00:00:00:02 - ... dstNodeConnector=OF|1@OF|00:00:00:00:00:00:00:03 + ${expected_content} Create Dictionary name=${name} status=Success srcNodeConnector=OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector=OF|1@OF|00:00:00:00:00:00:00:03 ${resp} RequestsLibrary.Delete session ${REST_CONTEXT}/${CONTAINER}/userLink/${name} Should Be Equal As Strings ${resp.status_code} 204 ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/userLinks Should Be Equal As Strings ${resp.status_code} 200 ${result} To JSON ${resp.content} - ${content} Get From Dictionary ${result} ${key} - List Should Not Contain Value ${content} ${body} + ${resp_content} Get From Dictionary ${result} userLinks + List Should Not Contain Value ${resp_content} ${expected_content}