1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_PENGINE_RULES_COMPAT__H
11 # define PCMK__CRM_PENGINE_RULES_COMPAT__H
12
13 #include <glib.h>
14 #include <libxml/tree.h>
15 #include <crm/common/iso8601.h>
16 #include <crm/pengine/pe_types.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22
23
24
25
26
27
28
29
30
31
32 gboolean pe_evaluate_rules(xmlNode *ruleset, GHashTable *node_hash,
33 crm_time_t *now, crm_time_t *next_change);
34
35
36 gboolean pe_eval_rules(xmlNode *ruleset, const pe_rule_eval_data_t *rule_data,
37 crm_time_t *next_change);
38
39
40 gboolean test_ruleset(xmlNode *ruleset, GHashTable *node_hash, crm_time_t *now);
41
42
43 gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role,
44 crm_time_t *now);
45
46
47 gboolean pe_test_rule(xmlNode *rule, GHashTable *node_hash,
48 enum rsc_role_e role, crm_time_t *now,
49 crm_time_t *next_change, pe_match_data_t *match_data);
50
51
52 gboolean pe_test_rule_re(xmlNode *rule, GHashTable *node_hash,
53 enum rsc_role_e role, crm_time_t *now,
54 pe_re_match_data_t *re_match_data);
55
56
57 gboolean pe_test_rule_full(xmlNode *rule, GHashTable *node_hash,
58 enum rsc_role_e role, crm_time_t *now,
59 pe_match_data_t *match_data);
60
61
62 gboolean pe_test_expression(xmlNode *expr, GHashTable *node_hash,
63 enum rsc_role_e role, crm_time_t *now,
64 crm_time_t *next_change,
65 pe_match_data_t *match_data);
66
67
68 gboolean test_expression(xmlNode *expr, GHashTable *node_hash,
69 enum rsc_role_e role, crm_time_t *now);
70
71
72 gboolean pe_test_expression_re(xmlNode *expr, GHashTable *node_hash,
73 enum rsc_role_e role, crm_time_t *now,
74 pe_re_match_data_t *re_match_data);
75
76
77 gboolean pe_test_expression_full(xmlNode *expr, GHashTable *node_hash,
78 enum rsc_role_e role,
79 crm_time_t *now, pe_match_data_t *match_data);
80
81
82 gboolean pe_eval_expr(xmlNode *rule, const pe_rule_eval_data_t *rule_data,
83 crm_time_t *next_change);
84
85
86 gboolean pe_eval_subexpr(xmlNode *expr, const pe_rule_eval_data_t *rule_data,
87 crm_time_t *next_change);
88
89
90 void unpack_instance_attributes(xmlNode *top, xmlNode *xml_obj,
91 const char *set_name, GHashTable *node_hash,
92 GHashTable *hash, const char *always_first,
93 gboolean overwrite, crm_time_t *now);
94
95
96 enum expression_type find_expression_type(xmlNode *expr);
97
98
99 char *pe_expand_re_matches(const char *string,
100 const pe_re_match_data_t *match_data);
101
102 #ifdef __cplusplus
103 }
104 #endif
105
106 #endif