2 Documentation Test suite for Connection Manager
3 Suite Setup Vxlan Extension Test Suite Setup
4 Suite Teardown Vxlan Extension Test Suite Teardown
5 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
7 Library OperatingSystem
11 Library RequestsLibrary
12 Library ../../../libraries/Common.py
13 Variables ../../../variables/Variables.py
14 Resource ../../../libraries/SetupUtils.robot
15 Resource ../../../libraries/Utils.robot
16 Resource ../../../libraries/MininetKeywords.robot
17 Resource ../../../libraries/OVSDB.robot
21 ${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
22 @{node_list1} ovsdb://${TOOLS_SYSTEM_2_IP}:${OVSDB_PORT} ${TOOLS_SYSTEM_2_IP} ${OVSDB_PORT} ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT} ${TOOLS_SYSTEM_IP} ${OVSDB_PORT}
23 ${start1} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,1
24 ${start2} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,2
27 Make the OVS instance to listen for connection
28 Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-vsctl del-manager
29 Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
30 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
31 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
33 Connect controller to OVSDB Node1
34 [Documentation] Initiate the connection to OVSDB node from controller
35 Connect To Ovsdb Node ${TOOLS_SYSTEM_2_IP}
37 Connect controller to OVSDB Node2
38 [Documentation] Initiate the connection to OVSDB node from controller
39 Connect To Ovsdb Node ${TOOLS_SYSTEM_IP}
41 Get Operational Topology from OVSDB Node1 and OVSDB Node2
42 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
43 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list1}
45 Start the Mininet and create custom topology
46 [Documentation] This will start mininet with custom topology on both the Virtual Machines
47 ${conn_id1} MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_2_IP} ${ODL_SYSTEM_IP} ${start1} ${OVSDB_CONFIG_DIR}/ovsdb.py
48 Set Global Variable ${conn_id1}
49 ${conn_id2} MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_IP} ${start2} ${OVSDB_CONFIG_DIR}/ovsdb.py
50 Set Global Variable ${conn_id2}
52 Get Operational Topology with custom topology
53 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to make sure the mininet created custom topology
54 @{list} Create List s1 s2
55 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
57 Add the bridge s1 in the config datastore of OVSDB Node1
58 [Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
59 Add Bridge To Ovsdb Node ${TOOLS_SYSTEM_2_IP} s1 0000000000000001
61 Add the bridge s2 in the config datastore of OVSDB Node2
62 [Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
63 Add Bridge To Ovsdb Node ${TOOLS_SYSTEM_IP} s2 0000000000000002
65 Get Config Topology with s1 and s2 Bridges
66 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the config data store
67 @{list} Create List s1 s2
68 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${CONFIG_TOPO_API} ${list}
70 Create Vxlan Port and attach to s1 Bridge
71 [Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s1 of OVSDB node 1
72 Add Vxlan To Bridge ${TOOLS_SYSTEM_IP} s2 vxlanport ${TOOLS_SYSTEM_2_IP}
74 Create Vxlan Port and attach to s2 Bridge
75 [Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s2 of OVSDB node 2
76 Add Vxlan To Bridge ${TOOLS_SYSTEM_2_IP} s1 vxlanport ${TOOLS_SYSTEM_IP}
78 Get Operational Topology with vxlan tunnel
79 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify that the vxlan tunnel is created
80 @{list} Create List vxlanport ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
81 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
83 Delete Bridges from config datastore
84 [Documentation] This request will delete the bridges from config data store.
86 Delete Bridge From Ovsdb Node ${TOOLS_SYSTEM_IP} s2
87 Delete Bridge From Ovsdb Node ${TOOLS_SYSTEM_2_IP} s1
89 Disconnect controller connection from the connected OVSDBs nodes
90 [Documentation] This request will disconnect the controller from the connected OVSDB node for clean startup for next suite.
92 Disconnect From Ovsdb Node ${TOOLS_SYSTEM_IP}
93 Disconnect From Ovsdb Node ${TOOLS_SYSTEM_2_IP}
95 Verify that the operational topology is clean
96 [Documentation] This request will verify the operational toplogy after the mininet is cleaned.
98 @{list} Create List ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} s1 s2
99 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
102 [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
104 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
105 [Teardown] Report_Failure_Due_To_Bug 4756
108 [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
110 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
111 [Teardown] Report_Failure_Due_To_Bug 4794
114 Vxlan Extension Test Suite Setup
115 [Documentation] Initialize SetupUtils, create session.
116 SetupUtils.Setup_Utils_For_Setup_And_Teardown
117 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
119 Vxlan Extension Test Suite Teardown
120 [Documentation] Cleans up test environment, close existing sessions.
121 Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
122 Clean OVSDB Test Environment ${TOOLS_SYSTEM_2_IP}
123 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}