pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
attrs_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CRM_COMMON_ATTRS_INTERNAL__H
11 #define PCMK__CRM_COMMON_ATTRS_INTERNAL__H
12 
13 #include <crm/crm.h> // crm_system_name
14 #include <crm/common/logging.h> // LOG_TRACE
15 #include <crm/common/scheduler_types.h> // pcmk_node_t
16 #include <crm/common/failcounts_internal.h> // enum pcmk__rsc_node
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 // Options for clients to use with functions below
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 // PCMK__CRM_COMMON_ATTRS_INTERNAL__H
A dumping ground.
node_type
Definition: nodes.h:38
const char * name
Definition: cib.c:26
Type aliases needed to define scheduler objects.
const char * pcmk__node_attr_target(const char *name)
Definition: attrs.c:42
Wrappers for and extensions to libqb logging.
pcmk__node_attr_opts
const char * target
Definition: pcmk_fence.c:29
pcmk__rsc_node
const char * pcmk__node_attr(const pcmk_node_t *node, const char *name, const char *target, enum pcmk__rsc_node node_type)
Definition: attrs.c:118