Allow coe to use single suite
[integration/test.git] / csit / libraries / controller / DdbCommons.robot
index 10c80292998f6af65ccd0a95ed02cb72b69ee5cd..9db3aab59804548a2f1d35eeb382138dd7ae7d4b 100644 (file)
@@ -145,7 +145,7 @@ Leader_Isolation_Test_Templ
     ClusterManagement.Isolate_Member_From_List_Or_All    ${leader}
     ${li_isolated}    BuiltIn.Set_Variable    ${True}
     BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}    ${shard_type}    ${True}
-    ...    ${leader}    member_index_list=${follower_list}
+    ...    ${leader}    member_index_list=${follower_list}    verify_restconf=False
     ${heal_date} =    DateTime.Add_Time_To_Date    ${date_start}    ${heal_timeout}
     ${sleep_to_heal} =    Get_Seconds_To_Time    ${heal_date}
     ${resp} =    MdsalLowlevelPy.Get_Next_Transactions_Response
@@ -178,7 +178,7 @@ Leader_Isolation_PrefBasedShard_Test_Templ
     ClusterManagement.Isolate_Member_From_List_Or_All    ${leader}
     ${li_isolated}    BuiltIn.Set_Variable    ${True}
     BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}!!    ${shard_type}    ${True}
-    ...    ${leader}    member_index_list=${follower_list}
+    ...    ${leader}    member_index_list=${follower_list}    verify_restconf=False
     ${heal_date} =    DateTime.Add_Time_To_Date    ${date_start}    ${heal_timeout}
     ${sleep_to_heal} =    Get_Seconds_To_Time    ${heal_date}
     ${resp} =    MdsalLowlevelPy.Get_Next_Transactions_Response
@@ -377,8 +377,8 @@ Verify_Shard_Replica_Not_Present
     BuiltIn.Should_Contain    ${text}    "status":404    javax.management.InstanceNotFoundException
 
 Restart_Test_Templ
-    [Documentation]    Kill every odl node and start again.
-    ClusterManagement.Kill_Members_From_List_Or_All
+    [Documentation]    Stop every odl node and start again.
+    ClusterManagement.Stop_Members_From_List_Or_All
     ClusterManagement.Clean_Directories_On_List_Or_All    tmp_dir=/tmp
     ClusterManagement.Start_Members_From_List_Or_All
     BuiltIn.Wait_Until_Keyword_Succeeds    300s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}    verify_restconf=True
@@ -390,3 +390,12 @@ Check_Status_Of_First_Response
     # @{resp_list}[0][2] does not work
     ${tuple} =    BuiltIn.Set_Variable    @{resp_list}[0]
     TemplatedRequests.Check_Status_Code    @{tuple}[2]
+
+Change_Use_Tell_Based_Protocol
+    [Arguments]    ${status}    ${DATASTORE_CFG}
+    [Documentation]    Change status use-tell-based-protocol to True or False
+    ClusterManagement.Check_Bash_Command_On_List_Or_All    sed -ie "s/^#use-tell-based-protocol=true/use-tell-based-protocol=true/g" ${DATASTORE_CFG}
+    ClusterManagement.Check_Bash_Command_On_List_Or_All    sed -ie "s/^#use-tell-based-protocol=false/use-tell-based-protocol=false/g" ${DATASTORE_CFG}
+    BuiltIn.Run_Keyword_And_Return_If    "${status}" == "True"    ClusterManagement.Check_Bash_Command_On_List_Or_All    sed -ie "s/^use-tell-based-protocol=false/use-tell-based-protocol=true/g" ${DATASTORE_CFG}
+    BuiltIn.Run_Keyword_And_Return_If    "${status}" == "False"    ClusterManagement.Check_Bash_Command_On_List_Or_All    sed -ie "s/^use-tell-based-protocol=true/use-tell-based-protocol=false/g" ${DATASTORE_CFG}
+    BuiltIn.Fail    Failure in status. Status can be True or False.