2 Documentation Test suite for the arp handler bundle.
3 Suite Teardown Delete All Sessions
5 Library ../../libraries/RequestsLibrary.py
6 Library ../../libraries/Common.py
7 Variables ../../variables/Variables.py
10 ${name} test_userlink1
12 ${REST_CONTEXT} /controller/nb/v2/topology
16 [Documentation] Add a userlink, list to validate the result.
18 ${body} Create Dictionary name ${name} status Success srcNodeConnector
19 ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
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}/userLink/${name} data=${body}
23 Should Be Equal As Strings ${resp.status_code} 201 Response status code error
24 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
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 userlink, list to validate the result.
33 ${body} Create Dictionary name ${name} status Success srcNodeConnector
34 ... OF|1@OF|00:00:00:00:00:00:00:02 dstNodeConnector OF|1@OF|00:00:00:00:00:00:00:03
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}/userLink/${name}
38 Should Be Equal As Strings ${resp.status_code} 204 Response status code error
39 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/userLinks
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}