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
7 Library OperatingSystem
8 Library RequestsLibrary
9 Library ../../../libraries/Common.py
10 Variables ../../../variables/Variables.py
13 ${ODLREST} /controller/nb/v2/neutron/networks
14 ${OSREST} /v2.0/networks
15 ${postNet} {"network":{"name":"odl_network","admin_state_up":true}}
18 Check OpenStack Networks
19 [Documentation] Checking OpenStack Neutron for known networks
20 [Tags] Network 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 Networks
29 [Documentation] Checking OpenDaylight Neutron API for Known Networks
30 [Tags] Network 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 network in OpenStack
40 [Tags] Create Network OpenStack Neutron
42 ${resp} post OSSession ${OSREST} data=${postNet}
43 Should be Equal As Strings ${resp.status_code} 201
44 ${result} To JSON ${resp.content}
45 ${result} Get From Dictionary ${result} network
46 ${NETID} Get From Dictionary ${result} id
49 Set Global Variable ${NETID}
53 [Documentation] Check Network created in OpenDaylight
54 [Tags] Check Network OpenDaylight
55 ${resp} get ODLSession ${ODLREST}/${NetID}
56 Should be Equal As Strings ${resp.status_code} 200