2 Documentation Checking Network created in OpenStack are pushed to OpenDaylight
5 Library RequestsLibrary
6 Resource ../../../variables/Variables.robot
8 Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH}
9 Suite Teardown Delete All Sessions
13 ${OSREST} /v2.0/networks
14 ${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 request OSSession ${OSREST}
23 Should be Equal As Strings ${resp.status_code} 200
24 ${OSResult} To Json ${resp.text}
27 Check OpenDaylight Networks
28 [Documentation] Checking OpenDaylight Neutron API for known networks
29 [Tags] network neutron opendaylight
30 Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH}
31 ${resp} get request ODLSession ${NEUTRON_NETWORKS_API}
32 Should be Equal As Strings ${resp.status_code} 200
33 ${ODLResult} To Json ${resp.text}
37 [Documentation] Create new network in OpenStack
38 [Tags] create network openstack neutron
40 ${resp} post request OSSession ${OSREST} data=${postNet}
41 Should be Equal As Strings ${resp.status_code} 201
42 ${result} To JSON ${resp.text}
43 ${result} Get From Dictionary ${result} network
44 ${NETID} Get From Dictionary ${result} id
47 Set Global Variable ${NETID}
51 [Documentation] Check network created in OpenDaylight
52 [Tags] check network opendaylight
53 ${resp} get request ODLSession ${NEUTRON_NETWORKS_API}/${NetID}
54 Should be Equal As Strings ${resp.status_code} 200