2 Documentation Checking Subnets deleted in OpenStack are deleted also in OpenDaylight
3 Suite Setup Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH}
4 Suite Teardown Delete All Sessions
7 Library OperatingSystem
8 Library ../../../libraries/RequestsLibrary.py
9 Library ../../../libraries/Common.py
10 Variables ../../../variables/Variables.py
13 ${ODLREST} /controller/nb/v2/neutron/subnets
14 ${OSREST} /v2.0/subnets/${SUBNETID}
15 ${data} {"subnet":{"network_id":"${NETID}","ip_version":4,"cidr":"172.16.64.0/24","allocation_pools":[{"start":"172.16.64.20","end":"172.16.64.120"}]}}
19 [Documentation] Delete previously created subnet in OpenStack
20 [Tags] Delete Subnet OpenStack Neutron
22 ${resp} delete OSSession ${OSREST}
23 Should be Equal As Strings ${resp.status_code} 204
27 Check New subnet deleted
28 [Documentation] Check subnet deleted in OpenDaylight
29 [Tags] Check subnet deleted OpenDaylight
30 Create Session ODLSession http://${CONTROLLER}:${PORT} headers=${HEADERS} auth=${AUTH}
31 ${resp} get ODLSession ${ODLREST}
32 Should be Equal As Strings ${resp.status_code} 200
33 ${ODLResult} To Json ${resp.content}
34 Set Suite Variable ${ODLResult}
36 ${resp} get ODLSession ${ODLREST}/${SUBNETID}
37 Should be Equal As Strings ${resp.status_code} 404