Change ddb reboot suites to set and expect false
[integration/test.git] / csit / libraries / controller / DdbCommons.robot
index 10c80292998f6af65ccd0a95ed02cb72b69ee5cd..e3da9a4ebad9f5309c4a58a1dc5c989e93a959d4 100644 (file)
@@ -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.