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

Function append_parent_colocation

pengine/clone.c:454–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454static void
455append_parent_colocation(resource_t * rsc, resource_t * child, gboolean all)
456{
457
458 GListPtr gIter = NULL;
459
460 gIter = rsc->rsc_cons;
461 for (; gIter != NULL; gIter = gIter->next) {
462 rsc_colocation_t *cons = (rsc_colocation_t *) gIter->data;
463
464 if (all || cons->score < 0 || cons->score == INFINITY) {
465 child->rsc_cons = g_list_prepend(child->rsc_cons, cons);
466 }
467 }
468
469 gIter = rsc->rsc_cons_lhs;
470 for (; gIter != NULL; gIter = gIter->next) {
471 rsc_colocation_t *cons = (rsc_colocation_t *) gIter->data;
472
473 if (all || cons->score < 0) {
474 child->rsc_cons_lhs = g_list_prepend(child->rsc_cons_lhs, cons);
475 }
476 }
477}
478
479node_t *
480clone_color(resource_t * rsc, node_t * prefer, pe_working_set_t * data_set)

Callers 1

color_instanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected