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/OVSDB.robot
19 ${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
20 @{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}
21 ${start1} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,1
22 ${start2} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,2
25 Make the OVS instance to listen for connection
26 Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-vsctl del-manager
27 Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
28 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
29 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
31 Connect controller to OVSDB Node1
32 [Documentation] Initiate the connection to OVSDB node from controller
33 Connect To Ovsdb Node ${TOOLS_SYSTEM_2_IP}
35 Connect controller to OVSDB Node2
36 [Documentation] Initiate the connection to OVSDB node from controller
37 Connect To Ovsdb Node ${TOOLS_SYSTEM_IP}
39 Get Operational Topology from OVSDB Node1 and OVSDB Node2
40 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
41 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list1}
43 Start the Mininet and create custom topology
44 [Documentation] This will start mininet with custom topology on both the Virtual Machines
45 ${conn_id1} Start Mininet ${TOOLS_SYSTEM_2_IP} ${start1} ${OVSDB_CONFIG_DIR}/ovsdb.py
46 Set Global Variable ${conn_id1}
47 ${conn_id2} Start Mininet ${TOOLS_SYSTEM_IP} ${start2} ${OVSDB_CONFIG_DIR}/ovsdb.py
48 Set Global Variable ${conn_id2}
50 Get Operational Topology with custom topology
51 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to make sure the mininet created custom topology
52 @{list} Create List s1 s2
53 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
55 Add the bridge s1 in the config datastore of OVSDB Node1
56 [Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
57 Add Bridge To Ovsdb Node ${TOOLS_SYSTEM_2_IP} s1 0000000000000001
59 Add the bridge s2 in the config datastore of OVSDB Node2
60 [Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
61 Add Bridge To Ovsdb Node ${TOOLS_SYSTEM_IP} s2 0000000000000002
63 Get Config Topology with s1 and s2 Bridges
64 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the config data store
65 @{list} Create List s1 s2
66 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${CONFIG_TOPO_API} ${list}
68 Create Vxlan Port and attach to s1 Bridge
69 [Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s1 of OVSDB node 1
70 Add Vxlan To Bridge ${TOOLS_SYSTEM_IP} s2 vxlanport ${TOOLS_SYSTEM_2_IP}
72 Create Vxlan Port and attach to s2 Bridge
73 [Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s2 of OVSDB node 2
74 Add Vxlan To Bridge ${TOOLS_SYSTEM_2_IP} s1 vxlanport ${TOOLS_SYSTEM_IP}
76 Get Operational Topology with vxlan tunnel
77 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify that the vxlan tunnel is created
78 @{list} Create List vxlanport ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
79 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
81 Disconnect controller connection from the connected OVSDBs nodes
82 [Documentation] This request will disconnect the controller from the connected OVSDB node for clean startup for next suite.
84 Disconnect From Ovsdb Node ${TOOLS_SYSTEM_IP}
85 Disconnect From Ovsdb Node ${TOOLS_SYSTEM_2_IP}
87 Verify that the operational topology is clean
88 [Documentation] This request will verify the operational toplogy after the mininet is cleaned.
90 @{list} Create List ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} s1 s2
91 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
94 [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
96 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
97 [Teardown] Report_Failure_Due_To_Bug 4756
100 [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
102 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
103 [Teardown] Report_Failure_Due_To_Bug 4794
106 Vxlan Extension Test Suite Setup
107 Open Controller Karaf Console On Background
108 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
110 Vxlan Extension Test Suite Teardown
111 [Documentation] Cleans up test environment, close existing sessions.
112 Delete Bridge From Ovsdb Node ${TOOLS_SYSTEM_IP} s2
113 Delete Bridge From Ovsdb Node ${TOOLS_SYSTEM_2_IP} s1
114 Disconnect From Ovsdb Node ${TOOLS_SYSTEM_IP}
115 Disconnect From Ovsdb Node ${TOOLS_SYSTEM_2_IP}
116 Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
117 Clean OVSDB Test Environment ${TOOLS_SYSTEM_2_IP}
118 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}