[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}
${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