Verification of OF18 current Term
[integration/test.git] / csit / libraries / ClusterManagement.robot
index feec3dd57a7acf3529ac22a38c1d5250ba08aad8..c44d0470bcd8a5300b6d32ef6fd8ef0d2413746e 100644 (file)
@@ -135,6 +135,14 @@ Get_Raft_State_Of_Shard_At_Member
     [Arguments]    ${shard_name}    ${shard_type}    ${member_index}    ${verify_restconf}=False    ${http_timeout}=5
     [Documentation]    Send request to Jolokia on indexed member, return extracted Raft status.
     ...    Optionally, check restconf works.
+    ${raft_state} =    Get_Raft_Property_From_Shard_Member    RaftState    ${shard_name}    ${shard_type}    ${member_index}    verify_restconf=${verify_restconf}
+    ...    http_timeout=${http_timeout}
+    [Return]    ${raft_state}
+
+Get_Raft_Property_From_Shard_Member
+    [Arguments]    ${property}    ${shard_name}    ${shard_type}    ${member_index}    ${verify_restconf}=False    ${http_timeout}=5
+    [Documentation]    Send request to Jolokia on indexed member, return extracted Raft property.
+    ...    Optionally, check restconf works.
     ${session} =    Resolve_Http_Session_For_Member    member_index=${member_index}
     # TODO: Does the used URI tend to generate large data which floods log.html?
     BuiltIn.Run_Keyword_If    ${verify_restconf}    TemplatedRequests.Get_As_Json_Templated    session=${session}    folder=${RESTCONF_MODULES_DIR}    verify=False    http_timeout=${http_timeout}
@@ -143,8 +151,8 @@ Get_Raft_State_Of_Shard_At_Member
     ${data_text} =    TemplatedRequests.Get_As_Json_From_Uri    uri=${uri}    session=${session}    http_timeout=${http_timeout}
     ${data_object} =    RequestsLibrary.To_Json    ${data_text}
     ${value} =    Collections.Get_From_Dictionary    ${data_object}    value
-    ${raft_state} =    Collections.Get_From_Dictionary    ${value}    RaftState
-    [Return]    ${raft_state}
+    ${raft_property} =    Collections.Get_From_Dictionary    ${value}    ${property}
+    [Return]    ${raft_property}
 
 Verify_Shard_Leader_Elected
     [Arguments]    ${shard_name}    ${shard_type}    ${new_elected}    ${old_leader}    ${member_index_list}=${EMPTY}    ${verify_restconf}=True