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