| 144 | } |
| 145 | |
| 146 | static action_t * |
| 147 | rsc_expand_action(action_t * action) |
| 148 | { |
| 149 | action_t *result = action; |
| 150 | |
| 151 | if (action->rsc && action->rsc->variant >= pe_group) { |
| 152 | /* Expand 'start' -> 'started' */ |
| 153 | char *uuid = NULL; |
| 154 | gboolean notify = FALSE; |
| 155 | |
| 156 | if (action->rsc->parent == NULL) { |
| 157 | /* Only outter-most resources have notification actions */ |
| 158 | notify = is_set(action->rsc->flags, pe_rsc_notify); |
| 159 | } |
| 160 | |
| 161 | uuid = convert_non_atomic_uuid(action->uuid, action->rsc, notify, FALSE); |
| 162 | if (uuid) { |
| 163 | pe_rsc_trace(action->rsc, "Converting %s to %s %d", action->uuid, uuid, |
| 164 | is_set(action->rsc->flags, pe_rsc_notify)); |
| 165 | result = find_first_action(action->rsc->actions, uuid, NULL, NULL); |
| 166 | if (result == NULL) { |
| 167 | crm_err("Couldn't expand %s", action->uuid); |
| 168 | result = action; |
| 169 | } |
| 170 | free(uuid); |
| 171 | } |
| 172 | } |
| 173 | return result; |
| 174 | } |
| 175 | |
| 176 | static enum pe_graph_flags |
| 177 | graph_update_action(action_t * first, action_t * then, node_t * node, enum pe_action_flags flags, |
no test coverage detected