2 Documentation Checking Port created in OpenStack are pushed to OpenDaylight
3 Suite Setup Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH}
4 Suite Teardown Delete All Sessions
7 Library OperatingSystem
8 Library RequestsLibrary
9 Library ../../../libraries/Common.py
10 Variables ../../../variables/Variables.py
13 ${ODLREST} /controller/nb/v2/neutron/ports
15 ${data} {"port":{"network_id":"${NETID}","admin_state_up": true}}
19 [Documentation] Checking OpenStack Neutron for known ports
20 [Tags] Ports Neutron OpenStack
22 ${resp} get OSSession ${OSREST}
23 Should be Equal As Strings ${resp.status_code} 200
24 ${OSResult} To Json ${resp.content}
25 Set Suite Variable ${OSResult}
28 Check OpenDaylight ports
29 [Documentation] Checking OpenDaylight Neutron API for Known Ports
30 [Tags] Ports Neutron OpenDaylight
31 Create Session ODLSession http://${CONTROLLER}:${PORT} headers=${HEADERS} auth=${AUTH}
32 ${resp} get ODLSession ${ODLREST}
33 Should be Equal As Strings ${resp.status_code} 200
34 ${ODLResult} To Json ${resp.content}
35 Set Suite Variable ${ODLResult}
39 [Documentation] Create new port in OpenStack
40 [Tags] Create port OpenStack Neutron
42 ${resp} post OSSession ${OSREST} data=${data}
43 Should be Equal As Strings ${resp.status_code} 201
44 ${result} To JSON ${resp.content}
45 ${result} Get From Dictionary ${result} port
46 ${PORTID} Get From Dictionary ${result} id
49 Set Global Variable ${PORTID}
53 [Documentation] Check new subnet created in OpenDaylight
54 [Tags] Check subnet OpenDaylight
55 ${resp} get ODLSession ${ODLREST}/${PORTID}
56 Should be Equal As Strings ${resp.status_code} 200