pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
Macros
pcmk_evaluate_rule_test.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <glib.h>
#include <crm/common/xml.h>
#include <crm/common/rules_internal.h>
#include <crm/common/unittest_internal.h>
Include dependency graph for pcmk_evaluate_rule_test.c:

Go to the source code of this file.

Macros

#define RULE_OP
 
#define RULE_OP_MISSING_ID
 
#define RULE_IDREF_PARENT   "<" PCMK_XE_CIB ">" RULE_OP "</" PCMK_XE_CIB ">"
 
#define RULE_EMPTY   "<" PCMK_XE_RULE " " PCMK_XA_ID "='r' />"
 
#define RULE_EMPTY_AND
 
#define RULE_EMPTY_OR
 
#define RULE_DEFAULT_BOOLEAN_OP
 
#define RULE_INVALID_BOOLEAN_OP
 
#define RULE_AND_PASSES
 
#define RULE_LONELY_AND
 
#define RULE_AND_ONE_FAILS
 
#define RULE_AND_TWO_FAIL
 
#define RULE_OR_ONE_PASSES
 
#define RULE_OR_TWO_PASS
 
#define RULE_LONELY_OR
 
#define RULE_OR_FAILS
 

Macro Definition Documentation

◆ RULE_AND_ONE_FAILS

#define RULE_AND_ONE_FAILS
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_AND "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='Dummy' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_VALUE_AND
Definition: options.h:133
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 241 of file pcmk_evaluate_rule_test.c.

◆ RULE_AND_PASSES

#define RULE_AND_PASSES
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_AND "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='IPaddr2' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_VALUE_AND
Definition: options.h:133
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 204 of file pcmk_evaluate_rule_test.c.

◆ RULE_AND_TWO_FAIL

#define RULE_AND_TWO_FAIL
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_AND "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='Dummy' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='9s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_VALUE_AND
Definition: options.h:133
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 262 of file pcmk_evaluate_rule_test.c.

◆ RULE_DEFAULT_BOOLEAN_OP

#define RULE_DEFAULT_BOOLEAN_OP
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='Dummy' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 161 of file pcmk_evaluate_rule_test.c.

◆ RULE_EMPTY

#define RULE_EMPTY   "<" PCMK_XE_RULE " " PCMK_XA_ID "='r' />"

Definition at line 115 of file pcmk_evaluate_rule_test.c.

◆ RULE_EMPTY_AND

#define RULE_EMPTY_AND
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_AND "' />"
#define PCMK_VALUE_AND
Definition: options.h:133
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 129 of file pcmk_evaluate_rule_test.c.

◆ RULE_EMPTY_OR

#define RULE_EMPTY_OR
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_OR "' />"
#define PCMK_VALUE_OR
Definition: options.h:187
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 145 of file pcmk_evaluate_rule_test.c.

◆ RULE_IDREF_PARENT

#define RULE_IDREF_PARENT   "<" PCMK_XE_CIB ">" RULE_OP "</" PCMK_XE_CIB ">"

Definition at line 83 of file pcmk_evaluate_rule_test.c.

◆ RULE_INVALID_BOOLEAN_OP

#define RULE_INVALID_BOOLEAN_OP
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='not-an-op' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='Dummy' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 182 of file pcmk_evaluate_rule_test.c.

◆ RULE_LONELY_AND

#define RULE_LONELY_AND
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_AND "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='IPaddr2' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_VALUE_AND
Definition: options.h:133
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 224 of file pcmk_evaluate_rule_test.c.

◆ RULE_LONELY_OR

#define RULE_LONELY_OR
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_OR "' >" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_VALUE_OR
Definition: options.h:187
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 323 of file pcmk_evaluate_rule_test.c.

◆ RULE_OP

#define RULE_OP
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' > " \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 36 of file pcmk_evaluate_rule_test.c.

◆ RULE_OP_MISSING_ID

#define RULE_OP_MISSING_ID
Value:
"<" PCMK_XE_RULE "> " \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 62 of file pcmk_evaluate_rule_test.c.

◆ RULE_OR_FAILS

#define RULE_OR_FAILS
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_OR "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='Dummy' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='20s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_VALUE_OR
Definition: options.h:187
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 341 of file pcmk_evaluate_rule_test.c.

◆ RULE_OR_ONE_PASSES

#define RULE_OR_ONE_PASSES
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_OR "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='Dummy' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_VALUE_OR
Definition: options.h:187
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 283 of file pcmk_evaluate_rule_test.c.

◆ RULE_OR_TWO_PASS

#define RULE_OR_TWO_PASS
Value:
"<" PCMK_XE_RULE " " PCMK_XA_ID "='r' " \
PCMK_XA_BOOLEAN_OP "='" PCMK_VALUE_OR "' >" \
" <" PCMK_XE_RSC_EXPRESSION " " PCMK_XA_ID "='e1' " \
PCMK_XA_TYPE "='IPAddr2' />" \
" <" PCMK_XE_OP_EXPRESSION " " PCMK_XA_ID "='e2' " \
PCMK_XA_NAME "='" PCMK_ACTION_MONITOR "' " \
PCMK_XA_INTERVAL "='10s' />" \
"</" PCMK_XE_RULE ">"
#define PCMK_VALUE_OR
Definition: options.h:187
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_OP_EXPRESSION
Definition: xml_names.h:145
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_XE_RSC_EXPRESSION
Definition: xml_names.h:183
#define PCMK_XE_RULE
Definition: xml_names.h:187

Definition at line 303 of file pcmk_evaluate_rule_test.c.