Fix failures in ovsdb southbound suite for PUT request 05/43605/6
authorpriya.ramasubbu <priya.ramasubbu@hcl.com>
Wed, 10 Aug 2016 16:23:35 +0000 (21:53 +0530)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 16 Aug 2016 21:11:21 +0000 (21:11 +0000)
Change-Id: I647b1c9bb6547a0691de6996b38263a518c2cf19
Signed-off-by: priya.ramasubbu <priya.ramasubbu@hcl.com>
csit/libraries/OVSDB.robot
csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot
csit/suites/ovsdb/Southbound_Domain/020__connection_manager.robot
csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot
csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot

index 4249bb720e29b4ad516582926d6b7d09d2260a5d..6f5286942f6660dc1615afa22f5d5ad50b473908 100644 (file)
@@ -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}
index 1687f0b569d181b69fc6a7bd06709e59d84b0cd8..e70d9b1faac51364363b8e603db297d7f0bcfb23 100644 (file)
@@ -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
index 7e43487f464d1e04e53d08139a54f2a5587de0ff..839e919474973955bcfdb2154715101f9e88d27c 100644 (file)
@@ -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
index d3e337e6fc3985f6d84f170ce733083d21bd8252..4371aeaab91945797e208310e990fc8802f711e3 100644 (file)
@@ -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
 
index 082689b4fc1b80ef9522098b730fb31c5332565c..a5f09957e4668669973fedacc62fb20b05eee086 100644 (file)
@@ -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