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

Function get_pseudo_op

lib/pengine/utils.c:1474–1497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1472}
1473
1474action_t *
1475get_pseudo_op(const char *name, pe_working_set_t * data_set)
1476{
1477 action_t *op = NULL;
1478 const char *op_s = name;
1479 GListPtr possible_matches = NULL;
1480
1481 possible_matches = find_actions(data_set->actions, name, NULL);
1482 if (possible_matches != NULL) {
1483 if (g_list_length(possible_matches) > 1) {
1484 pe_warn("Action %s exists %d times", name, g_list_length(possible_matches));
1485 }
1486
1487 op = g_list_nth_data(possible_matches, 0);
1488 g_list_free(possible_matches);
1489
1490 } else {
1491 op = custom_action(NULL, strdup(op_s), op_s, NULL, TRUE, TRUE, data_set);
1492 set_bit(op->flags, pe_action_pseudo);
1493 set_bit(op->flags, pe_action_runnable);
1494 }
1495
1496 return op;
1497}
1498
1499void
1500destroy_ticket(gpointer data)

Callers 8

process_orphan_resourceFunction · 0.85
probe_resourcesFunction · 0.85
stage6Function · 0.85
order_rsc_setsFunction · 0.85
native_start_constraintsFunction · 0.85
MigrateRscFunction · 0.85

Calls 2

find_actionsFunction · 0.85
custom_actionFunction · 0.85

Tested by

no test coverage detected