2 Documentation Checking Network created in OpenStack are pushed to OpenDaylight
3 Suite Setup Create Session OSSession http://${OPENSTACK}:9696 headers=${X-AUTH}
4 Suite Teardown Delete All Sessions
6 Library RequestsLibrary
7 Variables ../../../variables/Variables.py
10 ${ODLREST} /controller/nb/v2/neutron/networks
11 ${OSREST} /v2.0/networks
12 ${postNet} {"network":{"name":"odl_network","admin_state_up":true}}
15 Check OpenStack Networks
16 [Documentation] Checking OpenStack Neutron for known networks
17 [Tags] Network Neutron OpenStack
19 ${resp} get request OSSession ${OSREST}
20 Should be Equal As Strings ${resp.status_code} 200
21 ${OSResult} To Json ${resp.content}
24 Check OpenDaylight Networks
25 [Documentation] Checking OpenDaylight Neutron API for known networks
26 [Tags] Network Neutron OpenDaylight
27 Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH}
28 ${resp} get request ODLSession ${ODLREST}
29 Should be Equal As Strings ${resp.status_code} 200
30 ${ODLResult} To Json ${resp.content}
34 [Documentation] Create new network in OpenStack
35 [Tags] Create Network OpenStack Neutron
37 ${resp} post request OSSession ${OSREST} data=${postNet}
38 Should be Equal As Strings ${resp.status_code} 201
39 ${result} To JSON ${resp.content}
40 ${result} Get From Dictionary ${result} network
41 ${NETID} Get From Dictionary ${result} id
44 Set Global Variable ${NETID}
48 [Documentation] Check network created in OpenDaylight
49 [Tags] Check Network OpenDaylight
50 ${resp} get request ODLSession ${ODLREST}/${NetID}
51 Should be Equal As Strings ${resp.status_code} 200