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

Function test_ruleset

lib/pengine/rules.c:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36gboolean test_role_expression(xmlNode * expr, enum rsc_role_e role, crm_time_t * now);
37
38gboolean
39test_ruleset(xmlNode * ruleset, GHashTable * node_hash, crm_time_t * now)
40{
41 gboolean ruleset_default = TRUE;
42 xmlNode *rule = NULL;
43
44 for (rule = __xml_first_child(ruleset); rule != NULL; rule = __xml_next(rule)) {
45 if (crm_str_eq((const char *)rule->name, XML_TAG_RULE, TRUE)) {
46 ruleset_default = FALSE;
47 if (test_rule(rule, node_hash, RSC_ROLE_UNKNOWN, now)) {
48 return TRUE;
49 }
50 }
51 }
52
53 return ruleset_default;
54}
55
56gboolean
57test_rule(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now)

Callers 3

print_cts_constraintsFunction · 0.85
unpack_attr_setFunction · 0.85
unpack_constraintsFunction · 0.85

Calls 4

__xml_first_childFunction · 0.85
__xml_nextFunction · 0.85
crm_str_eqFunction · 0.85
test_ruleFunction · 0.85

Tested by

no test coverage detected