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 #include <crm/common/scores.h>
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23
24
25
26
27
28
29
30
31
32
33 #define EOS '\0'
34
35
36 #define MAX_IPC_DELAY 120
37
38
39
40 #define CRM_SCORE_INFINITY PCMK_SCORE_INFINITY
41
42
43
44
45
46
47 #undef INFINITY
48 #define INFINITY PCMK_SCORE_INFINITY
49
50
51 #define CRM_INFINITY_S PCMK_VALUE_INFINITY
52
53
54 #define CRM_MINUS_INFINITY_S PCMK_VALUE_MINUS_INFINITY
55
56
57 #define CRM_PLUS_INFINITY_S PCMK_VALUE_PLUS_INFINITY
58
59
60 #define INFINITY_S "INFINITY"
61
62
63 #define MINUS_INFINITY_S "-INFINITY"
64
65
66 #define CRM_OP_FENCE PCMK_ACTION_STONITH
67
68
69 #define CRM_OP_LRM_QUERY "lrm_query"
70
71
72 #define CRM_OP_RELAXED_CLONE PCMK_ACTION_CLONE_ONE_OR_MORE
73
74
75 #define CRM_OP_RELAXED_SET PCMK_ACTION_ONE_OR_MORE
76
77
78 #define CRM_ATTR_RA_VERSION "#ra-version"
79
80
81 #define CRMD_ACTION_CANCEL PCMK_ACTION_CANCEL
82
83
84 #define CRMD_ACTION_DELETE PCMK_ACTION_DELETE
85
86
87 #define CRMD_ACTION_DEMOTE PCMK_ACTION_DEMOTE
88
89
90 #define CRMD_ACTION_DEMOTED PCMK_ACTION_DEMOTED
91
92
93 #define CRMD_ACTION_METADATA PCMK_ACTION_META_DATA
94
95
96 #define CRMD_ACTION_MIGRATE PCMK_ACTION_MIGRATE_TO
97
98
99 #define CRMD_ACTION_MIGRATED PCMK_ACTION_MIGRATE_FROM
100
101
102 #define CRMD_ACTION_NOTIFIED PCMK_ACTION_NOTIFIED
103
104
105 #define CRMD_ACTION_NOTIFY PCMK_ACTION_NOTIFY
106
107
108 #define CRMD_ACTION_PROMOTE PCMK_ACTION_PROMOTE
109
110
111 #define CRMD_ACTION_PROMOTED PCMK_ACTION_PROMOTED
112
113
114 #define CRMD_ACTION_RELOAD PCMK_ACTION_RELOAD
115
116
117 #define CRMD_ACTION_RELOAD_AGENT PCMK_ACTION_RELOAD_AGENT
118
119
120 #define CRMD_ACTION_START PCMK_ACTION_START
121
122
123 #define CRMD_ACTION_STARTED PCMK_ACTION_RUNNING
124
125
126 #define CRMD_ACTION_STATUS PCMK_ACTION_MONITOR
127
128
129 #define CRMD_ACTION_STOP PCMK_ACTION_STOP
130
131
132 #define CRMD_ACTION_STOPPED PCMK_ACTION_STOPPED
133
134
135 #define CRMD_METADATA_CALL_TIMEOUT PCMK_DEFAULT_METADATA_TIMEOUT_MS
136
137
138 #define RSC_CANCEL PCMK_ACTION_CANCEL
139
140
141 #define RSC_DELETE PCMK_ACTION_DELETE
142
143
144 #define RSC_DEMOTE PCMK_ACTION_DEMOTE
145
146
147 #define RSC_DEMOTED PCMK_ACTION_DEMOTED
148
149
150 #define RSC_METADATA PCMK_ACTION_META_DATA
151
152
153 #define RSC_MIGRATE PCMK_ACTION_MIGRATE_TO
154
155
156 #define RSC_MIGRATED PCMK_ACTION_MIGRATE_FROM
157
158
159 #define RSC_NOTIFIED PCMK_ACTION_NOTIFIED
160
161
162 #define RSC_NOTIFY PCMK_ACTION_NOTIFY
163
164
165 #define RSC_PROMOTE PCMK_ACTION_PROMOTE
166
167
168 #define RSC_PROMOTED PCMK_ACTION_PROMOTED
169
170
171 #define RSC_START PCMK_ACTION_START
172
173
174 #define RSC_STARTED PCMK_ACTION_RUNNING
175
176
177 #define RSC_STATUS PCMK_ACTION_MONITOR
178
179
180 #define RSC_STOP PCMK_ACTION_STOP
181
182
183 #define RSC_STOPPED PCMK_ACTION_STOPPED
184
185
186 #define CRM_OP_LOCAL_SHUTDOWN "start_shutdown"
187
188
189
190
191 # ifndef __GNUC__
192 # define __builtin_expect(expr, result) (expr)
193 # endif
194
195 #define __likely(expr) __builtin_expect(expr, 1)
196
197 #define __unlikely(expr) __builtin_expect(expr, 0)
198
199
200
201
202
203
204 typedef GList *GListPtr;
205
206
207 static inline const char *
208 crm_action_str(const char *task, guint interval_ms) {
209 if ((task != NULL) && (interval_ms == 0)
210 && (strcasecmp(task, PCMK_ACTION_MONITOR) == 0)) {
211 return "probe";
212 }
213 return task;
214 }
215
216 #ifdef __cplusplus
217 }
218 #endif
219
220 #endif