pacemaker 2.1.8-2.1.8
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
rules_compat.h
Go to the documentation of this file.
1/*
2 * Copyright 2004-2024 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
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> // xmlNode
15#include <crm/common/iso8601.h> // crm_time_t
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
32gboolean pe_evaluate_rules(xmlNode *ruleset, GHashTable *node_hash,
33 crm_time_t *now, crm_time_t *next_change);
34
36gboolean pe_eval_rules(xmlNode *ruleset, const pe_rule_eval_data_t *rule_data,
37 crm_time_t *next_change);
38
40gboolean test_ruleset(xmlNode *ruleset, GHashTable *node_hash, crm_time_t *now);
41
43gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role,
44 crm_time_t *now);
45
47gboolean 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
52gboolean 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
57gboolean 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
62gboolean 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
68gboolean test_expression(xmlNode *expr, GHashTable *node_hash,
69 enum rsc_role_e role, crm_time_t *now);
70
72gboolean 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
77gboolean 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
82gboolean pe_eval_expr(xmlNode *rule, const pe_rule_eval_data_t *rule_data,
83 crm_time_t *next_change);
84
86gboolean pe_eval_subexpr(xmlNode *expr, const pe_rule_eval_data_t *rule_data,
87 crm_time_t *next_change);
88
90void 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
96enum expression_type find_expression_type(xmlNode *expr);
97
99char *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 // PCMK__CRM_PENGINE_RULES_COMPAT__H
expression_type
Definition rules.h:33
ISO_8601 Date handling.
struct crm_time_s crm_time_t
Definition iso8601.h:32
Data types for cluster status.
rsc_role_e
Definition roles.h:34
gboolean pe_test_rule_re(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now, pe_re_match_data_t *re_match_data)
Definition rules.c:350
enum expression_type find_expression_type(xmlNode *expr)
Definition rules.c:455
gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now)
Definition rules.c:344
char * pe_expand_re_matches(const char *string, const pe_re_match_data_t *match_data)
Definition rules.c:461
gboolean pe_test_expression_full(xmlNode *expr, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now, pe_match_data_t *match_data)
Definition rules.c:408
gboolean pe_test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now, crm_time_t *next_change, pe_match_data_t *match_data)
Definition rules.c:316
gboolean pe_evaluate_rules(xmlNode *ruleset, GHashTable *node_hash, crm_time_t *now, crm_time_t *next_change)
Definition rules.c:304
gboolean test_expression(xmlNode *expr, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now)
Definition rules.c:391
gboolean pe_eval_subexpr(xmlNode *expr, const pe_rule_eval_data_t *rule_data, crm_time_t *next_change)
Definition rules.c:426
gboolean pe_test_rule_full(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now, pe_match_data_t *match_data)
Definition rules.c:361
gboolean pe_eval_rules(xmlNode *ruleset, const pe_rule_eval_data_t *rule_data, crm_time_t *next_change)
Definition rules.c:293
void unpack_instance_attributes(xmlNode *top, xmlNode *xml_obj, const char *set_name, GHashTable *node_hash, GHashTable *hash, const char *always_first, gboolean overwrite, crm_time_t *now)
Definition rules.c:437
gboolean pe_test_expression(xmlNode *expr, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now, crm_time_t *next_change, pe_match_data_t *match_data)
Definition rules.c:368
gboolean pe_test_expression_re(xmlNode *expr, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now, pe_re_match_data_t *re_match_data)
Definition rules.c:397
gboolean pe_eval_expr(xmlNode *rule, const pe_rule_eval_data_t *rule_data, crm_time_t *next_change)
Definition rules.c:416
gboolean test_ruleset(xmlNode *ruleset, GHashTable *node_hash, crm_time_t *now)
Definition rules.c:338