Check for all default tables before failure 95/74295/5
authorFaseela K <faseela.k@ericsson.com>
Fri, 20 Jul 2018 15:53:12 +0000 (21:23 +0530)
committerFaseela K <faseela.k@ericsson.com>
Thu, 26 Jul 2018 11:46:33 +0000 (17:16 +0530)
JIRA: INTTEST-51

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

index 5985b45b18da82c2b07cd2985f4dfecbdf099d09..3c8cd6d05a15be772d887115800df5bcafe5d1c4 100644 (file)
@@ -1102,18 +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}
-    ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}
-    Utils.Log Content    ${resp.content}
+    ${failed_table_list}    BuiltIn.Create List
     : FOR    ${table}    IN    @{DEFAULT_FLOW_TABLES}
-    \    Builtin.Should Match Regexp    ${flow_dump}    .*table=${table}.*priority=0
+    \    Builtin.Run Keyword And Ignore Error    ${rc}    Builtin.Should Match Regexp    ${flow_dump}    .*table=${table}.*priority=0
+    \    BuiltIn.Run Keyword If    ${rc} == "FAIL"    Collections.Append To List    ${failed_table_list}    ${table}
+    [Return]    ${failed_table_list}
 
 Get Project Id
     [Arguments]    ${project_name}