1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_ATTRS_INTERNAL__H
11 #define PCMK__CRM_COMMON_ATTRS_INTERNAL__H
12
13 #include <crm/crm.h>
14 #include <crm/common/logging.h>
15 #include <crm/common/scheduler_types.h>
16 #include <crm/common/failcounts_internal.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22
23 enum pcmk__node_attr_opts {
24 pcmk__node_attr_none = 0,
25 pcmk__node_attr_remote = (1 << 0),
26 pcmk__node_attr_private = (1 << 1),
27 pcmk__node_attr_pattern = (1 << 2),
28 pcmk__node_attr_value = (1 << 3),
29 pcmk__node_attr_delay = (1 << 4),
30 pcmk__node_attr_perm = (1 << 5),
31 pcmk__node_attr_sync_local = (1 << 6),
32 pcmk__node_attr_sync_cluster = (1 << 7),
33 pcmk__node_attr_utilization = (1 << 8),
34 pcmk__node_attr_query_all = (1 << 9),
35 };
36
37 #define pcmk__set_node_attr_flags(node_attr_flags, flags_to_set) do { \
38 node_attr_flags = pcmk__set_flags_as(__func__, __LINE__, \
39 LOG_TRACE, "Node attribute", crm_system_name, \
40 (node_attr_flags), (flags_to_set), #flags_to_set); \
41 } while (0)
42
43 #define pcmk__clear_node_attr_flags(node_attr_flags, flags_to_clear) do { \
44 node_attr_flags = pcmk__clear_flags_as(__func__, __LINE__, \
45 LOG_TRACE, "Node attribute", crm_system_name, \
46 (node_attr_flags), (flags_to_clear), #flags_to_clear); \
47 } while (0)
48
49 const char *pcmk__node_attr_target(const char *name);
50 const char *pcmk__node_attr(const pcmk_node_t *node, const char *name,
51 const char *target, enum pcmk__rsc_node node_type);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif