2 Documentation Checking Port created in OpenStack are pushed to OpenDaylight
3 Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH}
4 Suite Teardown Delete All Sessions
6 Library RequestsLibrary
7 Resource ../../../variables/Variables.robot
11 ${data} {"port":{"network_id":"${NETID}","admin_state_up": true}}
15 [Documentation] Checking OpenStack Neutron for known ports
16 [Tags] Ports Neutron OpenStack
18 ${resp} get request OSSession ${OSREST}
19 Should be Equal As Strings ${resp.status_code} 200
20 ${OSResult} To Json ${resp.text}
23 Check OpenDaylight ports
24 [Documentation] Checking OpenDaylight Neutron API for known ports
25 [Tags] Ports Neutron OpenDaylight
26 Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH}
27 ${resp} get request ODLSession ${NEUTRON_PORTS_API}
28 Should be Equal As Strings ${resp.status_code} 200
29 ${ODLResult} To Json ${resp.text}
33 [Documentation] Create new port in OpenStack
34 [Tags] Create port OpenStack Neutron
36 ${resp} post request OSSession ${OSREST} data=${data}
37 Should be Equal As Strings ${resp.status_code} 201
38 ${result} To JSON ${resp.text}
39 ${result} Get From Dictionary ${result} port
40 ${PORTID} Get From Dictionary ${result} id
43 Set Global Variable ${PORTID}
47 [Documentation] Check new port created in OpenDaylight
48 [Tags] Check port OpenDaylight
49 ${resp} get request ODLSession ${NEUTRON_PORTS_API}/${PORTID}
50 Should be Equal As Strings ${resp.status_code} 200