| 1325 | } |
| 1326 | |
| 1327 | void |
| 1328 | clone_expand(resource_t * rsc, pe_working_set_t * data_set) |
| 1329 | { |
| 1330 | GListPtr gIter = NULL; |
| 1331 | clone_variant_data_t *clone_data = NULL; |
| 1332 | |
| 1333 | get_clone_variant_data(clone_data, rsc); |
| 1334 | |
| 1335 | gIter = rsc->actions; |
| 1336 | for (; gIter != NULL; gIter = gIter->next) { |
| 1337 | action_t *op = (action_t *) gIter->data; |
| 1338 | |
| 1339 | rsc->cmds->action_flags(op, NULL); |
| 1340 | } |
| 1341 | |
| 1342 | if (clone_data->start_notify) { |
| 1343 | collect_notification_data(rsc, TRUE, TRUE, clone_data->start_notify); |
| 1344 | expand_notification_data(clone_data->start_notify); |
| 1345 | create_notifications(rsc, clone_data->start_notify, data_set); |
| 1346 | } |
| 1347 | |
| 1348 | if (clone_data->stop_notify) { |
| 1349 | collect_notification_data(rsc, TRUE, TRUE, clone_data->stop_notify); |
| 1350 | expand_notification_data(clone_data->stop_notify); |
| 1351 | create_notifications(rsc, clone_data->stop_notify, data_set); |
| 1352 | } |
| 1353 | |
| 1354 | if (clone_data->promote_notify) { |
| 1355 | collect_notification_data(rsc, TRUE, TRUE, clone_data->promote_notify); |
| 1356 | expand_notification_data(clone_data->promote_notify); |
| 1357 | create_notifications(rsc, clone_data->promote_notify, data_set); |
| 1358 | } |
| 1359 | |
| 1360 | if (clone_data->demote_notify) { |
| 1361 | collect_notification_data(rsc, TRUE, TRUE, clone_data->demote_notify); |
| 1362 | expand_notification_data(clone_data->demote_notify); |
| 1363 | create_notifications(rsc, clone_data->demote_notify, data_set); |
| 1364 | } |
| 1365 | |
| 1366 | /* Now that the notifcations have been created we can expand the children */ |
| 1367 | |
| 1368 | gIter = rsc->children; |
| 1369 | for (; gIter != NULL; gIter = gIter->next) { |
| 1370 | resource_t *child_rsc = (resource_t *) gIter->data; |
| 1371 | |
| 1372 | child_rsc->cmds->expand(child_rsc, data_set); |
| 1373 | } |
| 1374 | |
| 1375 | native_expand(rsc, data_set); |
| 1376 | |
| 1377 | /* The notifications are in the graph now, we can destroy the notify_data */ |
| 1378 | free_notification_data(clone_data->demote_notify); |
| 1379 | clone_data->demote_notify = NULL; |
| 1380 | free_notification_data(clone_data->stop_notify); |
| 1381 | clone_data->stop_notify = NULL; |
| 1382 | free_notification_data(clone_data->start_notify); |
| 1383 | clone_data->start_notify = NULL; |
| 1384 | free_notification_data(clone_data->promote_notify); |
nothing calls this directly
no test coverage detected