Fix for OPNFLWPLUG-1022 requires Topology Manager
[integration/test.git] / csit / suites / openflowplugin / EntityOwnership / 030_Cluster_Sync_Problems.robot
index 4d11c728d63e58f5e774bb87767e152fc24e4787..7b979deb2d54c800e0e1002611c0dc102c1efffe 100644 (file)
@@ -17,8 +17,7 @@ Library           Collections
 
 *** Variables ***
 ${SWITCHES}       1
-# this is for mininet 2.2.1 ${START_CMD}    sudo mn --controller=remote,ip=${ODL_SYSTEM_1_IP} --controller=remote,ip=${ODL_SYSTEM_2_IP} --controller=remote,ip=${ODL_SYSTEM_3_IP} --topo linear,${SWITCHES} --switch ovsk,protocols=OpenFlow13
-${START_CMD}      sudo mn --topo linear,${SWITCHES} --switch ovsk,protocols=OpenFlow13
+${START_CMD}      sudo mn --topo linear,${SWITCHES}
 @{CONTROLLER_NODES}    ${ODL_SYSTEM_1_IP}    ${ODL_SYSTEM_2_IP}    ${ODL_SYSTEM_3_IP}
 @{cntls_idx_list}    ${1}    ${2}    ${3}
 
@@ -59,7 +58,7 @@ Switches Still Be Connected To All Nodes
 Stop Mininet And Verify No Owners
     [Template]    NONE
     Utils.Stop Mininet
-    BuiltIn.Wait Until Keyword Succeeds    15x    1s    Check No Owners In Controller
+    BuiltIn.Wait Until Keyword Succeeds    15x    1s    Check No Device Owners In Controller
     [Teardown]    Report_Failure_Due_To_Bug    6177
 
 *** Keywords ***
@@ -82,6 +81,7 @@ Check All Switches Connected To All Cluster Nodes
 Isolating Node Scenario
     [Arguments]    ${switch_name}
     [Documentation]    Disconnect and connect owner and successor and check switch data to be consistent
+    BuiltIn.Set Test Variable    ${isol_node}    ${Empty}
     ${idx}=    BuiltIn.Evaluate    str("${switch_name}"[1:])
     BuiltIn.Set Test Variable    ${idx}
     Isolate Switchs Old Owner    ${switch_name}
@@ -92,7 +92,6 @@ Isolating Node Scenario
 
 Isolate Switchs Old Owner
     [Arguments]    ${switch_name}
-    BuiltIn.Set Test Variable    ${isol_node}    ${Empty}
     ${old_owner}    ${old_successors}=    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:${idx}    ${active_member}
     ${old_master}=    BuiltIn.Set Variable    ${ODL_SYSTEM_${old_owner}_IP}
     ${active_member}=    Collections.Get From List    ${old_successors}    0
@@ -117,7 +116,6 @@ Rejoin Switchs Old Owner
     ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event
     ${new_owner}    ${new_successors}=    BuiltIn.Wait Until Keyword Succeeds    6x    10s    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:${idx}
     ...    ${active_member}
-    BuiltIn.Should Be Equal    ${owner}    ${new_owner}
 
 Isolate Switchs Successor
     [Arguments]    ${switch_name}
@@ -125,13 +123,12 @@ Isolate Switchs Successor
     ${old_successor}=    Collections.Get From List    ${old_successors}    0
     ${old_slave}=    BuiltIn.Set Variable    ${ODL_SYSTEM_${old_successor}_IP}
     Isolate Controller From The Cluster    ${old_successor}
-    BuiltIn.Set Test Variable    ${isol_cntl}    ${old_slave}
+    BuiltIn.Set Test Variable    ${isol_node}    ${old_successor}
     ${tmp_candidates}=    BuiltIn.Create List    @{ClusterManagement__member_index_list}
     Collections.Remove Values From List    ${tmp_candidates}    ${old_successor}
     ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event    ${tmp_candidates}
     ${owner}    ${successors}=    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:${idx}    ${active_member}    ${tmp_candidates}
     BuiltIn.Should Be Equal    ${owner}    ${old_owner}
-    BuiltIn.Should Be Equal As Strings    ${new_master}    ${ODL_SYSTEM_${owner}_IP}
     BuiltIn.Set Test Variable    ${old_owner}
     BuiltIn.Set Test Variable    ${old_successors}
     BuiltIn.Set Test Variable    ${old_successor}
@@ -145,7 +142,6 @@ Rejoin Switchs Successor
     ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event
     ${new_owner}    ${new_successors}=    BuiltIn.Wait Until Keyword Succeeds    6x    10s    ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device    openflow:${idx}
     ...    ${active_member}
-    BuiltIn.Should Be Equal    ${old_owner}    ${new_owner}
 
 Rejoin Controller To The Cluster
     [Arguments]    ${isolated_node}
@@ -157,11 +153,14 @@ Isolate Controller From The Cluster
     ClusterManagement.Isolate Member From List Or All    ${isolated_node}
     [Teardown]    SSHLibrary.Switch Connection    ${mininet_conn_id}
 
-Check No Owners In Controller
+Check No Device Owners In Controller
     [Documentation]    Check there is no owners in controllers
     ${session} =    Resolve_Http_Session_For_Member    member_index=${active_member}
     ${data} =    TemplatedRequests.Get_As_Json_From_Uri    uri=${ENTITY_OWNER_URI}    session=${session}
-    BuiltIn.Should Not Contain    ${data}    member
+    #ofp-topology-manager entity is introduced in the OPNFLWPLUG-1022 bug fix, and this entity will
+    #always be present in the EOS output. All 3 controller nodes will be candidate, so EOS output will
+    #contain 3 members.
+    BuiltIn.Should Contain X Times    ${data}    member    3
 
 Verify New Master Controller Node
     [Arguments]    ${switch_name}    ${old_master}