| 382 | } |
| 383 | |
| 384 | enum pe_action_flags |
| 385 | group_action_flags(action_t * action, node_t * node) |
| 386 | { |
| 387 | GListPtr gIter = NULL; |
| 388 | enum pe_action_flags flags = (pe_action_optional | pe_action_runnable | pe_action_pseudo); |
| 389 | |
| 390 | for (gIter = action->rsc->children; gIter != NULL; gIter = gIter->next) { |
| 391 | resource_t *child = (resource_t *) gIter->data; |
| 392 | enum action_tasks task = get_complex_task(child, action->task, TRUE); |
| 393 | const char *task_s = task2text(task); |
| 394 | action_t *child_action = find_first_action(child->actions, NULL, task_s, node); |
| 395 | |
| 396 | if (child_action) { |
| 397 | enum pe_action_flags child_flags = child->cmds->action_flags(child_action, node); |
| 398 | |
| 399 | if (is_set(flags, pe_action_optional) |
| 400 | && is_set(child_flags, pe_action_optional) == FALSE) { |
| 401 | pe_rsc_trace(action->rsc, "%s is manditory because of %s", action->uuid, child_action->uuid); |
| 402 | clear_bit(flags, pe_action_optional); |
| 403 | pe_clear_action_bit(action, pe_action_optional); |
| 404 | } |
| 405 | if (safe_str_neq(task_s, action->task) |
| 406 | && is_set(flags, pe_action_runnable) |
| 407 | && is_set(child_flags, pe_action_runnable) == FALSE) { |
| 408 | pe_rsc_trace(action->rsc, "%s is not runnable because of %s", action->uuid, child_action->uuid); |
| 409 | clear_bit(flags, pe_action_runnable); |
| 410 | pe_clear_action_bit(action, pe_action_runnable); |
| 411 | } |
| 412 | |
| 413 | } else if (task != stop_rsc) { |
| 414 | pe_rsc_trace(action->rsc, "%s is not runnable because of %s (not found in %s)", action->uuid, task_s, |
| 415 | child->id); |
| 416 | clear_bit(flags, pe_action_runnable); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | return flags; |
| 421 | } |
| 422 | |
| 423 | enum pe_graph_flags |
| 424 | group_update_actions(action_t * first, action_t * then, node_t * node, enum pe_action_flags flags, |
nothing calls this directly
no test coverage detected