Check for all default tables before failure 46/74546/7
authorFaseela K <faseela.k@ericsson.com>
Thu, 26 Jul 2018 16:27:00 +0000 (21:57 +0530)
committerSam Hague <shague@redhat.com>
Fri, 27 Jul 2018 16:48:30 +0000 (16:48 +0000)
JIRA: INTTEST-51

Change-Id: Id14eb92750c079ca22883f752d4b7bca2ffd0005
Signed-off-by: Faseela K <faseela.k@ericsson.com>
csit/libraries/OpenStackOperations.robot

index d21e6da8f77536f94e9930bff110500f6268043c..73b39b5ed64d9551cf2221599f82c3155b8a4a23 100644 (file)
@@ -1104,8 +1104,12 @@ Verify Expected Default Tables On Nodes
     [Documentation]    Verify if Default Table Entries are programmed on all Nodes
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}
     Utils.Log Content    ${resp.content}
+    ${failed_node_list} =    BuiltIn.Create List
     : FOR    ${node_ip}    IN    @{node_ips}
-    \    Verify Expected Default Tables    ${node_ip}
+    \    ${failed_table_list} =    Verify Expected Default Tables    ${node_ip}
+    \    ${failed_table_list_size} =    BuiltIn.Get Length    ${failed_table_list}
+    \    BuiltIn.Run Keyword If    ${failed_table_list_size} > 0    Collections.Append To List    ${failed_node_list}    ${node_ip}
+    Builtin.Should Be Empty    ${failed_node_list}
 
 Verify Expected Default Tables
     [Arguments]    ${ovs_ip}
@@ -1114,7 +1118,9 @@ Verify Expected Default Tables
     BuiltIn.Log    ${flow_dump}
     ${failed_table_list} =    BuiltIn.Create List
     : FOR    ${table}    IN    @{DEFAULT_FLOW_TABLES}
-    \    Builtin.Should Match Regexp    ${flow_dump}    .*table=${table}.*priority=0
+    \    ${rc} =    Builtin.Run Keyword And Return Status    Builtin.Should Not Match Regexp    ${flow_dump}    .*table=${table}.*priority=0
+    \    BuiltIn.Run Keyword If    ${rc}    Collections.Append To List    ${failed_table_list}    ${table}
+    [Return]    ${failed_table_list}
 
 Get Project Id
     [Arguments]    ${project_name}