#include <crm_internal.h>
#include <stdio.h>
#include <stdbool.h>
#include <ctype.h>
#include <regex.h>
#include <stdint.h>
#include <inttypes.h>
#include <glib.h>
#include <libxml/tree.h>
#include <crm/common/scheduler.h>
#include <crm/common/iso8601_internal.h>
#include <crm/common/nvpair_internal.h>
#include <crm/common/scheduler_internal.h>
#include "crmcommon_private.h"
Go to the source code of this file.
|
enum expression_type | pcmk__condition_type (const xmlNode *condition) |
|
int | pcmk__evaluate_date_spec (const xmlNode *date_spec, const crm_time_t *now) |
|
int | pcmk__unpack_duration (const xmlNode *duration, const crm_time_t *start, crm_time_t **end) |
|
int | pcmk__evaluate_date_expression (const xmlNode *date_expression, const crm_time_t *now, crm_time_t *next_change) |
|
char * | pcmk__replace_submatches (const char *string, const char *match, const regmatch_t submatches[], int nmatches) |
|
enum pcmk__comparison | pcmk__parse_comparison (const char *op) |
|
enum pcmk__type | pcmk__parse_type (const char *type, enum pcmk__comparison op, const char *value1, const char *value2) |
|
int | pcmk__cmp_by_type (const char *value1, const char *value2, enum pcmk__type type) |
|
enum pcmk__reference_source | pcmk__parse_source (const char *source) |
|
enum pcmk__combine | pcmk__parse_combine (const char *combine) |
|
int | pcmk__evaluate_attr_expression (const xmlNode *expression, const pcmk_rule_input_t *rule_input) |
|
int | pcmk__evaluate_rsc_expression (const xmlNode *rsc_expression, const pcmk_rule_input_t *rule_input) |
|
int | pcmk__evaluate_op_expression (const xmlNode *op_expression, const pcmk_rule_input_t *rule_input) |
|
int | pcmk__evaluate_condition (xmlNode *condition, const pcmk_rule_input_t *rule_input, crm_time_t *next_change) |
|
int | pcmk_evaluate_rule (xmlNode *rule, const pcmk_rule_input_t *rule_input, crm_time_t *next_change) |
| Evaluate a single rule, including all its conditions. More...
|
|
int | pcmk__evaluate_rules (xmlNode *xml, const pcmk_rule_input_t *rule_input, crm_time_t *next_change) |
|
◆ ADD_COMPONENT
#define ADD_COMPONENT |
( |
|
component | ) |
|
Value:do { \
\
"because it is invalid", \
rc = sub_rc; \
} \
} while (0)
G_GNUC_INTERNAL const char * pcmk__time_component_attr(enum pcmk__time_component component)
G_GNUC_INTERNAL int pcmk__add_time_from_xml(crm_time_t *t, enum pcmk__time_component component, const xmlNode *xml)
Definition at line 268 of file rules.c.
◆ pcmk__cmp_by_type()
int pcmk__cmp_by_type |
( |
const char * |
value1, |
|
|
const char * |
value2, |
|
|
enum pcmk__type |
type |
|
) |
| |
◆ pcmk__condition_type()
◆ pcmk__evaluate_attr_expression()
int pcmk__evaluate_attr_expression |
( |
const xmlNode * |
expression, |
|
|
const pcmk_rule_input_t * |
rule_input |
|
) |
| |
◆ pcmk__evaluate_condition()
◆ pcmk__evaluate_date_expression()
int pcmk__evaluate_date_expression |
( |
const xmlNode * |
date_expression, |
|
|
const crm_time_t * |
now, |
|
|
crm_time_t * |
next_change |
|
) |
| |
◆ pcmk__evaluate_date_spec()
int pcmk__evaluate_date_spec |
( |
const xmlNode * |
date_spec, |
|
|
const crm_time_t * |
now |
|
) |
| |
◆ pcmk__evaluate_op_expression()
int pcmk__evaluate_op_expression |
( |
const xmlNode * |
op_expression, |
|
|
const pcmk_rule_input_t * |
rule_input |
|
) |
| |
◆ pcmk__evaluate_rsc_expression()
int pcmk__evaluate_rsc_expression |
( |
const xmlNode * |
rsc_expression, |
|
|
const pcmk_rule_input_t * |
rule_input |
|
) |
| |
◆ pcmk__evaluate_rules()
◆ pcmk__parse_combine()
◆ pcmk__parse_comparison()
◆ pcmk__parse_source()
◆ pcmk__parse_type()
◆ pcmk__replace_submatches()
char* pcmk__replace_submatches |
( |
const char * |
string, |
|
|
const char * |
match, |
|
|
const regmatch_t |
submatches[], |
|
|
int |
nmatches |
|
) |
| |
◆ pcmk__unpack_duration()
◆ pcmk_evaluate_rule()
Evaluate a single rule, including all its conditions.
- Parameters
-
[in,out] | rule | XML containing a rule definition or its id-ref |
[in] | rule_input | Values used to evaluate rule criteria |
[out] | next_change | If not NULL, set to when evaluation will change |
- Returns
- Standard Pacemaker return code (
pcmk_rc_ok
if the rule is satisfied, some other value if it is not)
Definition at line 1385 of file rules.c.