1
2
3
4
5
6
7
8
9 #ifndef RULES_INTERNAL_H
10 #define RULES_INTERNAL_H
11
12 #include <glib.h>
13 #include <libxml/tree.h>
14
15 #include <crm/common/iso8601.h>
16 #include <crm/pengine/common.h>
17 #include <crm/pengine/rules.h>
18
19 GListPtr pe_unpack_alerts(xmlNode *alerts);
20 void pe_free_alert_list(GListPtr alert_list);
21
22 crm_time_t *pe_parse_xml_duration(crm_time_t * start, xmlNode * duration_spec);
23
24 gboolean pe__eval_attr_expr(xmlNode *expr, pe_rule_eval_data_t *rule_data);
25 int pe__eval_date_expr(xmlNode *expr, pe_rule_eval_data_t *rule_data,
26 crm_time_t *next_change);
27 gboolean pe__eval_op_expr(xmlNodePtr expr, pe_rule_eval_data_t *rule_data);
28 gboolean pe__eval_role_expr(xmlNode *expr, pe_rule_eval_data_t *rule_data);
29 gboolean pe__eval_rsc_expr(xmlNodePtr expr, pe_rule_eval_data_t *rule_data);
30
31 int pe_eval_date_expression(xmlNode *time_expr,
32 crm_time_t *now,
33 crm_time_t *next_change);
34 gboolean pe_test_date_expression(xmlNode *time_expr, crm_time_t *now,
35 crm_time_t *next_change);
36 int pe_cron_range_satisfied(crm_time_t * now, xmlNode * cron_spec);
37 gboolean pe_test_attr_expression(xmlNode *expr, GHashTable *hash, crm_time_t *now,
38 pe_match_data_t *match_data);
39 gboolean pe_test_role_expression(xmlNode * expr, enum rsc_role_e role, crm_time_t * now);
40
41 #endif