Upgrade RF syntax for v3.2 compatibility
[integration/test.git] / csit / suites / controller / dom_data_broker / ddb-sanity-prefix-based.robot
index ae4e782de90614388d0d3b8705916a2ba8abb9e0..0068d9464ab5174feeb66d1ddd29c0b663e220a4 100644 (file)
@@ -39,8 +39,9 @@ ${ID_PREFIX}      prefix-
 Get_Prefix_Shard_Role
     [Documentation]    Get prefix shard role.
     ${all_indices} =    ClusterManagement.List_All_Indices
-    : FOR    ${index}    IN    @{all_indices}
-    \    ${role} =    ClusterAdmin.Get_Prefix_Shard_Role    ${index}    ${PREF_BASED_SHARD}    ${SHARD_TYPE}
+    FOR    ${index}    IN    @{all_indices}
+        ${role} =    ClusterAdmin.Get_Prefix_Shard_Role    ${index}    ${PREF_BASED_SHARD}    ${SHARD_TYPE}
+    END
 
 Subscribe_Listener_To_Leader
     [Documentation]    Subscribe listener to leader.
@@ -48,7 +49,7 @@ Subscribe_Listener_To_Leader
     ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${SHARD_NAME}    shard_type=${SHARD_TYPE}    member_index_list=${all_indices}    verify_restconf=False
     MdsalLowlevel.Subscribe_Ddtl    ${leader}
     BuiltIn.Sleep    5s
-    ${copy_matches} =    MdsalLowlevel.Unsubscribe_Ddtl    ${leader}
+    ${copy_matches} =    MdsalLowlevel.Unsubscribe_Ddtl_No_Tx    ${leader}
     BuiltIn.Should_Be_True    ${copy_matches}
 
 Subscribe_Listener_To_Follower
@@ -58,7 +59,7 @@ Subscribe_Listener_To_Follower
     ${follower_idx} =    Collections.Get_From_List    ${follower_list}    ${0}
     MdsalLowlevel.Subscribe_Ddtl    ${follower_idx}
     BuiltIn.Sleep    5s
-    ${copy_matches} =    MdsalLowlevel.Unsubscribe_Ddtl    ${follower_idx}
+    ${copy_matches} =    MdsalLowlevel.Unsubscribe_Ddtl_No_Tx    ${follower_idx}
     BuiltIn.Should_Be_True    ${copy_matches}
 
 Become_Prefix_Leader
@@ -80,7 +81,7 @@ Remove_Leader_Prefix_Shard_Replica_And_Add_It_Back
     ${all_indices} =    ClusterManagement.List_All_Indices
     ${old_leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
     ClusterAdmin.Remove_Prefix_Shard_Replica    ${old_leader}    ${shard_name}    member-${old_leader}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    Verify_Shard_Replica_Removed    ${old_leader}    ${shard_name}!!    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    Verify_Shard_Replica_Not_Present    ${old_leader}    ${shard_name}!!    ${shard_type}
     ${actual_leader}    ${actual_follower_list} =    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!
     ...    verify_restconf=False    shard_type=${shard_type}    member_index_list=${follower_list}
     BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_leader}    ${actual_leader}
@@ -96,7 +97,7 @@ Remove_Follower_Prefix_Shard_Replica_And_Add_It_Back
     ${leader}    ${follower_list} =    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}!!    shard_type=${shard_type}    member_index_list=${all_indices}    verify_restconf=False
     ${follower1} =    Collections.Get_From_List    ${follower_list}    ${0}
     ClusterAdmin.Remove_Prefix_Shard_Replica    ${follower1}    ${shard_name}    member-${follower1}    ${shard_type}
-    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    DdbCommons.Verify_Shard_Replica_Removed    ${follower1}    ${shard_name}!!    ${shard_type}
+    BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    DdbCommons.Verify_Shard_Replica_Not_Present    ${follower1}    ${shard_name}!!    ${shard_type}
     ${new_indices_list} =    ClusterManagement.List_Indices_Minus_Member    ${follower1}
     ClusterManagement.Verify_Shard_Leader_Elected    ${shard_name}!!    ${shard_type}    ${False}    ${leader}    member_index_list=${new_indices_list}
     BuiltIn.Wait_Until_Keyword_Succeeds    60s    5s    ClusterAdmin.Add_Prefix_Shard_Replica    ${follower1}    ${shard_name}    ${shard_type}
@@ -111,8 +112,9 @@ Produce_Transactions_One_Node_Leader
     ${leader_ip_as_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${leader_idx_as_list}
     MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes    ${leader_ip_as_list}    ${leader_idx_as_list}    ${ID_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
-    : FOR    ${resp}    IN    @{resp_list}
-    \    TemplatedRequests.Check_Status_Code    ${resp}
+    FOR    ${resp}    IN    @{resp_list}
+        TemplatedRequests.Check_Status_Code    @{resp}[2]
+    END
 
 Produce_Transactions_One_Node_Follower
     [Documentation]    Produce transactions.
@@ -123,8 +125,9 @@ Produce_Transactions_One_Node_Follower
     ${follower_ip_as_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${follower_idx_as_list}
     MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes    ${follower_ip_as_list}    ${follower_idx_as_list}    ${ID_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
-    : FOR    ${resp}    IN    @{resp_list}
-    \    TemplatedRequests.Check_Status_Code    ${resp}
+    FOR    ${resp}    IN    @{resp_list}
+        TemplatedRequests.Check_Status_Code    @{resp}[2]
+    END
 
 Produce_Transactions
     [Documentation]    Produce transactions.
@@ -132,5 +135,6 @@ Produce_Transactions
     ${all_ip_list} =    ClusterManagement.Resolve_IP_Address_For_Members    ${all_indices}
     MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes    ${all_ip_list}    ${all_indices}    ${ID_PREFIX}    ${DURATION}    ${TRANSACTION_RATE_1K}
     ${resp_list} =    MdsalLowlevelPy.Wait_For_Transactions
-    : FOR    ${resp}    IN    @{resp_list}
-    \    TemplatedRequests.Check_Status_Code    ${resp}
+    FOR    ${resp}    IN    @{resp_list}
+        TemplatedRequests.Check_Status_Code    @{resp}[2]
+    END