Fix relative path issue in custom test
[functest.git] / testcases / Controllers / ODL / CI / custom_tests / neutron / 060__delete_networks.txt
1 *** Settings ***
2 Documentation     Checking Network deleted in OpenStack are deleted also in OpenDaylight
3 Suite Setup       Create Session    OSSession     http://${OPENSTACK}: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/networks
14 ${OSREST}        /v2.0/networks/${NETID}
15 ${postNet}      {"network":{"name":"odl_network","admin_state_up":true}}
16
17 *** Test Cases ***
18 Delete Network
19         [Documentation]    Delete network in OpenStack
20         [Tags]             Delete Network OpenStack Neutron
21         Log     ${postNet}
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 Network deleted
28         [Documentation]   Check Network deleted in OpenDaylight
29         [Tags]          Check  Network 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}/${NetID}
37         Should be Equal As Strings      ${resp.status_code}     204