${KarafKeywords__karaf_connection_index} -1
*** Keywords ***
-Check Karaf Log File Does Not Have Messages
- [Arguments] ${ip} ${message} ${user}=${CONTROLLER_USER} ${password}=${CONTROLLER_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
- [Documentation] Fails if the provided ${message} is found in the karaf.log file. Uses grep to search. The
- ... karaf.log file can be overridden with ${log_file} to be any file on the given system @ ${ip}
- ${output}= Run Command On Controller ${ip} grep -c ${message} ${log_file} user=${user} password=${password} prompt=${prompt}
- Should_Be_Equal_As_Strings ${output} 0
-
Verify Feature Is Installed
[Arguments] ${feature_name} ${controller}=${CONTROLLER} ${karaf_port}=${KARAF_SHELL_PORT}
[Documentation] Will Succeed if the given ${feature_name} is found in the output of "feature:list -i"
\ Should Contain ${output} ${message}
[Return] ${output}
+Check Karaf Log File Does Not Have Messages
+ [Arguments] ${ip} ${message} ${user}=${CONTROLLER_USER} ${password}=${CONTROLLER_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
+ [Documentation] Fails if the provided ${message} is found in the karaf.log file. Uses grep to search. The
+ ... karaf.log file can be overridden with ${log_file} to be any file on the given system @ ${ip}
+ ${output}= Run Command On Controller ${ip} grep -c '${message}' ${log_file} user=${user} password=${password} prompt=${prompt}
+ Should Be Equal As Strings ${output} 0
+
Install a Feature
[Arguments] ${feature_name} ${controller}=${CONTROLLER} ${karaf_port}=${KARAF_SHELL_PORT} ${timeout}=15
[Documentation] Will Install the given ${feature_name}
${sample1} Replace String ${sample} 127.0.0.1 ${mininet_ip}
${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
Log URL is ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT} data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Disconnect From Ovsdb Node
[Arguments] ${mininet_ip}
[Documentation] This request will disconnect the OVSDB node from the controller
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}
Should Be Equal As Strings ${resp.status_code} 200
Add Bridge To Ovsdb Node
${sample4} Replace String ${sample3} 61644 ${OVSDB_PORT}
${body} Replace String ${sample4} 0000000000000001 ${datapath_id}
Log URL is ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num} data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Delete Bridge From Ovsdb Node
[Arguments] ${mininet_ip} ${bridge_num}
[Documentation] This request will delete the bridge node from the OVSDB
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num}
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num}
Should Be Equal As Strings ${resp.status_code} 200
Add Vxlan To Bridge
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/${custom_port}
${body} Replace String ${sample} 192.168.0.21 ${remote_ip}
Log URL is ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num}/termination-point/${vxlan_port}/
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num}/termination-point/${vxlan_port}/ data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}${mininet_ip}:${OVSDB_PORT}%2Fbridge%2F${bridge_num}/termination-point/${vxlan_port}/ data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
+Verify OVS Reports Connected
+ [Arguments] ${tools_system}=${TOOLS_SYSTEM_IP}
+ [Documentation] Uses "vsctl show" to check for string "is_connected"
+ ${output}= Run Command On Remote System ${tools_system} sudo ovs-vsctl show
+ Should Contain ${output} is_connected
+
+Get OVSDB UUID
+ [Arguments] ${ovs_system_ip}=${TOOLS_SYSTEM_IP} ${controller_ip}=${ODL_SYSTEM_IP}
+ [Documentation] Queries the topology in the operational datastore and searches for the node that has
+ ... the ${ovs_system_ip} argument as the "remote-ip". If found, the value returned will be the value of
+ ... node-id stripped of "ovsdb://uuid/". If not found, ${EMPTY} will be returned.
+ ${uuid}= Set Variable ${EMPTY}
+ ${resp}= RequestsLibrary.Get Request session ${OPERATIONAL_TOPO_API}/topology/ovsdb:1
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp_json}= To Json ${resp.content}
+ ${topologies}= Get From Dictionary ${resp_json} topology
+ ${topology}= Get From List ${topologies} 0
+ ${node_list}= Get From Dictionary ${topology} node
+ Log ${node_list}
+ : FOR ${node} IN @{node_list}
+ \ ${node_id}= Get From Dictionary ${node} node-id
+ \ ${node_uuid}= Replace String ${node_id} ovsdb://uuid/ ${EMPTY}
+ # Since bridges are also listed as nodes, but will not have the extra "ovsdb:connection-info data, we need to
+ # use "Run Keyword And Ignore Error" below.
+ \ ${status} ${connection_info} Run Keyword And Ignore Error Get From Dictionary ${node} ovsdb:connection-info
+ \ ${status} ${remote_ip} Run Keyword And Ignore Error Get From Dictionary ${connection_info} remote-ip
+ \ ${uuid}= Set Variable If '${remote_ip}' == '${ovs_system_ip}' ${node_uuid} ${uuid}
+ [Return] ${uuid}
+
+
Collect OVSDB Debugs
[Arguments] ${switch}=br-int
[Documentation] Used to log useful test debugs for OVSDB related system tests.
Log ${output}
${output}= Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch} | cut -d',' -f3-
Log ${output}
+
+Clean OVSDB Test Environment
+ [Arguments] ${tools_system}=${TOOLS_SYSTEM_IP}
+ [Documentation] General Use Keyword attempting to sanitize test environment for OVSDB related
+ ... tests. Not every step will always be neccessary, but should not cause any problems for
+ ... any new ovsdb test suites.
+ Clean Mininet System ${tools_system}
+ Run Command On Remote System ${tools_system} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl stop
+ Run Command On Remote System ${tools_system} sudo rm -rf /etc/openvswitch/conf.db
+ Run Command On Remote System ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl start
*** Settings ***
Documentation Test suite for Connection Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
+Suite Setup Configure 1 OVSDB Node Suite Setup
+Suite Teardown Configure 1 OVSDB Node Suite Teardown
+Test Setup Log Testcase Start To Controller Karaf
+Force Tags Southbound
Library OperatingSystem
Library String
Library RequestsLibrary
Variables ../../../variables/Variables.py
Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/OVSDB.robot
*** Variables ***
${OVSDB_PORT} 6634
-${BRIDGE} br01
-${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${MININET}:${OVSDB_PORT}
+${BRIDGE} ovsdb-csit-test-bridge
+${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
-@{node_list} ovsdb://${MININET}:${OVSDB_PORT} ${MININET} ${OVSDB_PORT} br-int
+@{node_list} ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT} ${TOOLS_SYSTEM_IP} ${OVSDB_PORT}
*** Test Cases ***
Make the OVS instance to listen for connection
- [Tags] Southbound
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET} sudo ovs-vsctl set-manager ptcp:6634
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
Connect to OVSDB Node
[Documentation] Initiate the connection to OVSDB node from controller
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/connect.json
- ${sample1} Replace String ${sample} 127.0.0.1 ${MININET}
+ ${sample1} Replace String ${sample} 127.0.0.1 ${TOOLS_SYSTEM_IP}
${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
Log URL is ${SOUTHBOUND_CONFIG_API}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API} data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
+ Wait Until Keyword Succeeds 3s 1s Verify OVS Reports Connected
Get Operational Topology
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
Create a Bridge
[Documentation] This will create bridge on the specified OVSDB node.
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
- ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${CONTROLLER}:6633
- ${sample2} Replace String ${sample1} 127.0.0.1 ${MININET}
+ ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${ODL_SYSTEM_IP}:6633
+ ${sample2} Replace String ${sample1} 127.0.0.1 ${TOOLS_SYSTEM_IP}
${sample3} Replace String ${sample2} br01 ${BRIDGE}
${body} Replace String ${sample3} 61644 ${OVSDB_PORT}
Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE} data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Get Config Topology with Bridge
[Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Should Contain ${resp.content} ${BRIDGE}
Get Operational Topology with Bridge
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the bridge is added to the data store
- [Tags] Southbound
@{list} Create List ${BRIDGE}
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
Create Port and attach to a Bridge
[Documentation] This request will creates port/interface and attach it to the specific bridge
- [Tags] Southbound
${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port.json
Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/ data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/ data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Get Operational Topology with Port
[Documentation] This request will fetch the operational topology after the Port is added to the bridge
- [Tags] Southbound
@{list} Create List ${BRIDGE} vxlanport
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
Delete the Port
[Documentation] This request will delete the port node from the bridge node and data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after Deletion of Port
[Documentation] This request will fetch the operational topology after the Port is deleted
- [Tags] Southbound
@{list} Create List vxlanport
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
Delete the Bridge
[Documentation] This request will delete the bridge node from the config data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after Deletion of Bridge
[Documentation] This request will fetch the operational topology after the Bridge is deleted
- [Tags] Southbound
@{list} Create List ${BRIDGE} vxlanport
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
-Get Config Topology with integration Bridge
+Verify Config Still Has OVS Info
[Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} br-int
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
Delete the OVSDB Node
[Documentation] This request will delete the OVSDB node
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology to make sure the connection has been deleted
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- @{list} Create List ovsdb://${MININET}:${OVSDB_PORT}
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ @{list} Create List ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
Get Configuration Topology to make sure the connection has been deleted
[Documentation] This request will fetch the configuration topology from the connected OVSDB nodes
- [Tags] Southbound
- @{list} Create List ovsdb://${MININET}:${OVSDB_PORT}
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${CONFIG_TOPO_API} ${node_list}
+ @{list} Create List ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${CONFIG_TOPO_API}/topology/ovsdb:1 ${node_list}
Reconnect to OVSDB Node
[Documentation] Initiate the connection to OVSDB node from controller
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/connect.json
- ${sample1} Replace String ${sample} 127.0.0.1 ${MININET}
+ ${sample1} Replace String ${sample} 127.0.0.1 ${TOOLS_SYSTEM_IP}
${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
Log URL is ${SOUTHBOUND_CONFIG_API}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API} data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
-Get Operational Topology with Integration Bridge
+Get Operational Topology After Node Reconnect
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the bridge is added to the data store
- [Tags] Southbound
- @{list} Create List br-int
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
-Get Config Topology after reconnect
+Get Config Topology After Reconnect
[Documentation] This will fetch the configuration topology from configuration data store after reconnect
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} br-int
-
-Create integration Bridge
- [Documentation] This will create bridge on the specified OVSDB node.
- [Tags] Southbound
- ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
- ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${CONTROLLER}:6633
- ${sample2} Replace String ${sample1} 127.0.0.1 ${MININET}
- ${sample3} Replace String ${sample2} br01 br-int
- ${body} Replace String ${sample3} 61644 ${OVSDB_PORT}
- Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-int data=${body}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
+
+Check For Bug 4756
+ [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
+ [Teardown] Report_Failure_Due_To_Bug 4756
+
+Check For Bug 4794
+ [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
+ [Teardown] Report_Failure_Due_To_Bug 4794
+
+*** Keywords ***
+Configure 1 OVSDB Node Suite Setup
+ Open Controller Karaf Console On Background
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+
+Configure 1 OVSDB Node Suite Teardown
+ [Documentation] Cleans up test environment, close existing sessions.
+ Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
+ RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Delete the integration Bridge
- [Documentation] This request will delete the bridge node from the config data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-int
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
-
-Get Operational Topology after Deletion of integration Bridge
- [Documentation] This request will fetch the operational topology after the Bridge is deleted
- [Tags] Southbound
- @{list} Create List br-int
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Again Delete the OVSDB Node
- [Documentation] This request will delete the OVSDB node
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
-
-Get Operational Topology after Deletion of OVSDB Node
- [Documentation] This request will fetch the operational topology after the OVSDB node is deleted
- [Tags] Southbound
- @{list} Create List ovsdb://${MININET}:${OVSDB_PORT} ${BRIDGE} vxlanport
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ Delete All Sessions
*** Settings ***
Documentation Test suite for Connection Manager
Suite Setup OVSDB Connection Manager Suite Setup
-Suite Teardown Delete All Sessions
+Suite Teardown OVSDB Connection Manager Suite Teardown
Test Setup Log Testcase Start To Controller Karaf
+Force Tags Southbound
Library OperatingSystem
Library String
Library RequestsLibrary
Variables ../../../variables/Variables.py
Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/OVSDB.robot
*** Variables ***
${OVSDB_PORT} 6634
-${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${MININET}:${OVSDB_PORT}
+${BRIDGE1} ovsdb-csit-test-bridge1
+${BRIDGE2} ovsdb-csit-test-bridge2
+${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
-@{node_list} ovsdb://${MININET}:${OVSDB_PORT} ${MININET} ${OVSDB_PORT} br-int
+@{node_list} ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT} ${TOOLS_SYSTEM_IP} ${OVSDB_PORT}
*** Test Cases ***
Connecting an OVS instance to the controller
- [Tags] Southbound
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET} sudo ovs-vsctl set-manager tcp:${CONTROLLER}:6640
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
+ Wait Until Keyword Succeeds 5s 1s Verify OVS Reports Connected
Get Operational Topology to verify the ovs instance is connected to the controller
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list}
+ @{list} Create List ovsdb://uuid "remote-ip":"${TOOLS_SYSTEM_IP}" "local-port":6640
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
+ ${ovsdb_uuid}= Get OVSDB UUID ${TOOLS_SYSTEM_IP}
+ Set Suite Variable ${ovsdb_uuid}
-Get Config Topology
+Verify OVS Not In Config Topology
[Documentation] This request will fetch the configuration topology from configuration data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} ovsdb://${MININET}:${OVSDB_PORT}/bridge/br-int
+ Check For Elements Not At URI ${CONFIG_TOPO_API} ${node_list}
Create bridge manually
- [Tags] Southbound
- Run Command On Remote System ${MININET} sudo ovs-vsctl add-br br-s1
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-br ${BRIDGE1}
Get Operational Topology to verify the bridge has been added
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- @{list} Create List br-s1
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
+ @{list} Create List ${BRIDGE1}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
Get Config Topology to verify the manually added bridge is not added to the config datastore
[Documentation] This request will fetch the configuration topology from configuration data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should not Contain ${resp.content} ovsdb://${MININET}:${OVSDB_PORT}/bridge/br-s1
+ Should not Contain ${resp.content} ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}/bridge/${BRIDGE1}
Create a Bridge through controller
[Documentation] This will create bridge on the specified OVSDB node.
- [Tags] Southbound
- ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
- ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${CONTROLLER}:6633
- ${sample2} Replace String ${sample1} 127.0.0.1 ${MININET}
- ${sample3} Replace String ${sample2} br01 br-s2
- ${body} Replace String ${sample3} 61644 ${OVSDB_PORT}
- Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-s2
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-s2 data=${body}
- Log ${resp.content}
+ ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
+ ${body} Replace String ${body} ovsdb://127.0.0.1:61644 ovsdb://uuid/${ovsdb_uuid}
+ ${body} Replace String ${body} tcp:127.0.0.1:6633 tcp:${ODL_SYSTEM_IP}:6640
+ ${body} Replace String ${body} 127.0.0.1 ${TOOLS_SYSTEM_IP}
+ ${body} Replace String ${body} br01 ${BRIDGE2}
+ ${body} Replace String ${body} 61644 ${OVSDB_PORT}
+ ${uri}= Set Variable ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE2}
+ Log URL is ${uri}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${uri} data=${body}
Should Be Equal As Strings ${resp.status_code} 200
Get Operational Topology to verify the bridge has been added through rest call
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- @{list} Create List br-s2
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
+ @{list} Create List ${BRIDGE2}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
Get Config Topology to verify the entry added to the config datastore
[Documentation] This request will fetch the configuration topology from configuration data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} ovsdb://${MININET}:${OVSDB_PORT}/bridge/br-s2
+ Should Contain ${resp.content} ovsdb://uuid/${ovsdb_uuid}/bridge/${BRIDGE2}
Create bridge of already added bridge
[Documentation] This will add bridge to the config datastore
- [Tags] Southbound
- ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
- ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${CONTROLLER}:6633
- ${sample2} Replace String ${sample1} 127.0.0.1 ${MININET}
- ${sample3} Replace String ${sample2} br01 br-s1
- ${body} Replace String ${sample3} 61644 ${OVSDB_PORT}
- Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-s1
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-s1 data=${body}
- Log ${resp.content}
+ ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
+ ${body} Replace String ${body} ovsdb://127.0.0.1:61644 ovsdb://uuid/${ovsdb_uuid}
+ ${body} Replace String ${body} tcp:127.0.0.1:6633 tcp:${ODL_SYSTEM_IP}:6640
+ ${body} Replace String ${body} 127.0.0.1 ${TOOLS_SYSTEM_IP}
+ ${body} Replace String ${body} br01 ${BRIDGE1}
+ ${body} Replace String ${body} 61644 ${OVSDB_PORT}
+ ${uri}= Set Variable ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE1}
+ Log URL is ${uri}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${uri} data=${body}
Should Be Equal As Strings ${resp.status_code} 200
Get Config Topology to verify the entry of existing bridge added to the config datastore
[Documentation] This request will fetch the configuration topology from configuration data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should Contain ${resp.content} ovsdb://${MININET}:${OVSDB_PORT}/bridge/br-s1
+ Should Contain ${resp.content} ovsdb://uuid/${ovsdb_uuid}/bridge/${BRIDGE1}
Delete bridge manually
- [Tags] Southbound
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-br br-s2
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-br ${BRIDGE2}
Get Operational Topology to verify the bridge has been deleted manually
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- @{list} Create List br-s2
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ @{list} Create List ${BRIDGE2}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
-Get Config Topology to verify the entry deleted from the config datastore
+Config Topology Still Contains Bridge
[Documentation] This request will fetch the configuration topology from configuration data store
- [Tags] Southbound
- ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
- Should not Contain ${resp.content} ovsdb://${MININET}:${OVSDB_PORT}/bridge/br-s2
+ Should Contain ${resp.content} ovsdb://uuid/${ovsdb_uuid}/bridge/${BRIDGE2}
Delete the Bridge through rest call
[Documentation] This request will delete the bridge node from the config data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-s1
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE2}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after Deletion of Bridge
[Documentation] This request will fetch the operational topology after the Bridge is deleted
- [Tags] Southbound
- @{list} Create List br-s1
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ @{list} Create List ${BRIDGE2}
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
-Delete the integration Bridge
- [Documentation] This request will delete the bridge node from the config data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-int
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
+Check For Bug 4756
+ [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
+ [Teardown] Report_Failure_Due_To_Bug 4756
-Get Operational Topology after Deletion of integration Bridge
- [Documentation] This request will fetch the operational topology after the Bridge is deleted
- [Tags] Southbound
- @{list} Create List br-int br-s1
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+Check For Bug 4794
+ [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
+ [Teardown] Report_Failure_Due_To_Bug 4794
*** Keywords ***
OVSDB Connection Manager Suite Setup
Open Controller Karaf Console On Background
- Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+
+OVSDB Connection Manager Suite Teardown
+ [Documentation] Cleans up test environment, close existing sessions.
+ Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
+ RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE1}
+ RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE2}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+ Delete All Sessions
\ No newline at end of file
*** Settings ***
Documentation Test suite for Connection Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
+Suite Setup Configure Exit OVSDB Node Suite Setup
+Suite Teardown Configure Exit OVSDB Node Suite Teardown
+Test Setup Log Testcase Start To Controller Karaf
+Force Tags Southbound
Library OperatingSystem
Library String
Library RequestsLibrary
Variables ../../../variables/Variables.py
Resource ../../../libraries/Utils.robot
+Resource ../../../libraries/OVSDB.robot
*** Variables ***
${OVSDB_PORT} 6634
-${BRIDGE} br-s1
-${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${MININET}:${OVSDB_PORT}
+${BRIDGE} ovsdb-csit-test-bridge
+${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
@{node_list} ${BRIDGE} vx1
*** Test Cases ***
Create a Topology in OVSDB node
[Documentation] Create topology in OVSDB and ready it for further tests
- [Tags] Southbound
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-br br-int
- Run Command On Remote System ${MININET} sudo ovs-vsctl add-br ${BRIDGE}
- Run Command On Remote System ${MININET} sudo ovs-vsctl add-port ${BRIDGE} vx1 -- set Interface vx1 type=vxlan options:remote_ip=192.168.1.11
- Run Command On Remote System ${MININET} sudo ovs-vsctl set-manager ptcp:6634
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-br ${BRIDGE}
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-port ${BRIDGE} vx1 -- set Interface vx1 type=vxlan options:remote_ip=192.168.1.11
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:6634
Connect to OVSDB Node
[Documentation] Initiate the connection to OVSDB node from controller
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/connect.json
- ${sample1} Replace String ${sample} 127.0.0.1 ${MININET}
+ ${sample1} Replace String ${sample} 127.0.0.1 ${TOOLS_SYSTEM_IP}
${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
Log URL is ${SOUTHBOUND_CONFIG_API}
${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API} data=${body}
Get Operational Topology
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list}
+ [Teardown] Report_Failure_Due_To_Bug 4756
-Get Config Topology without Bridge
+Verify Bridge Port Not In Config DS
[Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
- [Tags] Southbound
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${CONFIG_TOPO_API} ${node_list}
-
-Delete the integration Bridge
- [Documentation] This request will delete the bridge node from the config data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2Fbr-int
- Should Be Equal As Strings ${resp.status_code} 200 Response status code error
-
-Get Operational Topology after deletion of integration bridge
- [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- @{list} Create List br-int
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+ @{list} Create List vx1
+ Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${CONFIG_TOPO_API} ${list}
Create bridge of already added bridge
[Documentation] This will add bridge to the config datastore
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
- ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${CONTROLLER}:6633
- ${sample2} Replace String ${sample1} 127.0.0.1 ${MININET}
+ ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${ODL_SYSTEM_IP}:6633
+ ${sample2} Replace String ${sample1} 127.0.0.1 ${TOOLS_SYSTEM_IP}
${sample3} Replace String ${sample2} br01 ${BRIDGE}
${body} Replace String ${sample3} 61644 ${OVSDB_PORT}
Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE} data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE} data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Get Config Topology with Bridge
[Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
- [Tags] Southbound
- @{list} Create List br-s1
+ @{list} Create List ${BRIDGE}
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${CONFIG_TOPO_API} ${list}
Create Port of already added port in OVSDB
[Documentation] This will add port/interface to the config datastore
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port.json
${sample1} Replace String ${sample} vxlanport vx1
${body} Replace String ${sample1} 192.168.0.21 192.168.1.10
Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/ data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/ data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Get Config Topology with Bridge and Port
[Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
- [Tags] Southbound
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${CONFIG_TOPO_API} ${node_list}
Modify the destination IP of Port
[Documentation] This will modify the dst ip of existing port
- [Tags] Southbound
${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port.json
${sample1} Replace String ${sample} vxlanport vx1
${body} Replace String ${sample1} 192.168.0.21 10.0.0.19
Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/ data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/ data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Get Operational Topology with modified Port
[Documentation] This request will fetch the operational topology after the Port is added to the bridge
- [Tags] Southbound
@{list} Create List ${BRIDGE} vx1 10.0.0.19
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
Create Port and attach to a Bridge
[Documentation] This request will creates port/interface and attach it to the specific bridge
- [Tags] Southbound
${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port.json
Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
- ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/ data=${body}
+ Log data: ${body}
+ ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/ data=${body}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
Get Operational Topology with Port
[Documentation] This request will fetch the operational topology after the Port is added to the bridge
- [Tags] Southbound
@{list} Create List ${BRIDGE} vxlanport
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
Delete the Port1
[Documentation] This request will delete the port node from the bridge node and data store.
- [Tags] Southbound
${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vx1/
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after deletion of Port1
[Documentation] This request will fetch the operational topology after the Port is added to the bridge
- [Tags] Southbound
@{list} Create List vx1
Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
Delete the Port2
[Documentation] This request will delete the port node from the bridge node and data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after Deletion of Port2
[Documentation] This request will fetch the operational topology after the Port is deleted
- [Tags] Southbound
@{list} Create List vxlanport
Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
Delete the Bridge
[Documentation] This request will delete the bridge node from the config data store.
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after Deletion of Bridge
[Documentation] This request will fetch the operational topology after the Bridge is deleted
- [Tags] Southbound
@{list} Create List ${BRIDGE} vxlanport vx1
Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
Delete the OVSDB Node
[Documentation] This request will delete the OVSDB node
- [Tags] Southbound
- ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}
+ ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}
Should Be Equal As Strings ${resp.status_code} 200 Response status code error
Get Operational Topology after Deletion of OVSDB Node
[Documentation] This request will fetch the operational topology after the OVSDB node is deleted
- [Tags] Southbound
- @{list} Create List ovsdb://${MININET}:${OVSDB_PORT} ${BRIDGE} vxlanport vx1
+ @{list} Create List ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT} ${BRIDGE} vxlanport vx1
Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+
+Check For Bug 4756
+ [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
+ [Teardown] Report_Failure_Due_To_Bug 4756
+
+Check For Bug 4794
+ [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
+ [Teardown] Report_Failure_Due_To_Bug 4794
+
+*** Keywords ***
+Configure Exit OVSDB Node Suite Setup
+ Open Controller Karaf Console On Background
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+
+Configure Exit OVSDB Node Suite Teardown
+ [Documentation] Cleans up test environment, close existing sessions.
+ Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
+ RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+ Delete All Sessions
\ No newline at end of file
*** Settings ***
Documentation Test suite for Connection Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
+Suite Setup Vxlan Extension Test Suite Setup
+Suite Teardown Vxlan Extension Test Suite Teardown
+Test Setup Log Testcase Start To Controller Karaf
+Force Tags Southbound
Library OperatingSystem
Library String
Library Collections
*** Variables ***
${OVSDB_PORT} 6634
${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
-@{node_list1} ovsdb://${MININET1}:${OVSDB_PORT} ${MININET1} ${OVSDB_PORT} ovsdb://${MININET}:${OVSDB_PORT} ${MININET} ${OVSDB_PORT} br-int
-${start1} sudo mn --controller=remote,ip=${CONTROLLER} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,1
-${start2} sudo mn --controller=remote,ip=${CONTROLLER} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,2
+@{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}
+${start1} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,1
+${start2} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,2
*** Test Cases ***
Make the OVS instance to listen for connection
- [Tags] Southbound
- Run Command On Remote System ${MININET1} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET1} sudo ovs-vsctl set-manager ptcp:6634
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET} sudo ovs-vsctl set-manager ptcp:6634
+ Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
+ Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
Connect controller to OVSDB Node1
[Documentation] Initiate the connection to OVSDB node from controller
- [Tags] Southbound
- Connect To Ovsdb Node ${MININET1}
+ Connect To Ovsdb Node ${TOOLS_SYSTEM_2_IP}
Connect controller to OVSDB Node2
[Documentation] Initiate the connection to OVSDB node from controller
- [Tags] Southbound
- Connect To Ovsdb Node ${MININET}
+ Connect To Ovsdb Node ${TOOLS_SYSTEM_IP}
Get Operational Topology from OVSDB Node1 and OVSDB Node2
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list1}
-Delete the integration Bridge from OVSDB node 1 and 2 and Verify it
- [Documentation] This request will delete the integation bridge node from the OVSDB as we don't need it and verify the operation.
- [Tags] Southbound
- Delete Bridge From Ovsdb Node ${MININET} br-int
- Delete Bridge From Ovsdb Node ${MININET1} br-int
- @{list} Create List br-int
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
-
Start the Mininet and create custom topology
[Documentation] This will start mininet with custom topology on both the Virtual Machines
- [Tags] Southbound
- ${conn_id1} Start Mininet ${MININET1} ${start1} ${OVSDB_CONFIG_DIR}/ovsdb.py
+ ${conn_id1} Start Mininet ${TOOLS_SYSTEM_2_IP} ${start1} ${OVSDB_CONFIG_DIR}/ovsdb.py
Set Global Variable ${conn_id1}
- ${conn_id2} Start Mininet ${MININET} ${start2} ${OVSDB_CONFIG_DIR}/ovsdb.py
+ ${conn_id2} Start Mininet ${TOOLS_SYSTEM_IP} ${start2} ${OVSDB_CONFIG_DIR}/ovsdb.py
Set Global Variable ${conn_id2}
Get Operational Topology with custom topology
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes to make sure the mininet created custom topology
- [Tags] Southbound
@{list} Create List s1 s2
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
Add the bridge s1 in the config datastore of OVSDB Node1
[Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
- [Tags] Southbound
- Add Bridge To Ovsdb Node ${MININET1} s1 0000000000000001
+ Add Bridge To Ovsdb Node ${TOOLS_SYSTEM_2_IP} s1 0000000000000001
Add the bridge s2 in the config datastore of OVSDB Node2
[Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
- [Tags] Southbound
- Add Bridge To Ovsdb Node ${MININET} s2 0000000000000002
+ Add Bridge To Ovsdb Node ${TOOLS_SYSTEM_IP} s2 0000000000000002
Get Config Topology with s1 and s2 Bridges
[Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the config data store
- [Tags] Southbound
@{list} Create List s1 s2
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${CONFIG_TOPO_API} ${list}
Create Vxlan Port and attach to s1 Bridge
[Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s1 of OVSDB node 1
- [Tags] Southbound
- Add Vxlan To Bridge ${MININET} s2 vxlanport ${MININET1}
+ Add Vxlan To Bridge ${TOOLS_SYSTEM_IP} s2 vxlanport ${TOOLS_SYSTEM_2_IP}
Create Vxlan Port and attach to s2 Bridge
[Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s2 of OVSDB node 2
- [Tags] Southbound
- Add Vxlan To Bridge ${MININET1} s1 vxlanport ${MININET}
+ Add Vxlan To Bridge ${TOOLS_SYSTEM_2_IP} s1 vxlanport ${TOOLS_SYSTEM_IP}
Get Operational Topology with vxlan tunnel
[Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify that the vxlan tunnel is created
- [Tags] Southbound
- @{list} Create List vxlanport ${MININET1} ${MININET}
+ @{list} Create List vxlanport ${TOOLS_SYSTEM_2_IP} ${TOOLS_SYSTEM_IP}
Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-Add Flow1 Rule for s1 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule1.xml
- Set Suite Variable ${body}
- Log URL is ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Add Flow2 Rule for s1 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule2.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Get Operational Topology to verify the flows successfully installed in the bridge s1
- [Documentation] This request will fetch the operational topology and verify that the flows has been installed in the switch
- [Tags] Southbound
- @{list} Create List openflow:1
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Add Flow1 Rule for s2 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule1.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Add Flow2 Rule for s2 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule2.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Get Operational Topology to verify the flows successfully installed in the bridge s2
- [Documentation] This request will fetch the operational topology and verify that the flows has been installed in the switch
- [Tags] Southbound
- @{list} Create List openflow:2
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Ping host2 to IP of host1
- [Documentation] This step will verify the functionality of the vxlan tunnel between two OVSDB nodes. Ping h2(10.0.0.2)---> 10.0.0.1 , verify no packet loss
- Switch Connection ${conn_id2}
- SSHLibrary.Write h2 ping -w 1 10.0.0.1
- ${result} Read Until mininet>
- Should Contain ${result} 1 received, 0% packet loss
-
-Cleanup work after test completed
- [Documentation] Cleanup/Shutdown work that should be done at the completion of all tests
- Stop Mininet ${conn_id2}
- Stop Mininet ${conn_id1}
-
Disconnect controller connection from the connected OVSDBs nodes
[Documentation] This request will disconnect the controller from the connected OVSDB node for clean startup for next suite.
[Tags] Southbound
- Disconnect From Ovsdb Node ${MININET}
- Disconnect From Ovsdb Node ${MININET1}
+ Disconnect From Ovsdb Node ${TOOLS_SYSTEM_IP}
+ Disconnect From Ovsdb Node ${TOOLS_SYSTEM_2_IP}
Verify that the operational topology is clean
[Documentation] This request will verify the operational toplogy after the mininet is cleaned.
[Tags] Southbound
- @{list} Create List ${MININET} ${MININET1} s1 s2
+ @{list} Create List ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_2_IP} s1 s2
Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
+
+Check For Bug 4756
+ [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
+ [Teardown] Report_Failure_Due_To_Bug 4756
+
+Check For Bug 4794
+ [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
+ ... case executed.
+ Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
+ [Teardown] Report_Failure_Due_To_Bug 4794
+
+*** Keywords ***
+Vxlan Extension Test Suite Setup
+ Open Controller Karaf Console On Background
+ Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
+
+Vxlan Extension Test Suite Teardown
+ [Documentation] Cleans up test environment, close existing sessions.
+ Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
+ Clean OVSDB Test Environment ${TOOLS_SYSTEM_2_IP}
+ RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
+ RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_2_IP}:${OVSDB_PORT}
+ ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
+ Log ${resp.content}
+ Delete All Sessions
+++ /dev/null
-*** Settings ***
-Documentation Test suite for Connection Manager
-Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
-Suite Teardown Delete All Sessions
-Library OperatingSystem
-Library String
-Library Collections
-Library SSHLibrary
-Library RequestsLibrary
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/Utils.robot
-Resource ../../../libraries/OVSDB.robot
-
-*** Variables ***
-${OVSDB_PORT} 6634
-${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
-@{node_list1} ovsdb://${MININET1}:${OVSDB_PORT} ${MININET1} ${OVSDB_PORT} ovsdb://${MININET}:${OVSDB_PORT} ${MININET} ${OVSDB_PORT} br-int
-${start1} sudo mn --controller=remote,ip=${CONTROLLER} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,1
-${start2} sudo mn --controller=remote,ip=${CONTROLLER} --switch=ovsk,protocols=OpenFlow13 --custom ovsdb.py --topo host,2
-
-*** Test Cases ***
-Make the OVS instance to listen for connection
- [Tags] Southbound
- Run Command On Remote System ${MININET1} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET1} sudo ovs-vsctl set-manager ptcp:6634
- Run Command On Remote System ${MININET} sudo ovs-vsctl del-manager
- Run Command On Remote System ${MININET} sudo ovs-vsctl set-manager ptcp:6634
-
-Connect controller to OVSDB Node1 and OVSDB Node2
- [Documentation] Initiate the connection to OVSDB node from controller
- [Tags] Southbound
- Connect To Ovsdb Node ${MININET1}
- Connect To Ovsdb Node ${MININET}
-
-Get Operational Topology from OVSDB Node1 and OVSDB Node2
- [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
- [Tags] Southbound
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list1}
-
-Delete the integration Bridge from OVSDB node 1 and 2 and Verify it
- [Documentation] This request will delete the integation bridge node from the OVSDB as we don't need it and verify the operation.
- [Tags] Southbound
- Delete Bridge From Ovsdb Node ${MININET} br-int
- Delete Bridge From Ovsdb Node ${MININET1} br-int
- @{list} Create List br-int
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Start the Mininet and create custom topology
- [Documentation] This will start mininet with custom topology on both the Virtual Machines
- [Tags] Southbound
- ${conn_id1} Start Mininet ${MININET1} ${start1} ${OVSDB_CONFIG_DIR}/ovsdb.py
- Set Global Variable ${conn_id1}
- ${conn_id2} Start Mininet ${MININET} ${start2} ${OVSDB_CONFIG_DIR}/ovsdb.py
- Set Global Variable ${conn_id2}
-
-Get Operational Topology with custom topology
- [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to make sure the mininet created custom topology
- [Tags] Southbound
- @{list} Create List s1 s2
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Add the bridge s1 in the config datastore of OVSDB Node1
- [Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
- [Tags] Southbound
- Add Bridge To Ovsdb Node ${MININET1} s1 0000000000000001
-
-Add the bridge s2 in the config datastore of OVSDB Node2
- [Documentation] This request will add already operational bridge to the config data store of the OVSDB node.
- [Tags] Southbound
- Add Bridge To Ovsdb Node ${MININET} s2 0000000000000002
-
-Get Config Topology with s1 and s2 Bridges
- [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the config data store
- [Tags] Southbound
- @{list} Create List s1 s2
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${CONFIG_TOPO_API} ${list}
-
-Create Vxlan Port and attach to s1 Bridge
- [Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s1 of OVSDB node 1
- [Tags] Southbound
- Add Vxlan To Bridge ${MININET} s2 vxlanport ${MININET1} create_port_key.json
-
-Create Vxlan Port and attach to s2 Bridge
- [Documentation] This request will create vxlan port/interface for vxlan tunnel and attach it to the specific bridge s2 of OVSDB node 2
- [Tags] Southbound
- Add Vxlan To Bridge ${MININET1} s1 vxlanport ${MININET} create_port_key.json
-
-Get Operational Topology with vxlan tunnel
- [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify that the vxlan tunnel is created
- [Tags] Southbound
- @{list} Create List vxlanport ${MININET1} ${MININET}
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Add Flow1 Rule for s1 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule3.xml
- Set Suite Variable ${body}
- Log URL is ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/1 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Add Flow2 Rule for s1 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule4.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:1/table/0/flow/2 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Get Operational Topology to verify the flows successfully installed in the bridge s1
- [Documentation] This request will fetch the operational topology and verify that the flows has been installed in the switch
- [Tags] Southbound
- @{list} Create List openflow:1
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Add Flow1 Rule for s2 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule3.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/1 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Add Flow2 Rule for s2 and verify
- [Documentation] This request will add flow to the switch and after that verify through the config datastore flow
- [Tags] Southbound
- ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/add_flow_rule4.xml
- Log URL is ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2
- ${resp} RequestsLibrary.Put session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2 headers=${HEADERS_XML} data=${body}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- ${resp} RequestsLibrary.Get session ${CONFIG_NODES_API}/node/openflow:2/table/0/flow/2 headers=${ACCEPT_XML}
- Should Be Equal As Strings ${resp.status_code} 200
- compare xml ${body} ${resp.content}
-
-Get Operational Topology to verify the flows successfully installed in the bridge s2
- [Documentation] This request will fetch the operational topology and verify that the flows has been installed in the switch
- [Tags] Southbound
- @{list} Create List openflow:2
- Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${list}
-
-Ping host2 to IP of host1
- [Documentation] This step will verify the functionality of the vxlan tunnel between two OVSDB nodes. Ping h2(10.0.0.2)---> 10.0.0.1 , verify no packet loss
- Switch Connection ${conn_id2}
- SSHLibrary.Write h2 ping -w 1 10.0.0.1
- ${result} Read Until mininet>
- Should Contain ${result} 1 received, 0% packet loss
-
-Cleanup work after test completed
- [Documentation] Cleanup/Shutdown work that should be done at the completion of all tests
- Stop Mininet ${conn_id2}
- Stop Mininet ${conn_id1}
-
-Disconnect controller connection from the connected OVSDBs nodes
- [Documentation] This request will disconnect the controller from the connected OVSDB node for clean startup for next suite.
- [Tags] Southbound
- Disconnect From Ovsdb Node ${MININET}
- Disconnect From Ovsdb Node ${MININET1}
-
-Verify that the operational topology is clean
- [Documentation] This request will verify the operational toplogy after the mininet is cleaned.
- [Tags] Southbound
- @{list} Create List ${MININET} ${MININET1} s1 s2
- Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list}
# Place the suites in run order:
-integration/test/csit/suites/ovsdb/Southbound_Domain
-
+integration/test/csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot
+integration/test/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot
+integration/test/csit/suites/ovsdb/Southbound_Domain/040__Vxlan_Extension_Test.robot
+# moving 010 to the end because bug 4756 will put plugin in a bad state and cause failures in 030
+integration/test/csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot
+integration/test/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot
\ No newline at end of file