pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
resources.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_RESOURCES__H
11 #define PCMK__CRM_COMMON_RESOURCES__H
12 
13 #include <stdbool.h> // bool
14 #include <sys/types.h> // time_t
15 #include <libxml/tree.h> // xmlNode
16 #include <glib.h> // gboolean, guint, GList, GHashTable
17 
18 #include <crm/common/roles.h> // enum rsc_role_e
19 #include <crm/common/scheduler_types.h> // pcmk_resource_t, etc.
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
31 enum pe_find {
35 
38 
41 
44 
47 };
48 
51 
52 // Implementation of pcmk_resource_t
53 // @COMPAT Make this internal when we can break API backward compatibility
57  /* @COMPAT Once all members are moved to pcmk__resource_private_t,
58  * We can make that the pcmk_resource_t implementation and drop this
59  * struct altogether, leaving pcmk_resource_t as an opaque public type.
60  */
62 
63  // NOTE: sbd (as of at least 1.5.2) uses this
65  char *id; // Resource ID in configuration
66 
67  // NOTE: sbd (as of at least 1.5.2) uses this
69  unsigned long long flags; // Group of enum pcmk__rsc_flags
70 };
72 
73 const char *pcmk_resource_id(const pcmk_resource_t *rsc);
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif // PCMK__CRM_COMMON_RESOURCES__H
Also match anonymous clone instances by base name.
Definition: resources.h:37
Type aliases needed to define scheduler objects.
pe_find
Search options for resources (exact resource ID always matches)
Definition: resources.h:32
Match only clones and their instances, by either clone or instance ID.
Definition: resources.h:40
bool pcmk_resource_is_managed(const pcmk_resource_t *rsc)
Definition: resources.c:41
Also match clone instance ID from resource history.
Definition: resources.h:34
Scheduler API for resource roles.
pcmk__resource_private_t * priv
Definition: resources.h:61
Match clone instances (even unique) by base name as well as exact ID.
Definition: resources.h:46
const char * pcmk_resource_id(const pcmk_resource_t *rsc)
Definition: resources.c:27
If matching by node, compare current node instead of assigned node.
Definition: resources.h:43
unsigned long long flags
Definition: resources.h:69