2 Documentation Test suite connecting ODL to Mininet
3 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
4 Suite Teardown Delete All Sessions
5 Test Teardown Collect OVSDB Debugs
8 Library OperatingSystem
11 Library RequestsLibrary
12 Library ../../../libraries/Common.py
13 Variables ../../../variables/Variables.py
14 Resource ../../../libraries/Utils.robot
15 Resource ../../../libraries/OVSDB.robot
20 ${FLOWS_TABLE_20} actions=goto_table:20
21 ${FLOW_CONTROLLER} actions=CONTROLLER:65535
22 ${FLOWS_TABLE_30} actions=goto_table:30
23 ${FLOWS_TABLE_40} actions=goto_table:40
24 ${FLOWS_TABLE_50} actions=goto_table:50
25 ${FLOWS_TABLE_60} actions=goto_table:60
26 ${FLOWS_TABLE_70} actions=goto_table:70
27 ${FLOWS_TABLE_80} actions=goto_table:80
28 ${FLOWS_TABLE_90} actions=goto_table:90
29 ${FLOWS_TABLE_100} actions=goto_table:100
30 ${FLOWS_TABLE_110} actions=goto_table:110
31 ${FLOW_DROP} actions=drop
32 ${PING_NOT_CONTAIN} Destination Host Unreachable
33 @{node_list} ovsdb://uuid/
36 Make the OVS instance to listen for connection
37 [Documentation] Connect OVS to ODL
39 Clean Up Ovs ${TOOLS_SYSTEM_IP}
40 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDB_PORT}
41 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
42 ${pingresult} Run Command On Remote System ${TOOLS_SYSTEM_IP} ping ${ODL_SYSTEM_IP} -c 4
43 Should Not Contain ${pingresult} ${PING_NOT_CONTAIN}
44 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list}
46 Get manager connection
47 [Documentation] This will verify if the OVS manager is connected
49 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
50 ${lines}= Get Lines Containing String ${output} is_connected
51 ${manager}= Get Line ${lines} 0
52 Should Contain ${manager} true
54 Get controller connection
55 [Documentation] This will verify if the OpenFlow controller is connected on all bridges
57 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
58 ${lines}= Get Lines Containing String ${output} is_connected
59 ${list}= Split String ${lines} \n
60 Remove From List ${list} 0
61 : FOR ${controller} IN @{list}
62 \ Should Contain ${controller} true
65 [Documentation] This request is verifying that the br-int bridge has been created
67 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
68 Should Contain ${output} Controller "tcp:${ODL_SYSTEM_IP}:${OF_PORT}"
69 Should Contain ${output} Bridge br-int
72 [Documentation] This will check the port br-int has been created
74 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
75 Should Contain ${output} Port br-int
78 [Documentation] This verify the interface br-int has been created
80 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl show
81 Should Contain ${output} Interface br-int
84 [Documentation] This request fetch the OF13 flow tables to verify the flows are correctly added
86 ${output} Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-ofctl -O Openflow13 dump-flows br-int
87 Should Contain ${output} ${FLOWS_TABLE_20}
88 Should Contain ${output} ${FLOW_CONTROLLER}
89 Should Contain ${output} ${FLOWS_TABLE_30}
90 Should Contain ${output} ${FLOWS_TABLE_40}
91 Should Contain ${output} ${FLOWS_TABLE_50}
92 Should Contain ${output} ${FLOWS_TABLE_60}
93 Should Contain ${output} ${FLOWS_TABLE_70}
94 Should Contain ${output} ${FLOWS_TABLE_80}
95 Should Contain ${output} ${FLOWS_TABLE_90}
96 Should Contain ${output} ${FLOWS_TABLE_100}
97 Should Contain ${output} ${FLOWS_TABLE_110}
98 Should Contain ${output} ${FLOW_DROP}