MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / find_actions

Function find_actions

lib/pengine/utils.c:1038–1071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036}
1037
1038GListPtr
1039find_actions(GListPtr input, const char *key, node_t * on_node)
1040{
1041 GListPtr gIter = input;
1042 GListPtr result = NULL;
1043
1044 CRM_CHECK(key != NULL, return NULL);
1045
1046 for (; gIter != NULL; gIter = gIter->next) {
1047 action_t *action = (action_t *) gIter->data;
1048
1049 crm_trace("Matching %s against %s", key, action->uuid);
1050 if (safe_str_neq(key, action->uuid)) {
1051 continue;
1052
1053 } else if (on_node == NULL) {
1054 result = g_list_prepend(result, action);
1055
1056 } else if (action->node == NULL) {
1057 /* skip */
1058 crm_trace("While looking for %s action on %s, "
1059 "found an unallocated one. Assigning"
1060 " it to the requested node...", key, on_node->details->uname);
1061
1062 action->node = node_copy(on_node);
1063 result = g_list_prepend(result, action);
1064
1065 } else if (on_node->details == action->node->details) {
1066 result = g_list_prepend(result, action);
1067 }
1068 }
1069
1070 return result;
1071}
1072
1073GListPtr
1074find_actions_exact(GListPtr input, const char *key, node_t * on_node)

Callers 12

custom_actionFunction · 0.85
get_pseudo_opFunction · 0.85
process_rsc_stateFunction · 0.85
native_assign_nodeFunction · 0.85
stage6Function · 0.85
find_actions_by_taskFunction · 0.85
find_rsc_actionFunction · 0.85
RecurringOp_StoppedFunction · 0.85
native.cFile · 0.85
native_stop_constraintsFunction · 0.85
at_stack_bottomFunction · 0.85
get_first_named_actionFunction · 0.85

Calls 2

safe_str_neqFunction · 0.85
node_copyFunction · 0.85

Tested by

no test coverage detected