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