| 982 | } |
| 983 | |
| 984 | enum action_tasks |
| 985 | get_complex_task(resource_t * rsc, const char *name, gboolean allow_non_atomic) |
| 986 | { |
| 987 | enum action_tasks task = text2task(name); |
| 988 | |
| 989 | if (rsc == NULL) { |
| 990 | return task; |
| 991 | |
| 992 | } else if (allow_non_atomic == FALSE || rsc->variant == pe_native) { |
| 993 | switch (task) { |
| 994 | case stopped_rsc: |
| 995 | case started_rsc: |
| 996 | case action_demoted: |
| 997 | case action_promoted: |
| 998 | crm_trace("Folding %s back into its atomic counterpart for %s", name, rsc->id); |
| 999 | return task - 1; |
| 1000 | break; |
| 1001 | default: |
| 1002 | break; |
| 1003 | } |
| 1004 | } |
| 1005 | return task; |
| 1006 | } |
| 1007 | |
| 1008 | action_t * |
| 1009 | find_first_action(GListPtr input, const char *uuid, const char *task, node_t * on_node) |
no test coverage detected