2 Documentation Checking Port 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
14 ${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 request OSSession ${OSREST}
23 Should be Equal As Strings ${resp.status_code} 200
24 ${OSResult} To Json ${resp.text}
27 Check OpenDaylight ports
28 [Documentation] Checking OpenDaylight Neutron API for known ports
29 [Tags] ports neutron opendaylight
30 Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH}
31 ${resp} get request ODLSession ${NEUTRON_PORTS_API}
32 Should be Equal As Strings ${resp.status_code} 200
33 ${ODLResult} To Json ${resp.text}
37 [Documentation] Create new port in OpenStack
38 [Tags] create port openstack neutron
40 ${resp} post request OSSession ${OSREST} data=${data}
41 Should be Equal As Strings ${resp.status_code} 201
42 ${result} To JSON ${resp.text}
43 ${result} Get From Dictionary ${result} port
44 ${PORTID} Get From Dictionary ${result} id
47 Set Global Variable ${PORTID}
51 [Documentation] Check new port created in OpenDaylight
52 [Tags] check port opendaylight
53 ${resp} get request ODLSession ${NEUTRON_PORTS_API}/${PORTID}
54 Should be Equal As Strings ${resp.status_code} 200