pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
health.c
Go to the documentation of this file.
1 /*
2  * Copyright 2022 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 #include <crm_internal.h>
11 
20 bool
22 {
23  return pcmk__strcase_any_of(value,
29  NULL);
30 }
31 
41 pcmk__parse_health_strategy(const char *value)
42 {
43  if (pcmk__str_eq(value, PCMK__VALUE_NONE,
46 
47  } else if (pcmk__str_eq(value, PCMK__VALUE_MIGRATE_ON_RED,
48  pcmk__str_casei)) {
50 
51  } else if (pcmk__str_eq(value, PCMK__VALUE_ONLY_GREEN,
52  pcmk__str_casei)) {
54 
55  } else if (pcmk__str_eq(value, PCMK__VALUE_PROGRESSIVE,
56  pcmk__str_casei)) {
58 
59  } else if (pcmk__str_eq(value, PCMK__VALUE_CUSTOM,
60  pcmk__str_casei)) {
62 
63  } else {
64  pcmk__config_err("Using default of \"" PCMK__VALUE_NONE "\" for "
66  " because '%s' is not a valid value",
67  value);
69  }
70 }
#define PCMK__VALUE_MIGRATE_ON_RED
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
Definition: strings.c:933
#define pcmk__config_err(fmt...)
#define PCMK__VALUE_NONE
#define PCMK__VALUE_ONLY_GREEN
enum pcmk__health_strategy pcmk__parse_health_strategy(const char *value)
Definition: health.c:41
#define PCMK__OPT_NODE_HEALTH_STRATEGY
#define PCMK__VALUE_PROGRESSIVE
pcmk__health_strategy
#define PCMK__VALUE_CUSTOM
bool pcmk__validate_health_strategy(const char *value)
Definition: health.c:21