Always add exceptions.txt
[integration/test.git] / csit / libraries / OpenStackOperations.robot
index 9fc431d06f1b7eaeda44f503df17645206f279b0..835089748a3c01b80380bad3b16c28502b88814c 100644 (file)
@@ -548,11 +548,11 @@ Get OvsDebugInfo
     \    OpenStackOperations.Get DumpFlows And Ovsconfig    ${conn_id}
 
 Get Test Teardown Debugs
-    [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}
+    [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}    ${fail}=${FAIL_ON_EXCEPTIONS}
     OpenStackOperations.Get OvsDebugInfo
     BuiltIn.Run Keyword And Ignore Error    DataModels.Get Model Dump    ${HA_PROXY_IP}    ${netvirt_data_models}
     BuiltIn.run Keyword And Ignore Error    ODLTools.Get EOS    ${HA_PROXY_IP}
-    Run Keyword If    "${FAIL_ON_EXCEPTIONS}"=="True"    KarafKeywords.Fail If Exceptions Found During Test    ${test_name}
+    KarafKeywords.Fail If Exceptions Found During Test    ${test_name}    fail=${fail}
 
 Get Test Teardown Debugs For SFC
     [Arguments]    ${test_name}=${TEST_NAME}
@@ -1102,16 +1102,25 @@ Get Network Segmentation Id
 Verify Expected Default Tables On Nodes
     [Arguments]    ${node_ips}=@{OS_ALL_IPS}
     [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}
     [Documentation]    Verify if Default Table Entries are programmed on specific Node
     ${flow_dump} =    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenFlow13    ${DEFAULT_LINUX_PROMPT_STRICT}
     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}