From 0f47b1f6c5b8362efa0671ee6ff5f060869b9c75 Mon Sep 17 00:00:00 2001 From: "priya.ramasubbu" Date: Wed, 10 Aug 2016 21:53:35 +0530 Subject: [PATCH] Fix failures in ovsdb southbound suite for PUT request Change-Id: I647b1c9bb6547a0691de6996b38263a518c2cf19 Signed-off-by: priya.ramasubbu --- csit/libraries/OVSDB.robot | 7 ++++--- .../010__configure_1_ovsdb_node.robot | 8 ++++---- .../Southbound_Domain/020__connection_manager.robot | 4 ++-- .../030__configure_exit_ovsdb_node.robot | 10 +++++----- .../ovsdb/Southbound_Domain/Bug_Validation.robot | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/csit/libraries/OVSDB.robot b/csit/libraries/OVSDB.robot index 4249bb720e..6f5286942f 100644 --- a/csit/libraries/OVSDB.robot +++ b/csit/libraries/OVSDB.robot @@ -5,6 +5,7 @@ Library Collections Library RequestsLibrary Resource Utils.robot Resource ClusterManagement.robot +Resource ${CURDIR}/TemplatedRequests.robot Variables ../variables/Variables.py *** Variables *** @@ -22,7 +23,7 @@ Connect To Ovsdb Node 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Disconnect From Ovsdb Node [Arguments] ${mininet_ip} @@ -43,7 +44,7 @@ Add Bridge To Ovsdb Node 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Delete Bridge From Ovsdb Node [Arguments] ${mininet_ip} ${bridge_num} @@ -60,7 +61,7 @@ Add Vxlan To Bridge 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Verify OVS Reports Connected [Arguments] ${tools_system}=${TOOLS_SYSTEM_IP} diff --git a/csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot b/csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot index 1687f0b569..e70d9b1faa 100644 --- a/csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot +++ b/csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot @@ -32,7 +32,7 @@ Connect to OVSDB Node Log data: ${body} ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body} Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Wait Until Keyword Succeeds 5s 1s Verify OVS Reports Connected Get Operational Topology @@ -50,7 +50,7 @@ Create a Bridge 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} 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 @@ -71,7 +71,7 @@ Create Port and attach to a Bridge 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Get Operational Topology with Port [Documentation] This request will fetch the operational topology after the Port is added to the bridge @@ -129,7 +129,7 @@ Reconnect to OVSDB Node Log data: ${body} ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body} Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} 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 diff --git a/csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot b/csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot index 7e43487f46..839e919474 100644 --- a/csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot +++ b/csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot @@ -63,7 +63,7 @@ Create a Bridge through controller Log URL is ${uri} Log data: ${body} ${resp} RequestsLibrary.Put Request session ${uri} data=${body} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} 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 @@ -89,7 +89,7 @@ Create bridge of already added bridge Log URL is ${uri} Log data: ${body} ${resp} RequestsLibrary.Put Request session ${uri} data=${body} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} 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 diff --git a/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot b/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot index d3e337e6fc..4371aeaab9 100644 --- a/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot +++ b/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot @@ -34,7 +34,7 @@ Connect to OVSDB Node Log URL is ${SOUTHBOUND_CONFIG_API} ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body} Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Get Operational Topology [Documentation] This request will fetch the operational topology from the connected OVSDB nodes @@ -57,7 +57,7 @@ Create bridge of already added bridge 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} 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 @@ -73,7 +73,7 @@ Create Port of already added port in OVSDB 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} 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 @@ -103,7 +103,7 @@ Create Port and attach to a Bridge 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} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Get Operational Topology with Port [Documentation] This request will fetch the operational topology after the Port is added to the bridge @@ -153,7 +153,7 @@ Get Operational Topology after Deletion of OVSDB Node 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. + ... 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 diff --git a/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot b/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot index 082689b4fc..a5f09957e4 100644 --- a/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot +++ b/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot @@ -121,7 +121,7 @@ Create Bridge Log URL is ${uri} Log data: ${body} ${resp} RequestsLibrary.Put Request session ${uri} data=${body} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Connect Controller To OVSDB Node [Documentation] Initiate the connection to OVSDB node from controller @@ -131,5 +131,5 @@ Connect Controller To OVSDB Node Log data: ${body} ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT} data=${body} Log ${resp.content} - Should Be Equal As Strings ${resp.status_code} "20?" + Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} Wait Until Keyword Succeeds 5s 1s Verify OVS Reports Connected -- 2.36.6