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