1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_MSG_XML__H
11 # define PCMK__CRM_MSG_XML__H
12
13 # include <crm/common/xml.h>
14
15 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
16 #include <crm/msg_xml_compat.h>
17 #endif
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 #define PCMK_XE_PROMOTABLE_LEGACY "master"
40
41
42
43
44
45
46
47
48
49 #define PCMK_XA_PROMOTED_MAX_LEGACY "master-max"
50 #define PCMK_XA_PROMOTED_NODE_MAX_LEGACY "master-node-max"
51
52
53
54
55
56 # ifndef F_ORIG
57 # define F_ORIG "src"
58 # endif
59
60 # ifndef F_SEQ
61 # define F_SEQ "seq"
62 # endif
63
64 # ifndef F_SUBTYPE
65 # define F_SUBTYPE "subt"
66 # endif
67
68 # ifndef F_TYPE
69 # define F_TYPE "t"
70 # endif
71
72 # ifndef F_CLIENTNAME
73 # define F_CLIENTNAME "cn"
74 # endif
75
76 # ifndef F_XML_TAGNAME
77 # define F_XML_TAGNAME "__name__"
78 # endif
79
80 # ifndef T_CRM
81 # define T_CRM "crmd"
82 # endif
83
84 # ifndef T_ATTRD
85 # define T_ATTRD "attrd"
86 # endif
87
88 # define CIB_OPTIONS_FIRST "cib-bootstrap-options"
89
90 # define F_CRM_DATA "crm_xml"
91 # define F_CRM_TASK "crm_task"
92 # define F_CRM_HOST_TO "crm_host_to"
93 # define F_CRM_MSG_TYPE F_SUBTYPE
94 # define F_CRM_SYS_TO "crm_sys_to"
95 # define F_CRM_SYS_FROM "crm_sys_from"
96 # define F_CRM_HOST_FROM F_ORIG
97 # define F_CRM_REFERENCE XML_ATTR_REFERENCE
98 # define F_CRM_VERSION XML_ATTR_VERSION
99 # define F_CRM_ORIGIN "origin"
100 # define F_CRM_USER "crm_user"
101 # define F_CRM_JOIN_ID "join_id"
102 # define F_CRM_DC_LEAVING "dc-leaving"
103 # define F_CRM_ELECTION_ID "election-id"
104 # define F_CRM_ELECTION_AGE_S "election-age-sec"
105 # define F_CRM_ELECTION_AGE_US "election-age-nano-sec"
106 # define F_CRM_ELECTION_OWNER "election-owner"
107 # define F_CRM_TGRAPH "crm-tgraph-file"
108 # define F_CRM_TGRAPH_INPUT "crm-tgraph-in"
109
110 # define F_CRM_THROTTLE_MODE "crm-limit-mode"
111 # define F_CRM_THROTTLE_MAX "crm-limit-max"
112
113
114 # define XML_DIFF_MARKER "__crm_diff_marker__"
115 # define XML_TAG_CIB "cib"
116 # define XML_TAG_FAILED "failed"
117
118 # define XML_ATTR_CRM_VERSION "crm_feature_set"
119 # define XML_ATTR_DIGEST "digest"
120 # define XML_ATTR_VALIDATION "validate-with"
121
122 # define XML_ATTR_QUORUM_PANIC "no-quorum-panic"
123 # define XML_ATTR_HAVE_QUORUM "have-quorum"
124 # define XML_ATTR_HAVE_WATCHDOG "have-watchdog"
125 # define XML_ATTR_GENERATION "epoch"
126 # define XML_ATTR_GENERATION_ADMIN "admin_epoch"
127 # define XML_ATTR_NUMUPDATES "num_updates"
128 # define XML_ATTR_TIMEOUT "timeout"
129 # define XML_ATTR_ORIGIN "crm-debug-origin"
130 # define XML_ATTR_TSTAMP "crm-timestamp"
131 # define XML_CIB_ATTR_WRITTEN "cib-last-written"
132 # define XML_ATTR_VERSION "version"
133 # define XML_ATTR_DESC "description"
134 # define XML_ATTR_ID "id"
135 # define XML_ATTR_NAME "name"
136 # define XML_ATTR_IDREF "id-ref"
137 # define XML_ATTR_ID_LONG "long-id"
138 # define XML_ATTR_TYPE "type"
139 # define XML_ATTR_VERBOSE "verbose"
140 # define XML_ATTR_OP "op"
141 # define XML_ATTR_DC_UUID "dc-uuid"
142 # define XML_ATTR_UPDATE_ORIG "update-origin"
143 # define XML_ATTR_UPDATE_CLIENT "update-client"
144 # define XML_ATTR_UPDATE_USER "update-user"
145
146 # define XML_BOOLEAN_TRUE "true"
147 # define XML_BOOLEAN_FALSE "false"
148 # define XML_BOOLEAN_YES XML_BOOLEAN_TRUE
149 # define XML_BOOLEAN_NO XML_BOOLEAN_FALSE
150
151 # define XML_TAG_OPTIONS "options"
152
153
154 # define XML_ATTR_REQUEST "request"
155 # define XML_ATTR_RESPONSE "response"
156
157 # define XML_ATTR_UNAME "uname"
158 # define XML_ATTR_UUID "id"
159 # define XML_ATTR_REFERENCE "reference"
160
161 # define XML_CRM_TAG_PING "ping_response"
162 # define XML_PING_ATTR_STATUS "result"
163 # define XML_PING_ATTR_SYSFROM "crm_subsystem"
164 # define XML_PING_ATTR_CRMDSTATE "crmd_state"
165 # define XML_PING_ATTR_PACEMAKERDSTATE "pacemakerd_state"
166 # define XML_PING_ATTR_PACEMAKERDSTATE_INIT "init"
167 # define XML_PING_ATTR_PACEMAKERDSTATE_STARTINGDAEMONS "starting_daemons"
168 # define XML_PING_ATTR_PACEMAKERDSTATE_WAITPING "wait_for_ping"
169 # define XML_PING_ATTR_PACEMAKERDSTATE_RUNNING "running"
170 # define XML_PING_ATTR_PACEMAKERDSTATE_SHUTTINGDOWN "shutting_down"
171 # define XML_PING_ATTR_PACEMAKERDSTATE_SHUTDOWNCOMPLETE "shutdown_complete"
172
173 # define XML_TAG_FRAGMENT "cib_fragment"
174
175 # define XML_FAIL_TAG_CIB "failed_update"
176
177 # define XML_FAILCIB_ATTR_ID "id"
178 # define XML_FAILCIB_ATTR_OBJTYPE "object_type"
179 # define XML_FAILCIB_ATTR_OP "operation"
180 # define XML_FAILCIB_ATTR_REASON "reason"
181
182
183 # define XML_CIB_TAG_SECTION_ALL "all"
184 # define XML_CIB_TAG_CONFIGURATION "configuration"
185 # define XML_CIB_TAG_STATUS "status"
186 # define XML_CIB_TAG_RESOURCES "resources"
187 # define XML_CIB_TAG_NODES "nodes"
188 # define XML_CIB_TAG_DOMAINS "domains"
189 # define XML_CIB_TAG_CONSTRAINTS "constraints"
190 # define XML_CIB_TAG_CRMCONFIG "crm_config"
191 # define XML_CIB_TAG_OPCONFIG "op_defaults"
192 # define XML_CIB_TAG_RSCCONFIG "rsc_defaults"
193 # define XML_CIB_TAG_ACLS "acls"
194 # define XML_CIB_TAG_ALERTS "alerts"
195 # define XML_CIB_TAG_ALERT "alert"
196 # define XML_CIB_TAG_ALERT_RECIPIENT "recipient"
197 # define XML_CIB_TAG_ALERT_SELECT "select"
198 # define XML_CIB_TAG_ALERT_ATTRIBUTES "select_attributes"
199 # define XML_CIB_TAG_ALERT_FENCING "select_fencing"
200 # define XML_CIB_TAG_ALERT_NODES "select_nodes"
201 # define XML_CIB_TAG_ALERT_RESOURCES "select_resources"
202 # define XML_CIB_TAG_ALERT_ATTR "attribute"
203
204 # define XML_CIB_TAG_STATE "node_state"
205 # define XML_CIB_TAG_NODE "node"
206 # define XML_CIB_TAG_NVPAIR "nvpair"
207
208 # define XML_CIB_TAG_PROPSET "cluster_property_set"
209 # define XML_TAG_ATTR_SETS "instance_attributes"
210 # define XML_TAG_META_SETS "meta_attributes"
211 # define XML_TAG_ATTRS "attributes"
212 # define XML_TAG_PARAMS "parameters"
213 # define XML_TAG_PARAM "param"
214 # define XML_TAG_UTILIZATION "utilization"
215
216 # define XML_TAG_RESOURCE_REF "resource_ref"
217 # define XML_CIB_TAG_RESOURCE "primitive"
218 # define XML_CIB_TAG_GROUP "group"
219 # define XML_CIB_TAG_INCARNATION "clone"
220 # define XML_CIB_TAG_CONTAINER "bundle"
221
222 # define XML_CIB_TAG_RSC_TEMPLATE "template"
223
224 # define XML_RSC_ATTR_TARGET "container-attribute-target"
225 # define XML_RSC_ATTR_RESTART "restart-type"
226 # define XML_RSC_ATTR_ORDERED "ordered"
227 # define XML_RSC_ATTR_INTERLEAVE "interleave"
228 # define XML_RSC_ATTR_INCARNATION "clone"
229 # define XML_RSC_ATTR_INCARNATION_MAX "clone-max"
230 # define XML_RSC_ATTR_INCARNATION_MIN "clone-min"
231 # define XML_RSC_ATTR_INCARNATION_NODEMAX "clone-node-max"
232 # define XML_RSC_ATTR_PROMOTABLE "promotable"
233 # define XML_RSC_ATTR_PROMOTED_MAX "promoted-max"
234 # define XML_RSC_ATTR_PROMOTED_NODEMAX "promoted-node-max"
235 # define XML_RSC_ATTR_MANAGED "is-managed"
236 # define XML_RSC_ATTR_TARGET_ROLE "target-role"
237 # define XML_RSC_ATTR_UNIQUE "globally-unique"
238 # define XML_RSC_ATTR_NOTIFY "notify"
239 # define XML_RSC_ATTR_STICKINESS "resource-stickiness"
240 # define XML_RSC_ATTR_FAIL_STICKINESS "migration-threshold"
241 # define XML_RSC_ATTR_FAIL_TIMEOUT "failure-timeout"
242 # define XML_RSC_ATTR_MULTIPLE "multiple-active"
243 # define XML_RSC_ATTR_REQUIRES "requires"
244 # define XML_RSC_ATTR_CONTAINER "container"
245 # define XML_RSC_ATTR_INTERNAL_RSC "internal_rsc"
246 # define XML_RSC_ATTR_MAINTENANCE "maintenance"
247 # define XML_RSC_ATTR_REMOTE_NODE "remote-node"
248 # define XML_RSC_ATTR_CLEAR_OP "clear_failure_op"
249 # define XML_RSC_ATTR_CLEAR_INTERVAL "clear_failure_interval"
250 # define XML_RSC_ATTR_REMOTE_RA_ADDR "addr"
251 # define XML_RSC_ATTR_REMOTE_RA_SERVER "server"
252 # define XML_RSC_ATTR_REMOTE_RA_PORT "port"
253 # define XML_RSC_ATTR_CRITICAL "critical"
254
255 # define XML_REMOTE_ATTR_RECONNECT_INTERVAL "reconnect_interval"
256
257 # define XML_OP_ATTR_ON_FAIL "on-fail"
258 # define XML_OP_ATTR_START_DELAY "start-delay"
259 # define XML_OP_ATTR_ALLOW_MIGRATE "allow-migrate"
260 # define XML_OP_ATTR_ORIGIN "interval-origin"
261 # define XML_OP_ATTR_PENDING "record-pending"
262 # define XML_OP_ATTR_DIGESTS_ALL "digests-all"
263 # define XML_OP_ATTR_DIGESTS_SECURE "digests-secure"
264
265 # define XML_CIB_TAG_LRM "lrm"
266 # define XML_LRM_TAG_RESOURCES "lrm_resources"
267 # define XML_LRM_TAG_RESOURCE "lrm_resource"
268 # define XML_LRM_TAG_RSC_OP "lrm_rsc_op"
269 # define XML_AGENT_ATTR_CLASS "class"
270 # define XML_AGENT_ATTR_PROVIDER "provider"
271
272 # define XML_CIB_ATTR_REPLACE "replace"
273 # define XML_CIB_ATTR_SOURCE "source"
274
275 # define XML_CIB_ATTR_PRIORITY "priority"
276 # define XML_CIB_ATTR_SOURCE "source"
277
278 # define XML_NODE_JOIN_STATE "join"
279 # define XML_NODE_EXPECTED "expected"
280 # define XML_NODE_IN_CLUSTER "in_ccm"
281 # define XML_NODE_IS_PEER "crmd"
282 # define XML_NODE_IS_REMOTE "remote_node"
283 # define XML_NODE_IS_FENCED "node_fenced"
284 # define XML_NODE_IS_MAINTENANCE "node_in_maintenance"
285
286 # define XML_CIB_ATTR_SHUTDOWN "shutdown"
287
288
289
290
291
292
293
294 # define XML_LRM_ATTR_INTERVAL "interval"
295
296
297
298 # define XML_LRM_ATTR_INTERVAL_MS XML_LRM_ATTR_INTERVAL
299
300 # define XML_LRM_ATTR_TASK "operation"
301 # define XML_LRM_ATTR_TASK_KEY "operation_key"
302 # define XML_LRM_ATTR_TARGET "on_node"
303 # define XML_LRM_ATTR_TARGET_UUID "on_node_uuid"
304
305
306
307
308 # define XML_LRM_ATTR_ROUTER_NODE "router_node"
309 # define XML_LRM_ATTR_RSCID "rsc-id"
310 # define XML_LRM_ATTR_OPSTATUS "op-status"
311 # define XML_LRM_ATTR_RC "rc-code"
312 # define XML_LRM_ATTR_CALLID "call-id"
313 # define XML_LRM_ATTR_OP_DIGEST "op-digest"
314 # define XML_LRM_ATTR_OP_RESTART "op-force-restart"
315 # define XML_LRM_ATTR_OP_SECURE "op-secure-params"
316 # define XML_LRM_ATTR_RESTART_DIGEST "op-restart-digest"
317 # define XML_LRM_ATTR_SECURE_DIGEST "op-secure-digest"
318 # define XML_LRM_ATTR_EXIT_REASON "exit-reason"
319
320 # define XML_RSC_OP_LAST_CHANGE "last-rc-change"
321 # define XML_RSC_OP_LAST_RUN "last-run"
322 # define XML_RSC_OP_T_EXEC "exec-time"
323 # define XML_RSC_OP_T_QUEUE "queue-time"
324
325 # define XML_LRM_ATTR_MIGRATE_SOURCE "migrate_source"
326 # define XML_LRM_ATTR_MIGRATE_TARGET "migrate_target"
327
328 # define XML_TAG_GRAPH "transition_graph"
329 # define XML_GRAPH_TAG_RSC_OP "rsc_op"
330 # define XML_GRAPH_TAG_PSEUDO_EVENT "pseudo_event"
331 # define XML_GRAPH_TAG_CRM_EVENT "crm_event"
332 # define XML_GRAPH_TAG_DOWNED "downed"
333 # define XML_GRAPH_TAG_MAINTENANCE "maintenance"
334
335 # define XML_TAG_RULE "rule"
336 # define XML_RULE_ATTR_SCORE "score"
337 # define XML_RULE_ATTR_SCORE_ATTRIBUTE "score-attribute"
338 # define XML_RULE_ATTR_ROLE "role"
339 # define XML_RULE_ATTR_BOOLEAN_OP "boolean-op"
340
341 # define XML_TAG_EXPRESSION "expression"
342 # define PCMK_XE_DATE_EXPRESSION "date_expression"
343 # define PCMK_XE_OP_EXPRESSION "op_expression"
344 # define PCMK_XE_RSC_EXPRESSION "rsc_expression"
345 # define XML_EXPR_ATTR_ATTRIBUTE "attribute"
346 # define XML_EXPR_ATTR_OPERATION "operation"
347 # define XML_EXPR_ATTR_VALUE "value"
348 # define XML_EXPR_ATTR_TYPE "type"
349 # define XML_EXPR_ATTR_VALUE_SOURCE "value-source"
350
351 # define XML_CONS_TAG_RSC_DEPEND "rsc_colocation"
352 # define XML_CONS_TAG_RSC_ORDER "rsc_order"
353 # define XML_CONS_TAG_RSC_LOCATION "rsc_location"
354 # define XML_CONS_TAG_RSC_TICKET "rsc_ticket"
355 # define XML_CONS_TAG_RSC_SET "resource_set"
356 # define XML_CONS_ATTR_SYMMETRICAL "symmetrical"
357
358 # define XML_LOCATION_ATTR_DISCOVERY "resource-discovery"
359
360 # define XML_COLOC_ATTR_SOURCE "rsc"
361 # define XML_COLOC_ATTR_SOURCE_ROLE "rsc-role"
362 # define XML_COLOC_ATTR_TARGET "with-rsc"
363 # define XML_COLOC_ATTR_TARGET_ROLE "with-rsc-role"
364 # define XML_COLOC_ATTR_NODE_ATTR "node-attribute"
365 # define XML_COLOC_ATTR_INFLUENCE "influence"
366
367
368 # define XML_COLOC_ATTR_SOURCE_INSTANCE "rsc-instance"
369
370
371 # define XML_COLOC_ATTR_TARGET_INSTANCE "with-rsc-instance"
372
373 # define XML_LOC_ATTR_SOURCE "rsc"
374 # define XML_LOC_ATTR_SOURCE_PATTERN "rsc-pattern"
375
376 # define XML_ORDER_ATTR_FIRST "first"
377 # define XML_ORDER_ATTR_THEN "then"
378 # define XML_ORDER_ATTR_FIRST_ACTION "first-action"
379 # define XML_ORDER_ATTR_THEN_ACTION "then-action"
380 # define XML_ORDER_ATTR_KIND "kind"
381
382
383 # define XML_ORDER_ATTR_FIRST_INSTANCE "first-instance"
384
385
386 # define XML_ORDER_ATTR_THEN_INSTANCE "then-instance"
387
388 # define XML_TICKET_ATTR_TICKET "ticket"
389 # define XML_TICKET_ATTR_LOSS_POLICY "loss-policy"
390
391 # define XML_NVPAIR_ATTR_NAME "name"
392 # define XML_NVPAIR_ATTR_VALUE "value"
393
394 # define XML_NODE_ATTR_RSC_DISCOVERY "resource-discovery-enabled"
395
396 # define XML_CONFIG_ATTR_DC_DEADTIME "dc-deadtime"
397 # define XML_CONFIG_ATTR_ELECTION_FAIL "election-timeout"
398 # define XML_CONFIG_ATTR_FORCE_QUIT "shutdown-escalation"
399 # define XML_CONFIG_ATTR_RECHECK "cluster-recheck-interval"
400 # define XML_CONFIG_ATTR_FENCE_REACTION "fence-reaction"
401 # define XML_CONFIG_ATTR_SHUTDOWN_LOCK "shutdown-lock"
402 # define XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT "shutdown-lock-limit"
403 # define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY "priority-fencing-delay"
404
405 # define XML_ALERT_ATTR_PATH "path"
406 # define XML_ALERT_ATTR_TIMEOUT "timeout"
407 # define XML_ALERT_ATTR_TSTAMP_FORMAT "timestamp-format"
408 # define XML_ALERT_ATTR_REC_VALUE "value"
409
410 # define XML_CIB_TAG_GENERATION_TUPPLE "generation_tuple"
411
412 # define XML_ATTR_TRANSITION_MAGIC "transition-magic"
413 # define XML_ATTR_TRANSITION_KEY "transition-key"
414
415 # define XML_ATTR_TE_NOWAIT "op_no_wait"
416 # define XML_ATTR_TE_TARGET_RC "op_target_rc"
417 # define XML_TAG_TRANSIENT_NODEATTRS "transient_attributes"
418
419 # define XML_TAG_DIFF_ADDED "diff-added"
420 # define XML_TAG_DIFF_REMOVED "diff-removed"
421
422 # define XML_ACL_TAG_USER "acl_target"
423 # define XML_ACL_TAG_USERv1 "acl_user"
424 # define XML_ACL_TAG_GROUP "acl_group"
425 # define XML_ACL_TAG_ROLE "acl_role"
426 # define XML_ACL_TAG_PERMISSION "acl_permission"
427 # define XML_ACL_TAG_ROLE_REF "role"
428 # define XML_ACL_TAG_ROLE_REFv1 "role_ref"
429 # define XML_ACL_ATTR_KIND "kind"
430 # define XML_ACL_TAG_READ "read"
431 # define XML_ACL_TAG_WRITE "write"
432 # define XML_ACL_TAG_DENY "deny"
433 # define XML_ACL_ATTR_REF "reference"
434 # define XML_ACL_ATTR_REFv1 "ref"
435 # define XML_ACL_ATTR_TAG "object-type"
436 # define XML_ACL_ATTR_TAGv1 "tag"
437 # define XML_ACL_ATTR_XPATH "xpath"
438 # define XML_ACL_ATTR_ATTRIBUTE "attribute"
439
440 # define XML_CIB_TAG_TICKETS "tickets"
441 # define XML_CIB_TAG_TICKET_STATE "ticket_state"
442
443 # define XML_CIB_TAG_TAGS "tags"
444 # define XML_CIB_TAG_TAG "tag"
445 # define XML_CIB_TAG_OBJ_REF "obj_ref"
446
447 # define XML_TAG_FENCING_TOPOLOGY "fencing-topology"
448 # define XML_TAG_FENCING_LEVEL "fencing-level"
449 # define XML_ATTR_STONITH_INDEX "index"
450 # define XML_ATTR_STONITH_TARGET "target"
451 # define XML_ATTR_STONITH_TARGET_VALUE "target-value"
452 # define XML_ATTR_STONITH_TARGET_PATTERN "target-pattern"
453 # define XML_ATTR_STONITH_TARGET_ATTRIBUTE "target-attribute"
454 # define XML_ATTR_STONITH_DEVICES "devices"
455
456 # define XML_TAG_DIFF "diff"
457 # define XML_DIFF_VERSION "version"
458 # define XML_DIFF_VSOURCE "source"
459 # define XML_DIFF_VTARGET "target"
460 # define XML_DIFF_CHANGE "change"
461 # define XML_DIFF_LIST "change-list"
462 # define XML_DIFF_ATTR "change-attr"
463 # define XML_DIFF_RESULT "change-result"
464 # define XML_DIFF_OP "operation"
465 # define XML_DIFF_PATH "path"
466 # define XML_DIFF_POSITION "position"
467
468 # define ID(x) crm_element_value(x, XML_ATTR_ID)
469 # define TYPE(x) crm_element_name(x)
470
471 #ifdef __cplusplus
472 }
473 #endif
474
475 #endif