This source file includes following definitions.
- crm_action_str
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_CRM_COMPAT__H
11 # define PCMK__CRM_CRM_COMPAT__H
12
13 #include <strings.h>
14 #include <glib.h>
15
16 #include <crm/common/actions.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22
23
24
25
26
27
28
29
30
31
32 #define EOS '\0'
33
34
35 #define MAX_IPC_DELAY 120
36
37
38 #define CRM_OP_FENCE PCMK_ACTION_STONITH
39
40
41 #define CRM_OP_LRM_QUERY "lrm_query"
42
43
44 #define CRM_OP_RELAXED_CLONE PCMK_ACTION_CLONE_ONE_OR_MORE
45
46
47 #define CRM_OP_RELAXED_SET PCMK_ACTION_ONE_OR_MORE
48
49
50 #define CRM_ATTR_RA_VERSION "#ra-version"
51
52
53 #define CRMD_ACTION_CANCEL PCMK_ACTION_CANCEL
54
55
56 #define CRMD_ACTION_DELETE PCMK_ACTION_DELETE
57
58
59 #define CRMD_ACTION_DEMOTE PCMK_ACTION_DEMOTE
60
61
62 #define CRMD_ACTION_DEMOTED PCMK_ACTION_DEMOTED
63
64
65 #define CRMD_ACTION_METADATA PCMK_ACTION_META_DATA
66
67
68 #define CRMD_ACTION_MIGRATE PCMK_ACTION_MIGRATE_TO
69
70
71 #define CRMD_ACTION_MIGRATED PCMK_ACTION_MIGRATE_FROM
72
73
74 #define CRMD_ACTION_NOTIFIED PCMK_ACTION_NOTIFIED
75
76
77 #define CRMD_ACTION_NOTIFY PCMK_ACTION_NOTIFY
78
79
80 #define CRMD_ACTION_PROMOTE PCMK_ACTION_PROMOTE
81
82
83 #define CRMD_ACTION_PROMOTED PCMK_ACTION_PROMOTED
84
85
86 #define CRMD_ACTION_RELOAD PCMK_ACTION_RELOAD
87
88
89 #define CRMD_ACTION_RELOAD_AGENT PCMK_ACTION_RELOAD_AGENT
90
91
92 #define CRMD_ACTION_START PCMK_ACTION_START
93
94
95 #define CRMD_ACTION_STARTED PCMK_ACTION_RUNNING
96
97
98 #define CRMD_ACTION_STATUS PCMK_ACTION_MONITOR
99
100
101 #define CRMD_ACTION_STOP PCMK_ACTION_STOP
102
103
104 #define CRMD_ACTION_STOPPED PCMK_ACTION_STOPPED
105
106
107 #define CRMD_METADATA_CALL_TIMEOUT PCMK_DEFAULT_METADATA_TIMEOUT_MS
108
109
110 #define RSC_CANCEL PCMK_ACTION_CANCEL
111
112
113 #define RSC_DELETE PCMK_ACTION_DELETE
114
115
116 #define RSC_DEMOTE PCMK_ACTION_DEMOTE
117
118
119 #define RSC_DEMOTED PCMK_ACTION_DEMOTED
120
121
122 #define RSC_METADATA PCMK_ACTION_META_DATA
123
124
125 #define RSC_MIGRATE PCMK_ACTION_MIGRATE_TO
126
127
128 #define RSC_MIGRATED PCMK_ACTION_MIGRATE_FROM
129
130
131 #define RSC_NOTIFIED PCMK_ACTION_NOTIFIED
132
133
134 #define RSC_NOTIFY PCMK_ACTION_NOTIFY
135
136
137 #define RSC_PROMOTE PCMK_ACTION_PROMOTE
138
139
140 #define RSC_PROMOTED PCMK_ACTION_PROMOTED
141
142
143 #define RSC_START PCMK_ACTION_START
144
145
146 #define RSC_STARTED PCMK_ACTION_RUNNING
147
148
149 #define RSC_STATUS PCMK_ACTION_MONITOR
150
151
152 #define RSC_STOP PCMK_ACTION_STOP
153
154
155 #define RSC_STOPPED PCMK_ACTION_STOPPED
156
157
158
159
160 # ifndef __GNUC__
161 # define __builtin_expect(expr, result) (expr)
162 # endif
163
164 #define __likely(expr) __builtin_expect(expr, 1)
165
166 #define __unlikely(expr) __builtin_expect(expr, 0)
167
168
169
170
171
172 typedef GList *GListPtr;
173
174
175 static inline const char *
176 crm_action_str(const char *task, guint interval_ms) {
177 if ((task != NULL) && (interval_ms == 0)
178 && (strcasecmp(task, PCMK_ACTION_MONITOR) == 0)) {
179 return "probe";
180 }
181 return task;
182 }
183
184 #ifdef __cplusplus
185 }
186 #endif
187
188 #endif