This source file includes following definitions.
- pcmk__readable_action
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_ACTIONS_INTERNAL__H
11 #define PCMK__CRM_COMMON_ACTIONS_INTERNAL__H
12
13 #include <stdbool.h>
14 #include <glib.h>
15 #include <libxml/tree.h>
16
17 #include <crm/common/actions.h>
18 #include <crm/common/strings_internal.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24
25 #define PCMK__OP_FMT "%s_%s_%u"
26
27 char *pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms);
28 char *pcmk__notify_key(const char *rsc_id, const char *notify_type,
29 const char *op_type);
30 char *pcmk__transition_key(int transition_id, int action_id, int target_rc,
31 const char *node);
32 void pcmk__filter_op_for_digest(xmlNode *param_set);
33 bool pcmk__is_fencing_action(const char *action);
34
35
36
37
38
39
40
41
42
43
44 static inline const char *
45 pcmk__readable_action(const char *action_name, guint interval_ms) {
46 if ((interval_ms == 0)
47 && pcmk__str_eq(action_name, PCMK_ACTION_MONITOR, pcmk__str_none)) {
48 return "probe";
49 }
50 return action_name;
51 }
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif