fb619825bf13272ac78f49cbd7e0767c2a63c6e3
[functest.git] / testcases / Controllers / ODL / CI / custom_tests / neutron / 050__delete_subnets.txt
1 *** Settings ***
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
5 Library           SSHLibrary
6 Library           Collections
7 Library           OperatingSystem
8 Library           ../../../libraries/RequestsLibrary.py
9 Library           ../../../libraries/Common.py
10 Variables         ../../../variables/Variables.py
11
12 *** Variables ***
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"}]}}
16
17 *** Test Cases ***
18 Delete New subnet
19         [Documentation]    Delete previously created subnet in OpenStack
20         [Tags]             Delete Subnet OpenStack Neutron
21         Log     ${data}
22         ${resp}         delete  OSSession       ${OSREST}
23         Should be Equal As Strings      ${resp.status_code}     204
24         Log     ${resp.content}
25         sleep    2
26
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}
35         Log     ${ODLResult}
36         ${resp}         get     ODLSession      ${ODLREST}/${SUBNETID}
37         Should be Equal As Strings      ${resp.status_code}     404