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