pacemaker  2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
rules_compat.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2021 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
16 #include <crm/pengine/pe_types.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
31 gboolean test_ruleset(xmlNode *ruleset, GHashTable *node_hash, crm_time_t *now);
33 
35 gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role,
36  crm_time_t *now);
37 
39 gboolean pe_test_rule_re(xmlNode *rule, GHashTable *node_hash,
40  enum rsc_role_e role, crm_time_t *now,
41  pe_re_match_data_t *re_match_data);
42 
44 gboolean pe_test_rule_full(xmlNode *rule, GHashTable *node_hash,
45  enum rsc_role_e role, crm_time_t *now,
46  pe_match_data_t *match_data);
47 
49 gboolean test_expression(xmlNode *expr, GHashTable *node_hash,
50  enum rsc_role_e role, crm_time_t *now);
51 
53 gboolean pe_test_expression_re(xmlNode *expr, GHashTable *node_hash,
54  enum rsc_role_e role, crm_time_t *now,
55  pe_re_match_data_t *re_match_data);
56 
58 gboolean pe_test_expression_full(xmlNode *expr, GHashTable *node_hash,
59  enum rsc_role_e role,
60  crm_time_t *now, pe_match_data_t *match_data);
61 
63 void unpack_instance_attributes(xmlNode *top, xmlNode *xml_obj,
64  const char *set_name, GHashTable *node_hash,
65  GHashTable *hash, const char *always_first,
66  gboolean overwrite, crm_time_t *now);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif // PCMK__CRM_PENGINE_RULES_COMPAT__H
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:1390
struct crm_time_s crm_time_t
Definition: iso8601.h:32
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:1366
gboolean test_expression(xmlNode *expr, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now)
Definition: rules.c:1373
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:1355
ISO_8601 Date handling.
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:1379
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:1398
gboolean test_ruleset(xmlNode *ruleset, GHashTable *node_hash, crm_time_t *now)
Definition: rules.c:1343
rsc_role_e
Possible roles that a resource can be in.
Definition: common.h:92
gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now)
Definition: rules.c:1349
Data types for cluster status.