ec9d8c4b572865f913e79a20f1866559a9616572
[functest.git] / testcases / Controllers / ODL / CI / custom_tests / neutron / 040__delete_ports.txt
1 *** Settings ***
2 Documentation     Checking Port 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           ../integration/test/csit/libraries/RequestsLibrary.py
9 Library           ../integration/test/csit/libraries/Common.py
10 Variables         ../integration/test/csit/variables/Variables.py
11
12 *** Variables ***
13 ${ODLREST}       /controller/nb/v2/neutron/ports
14 ${OSREST}        /v2.0/ports/${PORTID}
15 ${data}       {"port":{"network_id":"${NETID}","admin_state_up": true}}
16
17 *** Test Cases ***
18 Delete New Port
19         [Documentation]    Delete previously created port in OpenStack
20         [Tags]             Delete port 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 Port Deleted
28         [Documentation]   Check port deleted in OpenDaylight
29         [Tags]          Check port 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}/${PORTID}
37         Should be Equal As Strings      ${resp.status_code}     404