diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:46:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:46:09 +0000 |
commit | 043aa641ad4373e96fd748deb1e7fab3cb579a07 (patch) | |
tree | f8fde8a97ab5db152043f6c01043672114c0a4df /include/crm/pengine/status.h | |
parent | Releasing progress-linux version 2.1.6-5~progress7.99u1. (diff) | |
download | pacemaker-043aa641ad4373e96fd748deb1e7fab3cb579a07.tar.xz pacemaker-043aa641ad4373e96fd748deb1e7fab3cb579a07.zip |
Merging upstream version 2.1.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/crm/pengine/status.h')
-rw-r--r-- | include/crm/pengine/status.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index 145a166..9c85425 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -15,7 +15,7 @@ # include <crm/common/util.h> // pcmk_is_set() # include <crm/common/iso8601.h> # include <crm/pengine/common.h> -# include <crm/pengine/pe_types.h> // pe_node_t, pe_resource_t, etc. +# include <crm/pengine/pe_types.h> // pcmk_node_t, pcmk_resource_t, etc. # include <crm/pengine/complex.h> #ifdef __cplusplus @@ -28,24 +28,25 @@ extern "C" { * \ingroup pengine */ -const char *rsc_printable_id(const pe_resource_t *rsc); -gboolean cluster_status(pe_working_set_t * data_set); -pe_working_set_t *pe_new_working_set(void); -void pe_free_working_set(pe_working_set_t *data_set); -void set_working_set_defaults(pe_working_set_t * data_set); -void cleanup_calculations(pe_working_set_t * data_set); -void pe_reset_working_set(pe_working_set_t *data_set); -pe_resource_t *pe_find_resource(GList *rsc_list, const char *id_rh); -pe_resource_t *pe_find_resource_with_flags(GList *rsc_list, const char *id, enum pe_find flags); -pe_node_t *pe_find_node(const GList *node_list, const char *node_name); -pe_node_t *pe_find_node_id(const GList *node_list, const char *id); -pe_node_t *pe_find_node_any(const GList *node_list, const char *id, +const char *rsc_printable_id(const pcmk_resource_t *rsc); +gboolean cluster_status(pcmk_scheduler_t *scheduler); +pcmk_scheduler_t *pe_new_working_set(void); +void pe_free_working_set(pcmk_scheduler_t *scheduler); +void set_working_set_defaults(pcmk_scheduler_t *scheduler); +void cleanup_calculations(pcmk_scheduler_t *scheduler); +void pe_reset_working_set(pcmk_scheduler_t *scheduler); +pcmk_resource_t *pe_find_resource(GList *rsc_list, const char *id_rh); +pcmk_resource_t *pe_find_resource_with_flags(GList *rsc_list, const char *id, + enum pe_find flags); +pcmk_node_t *pe_find_node(const GList *node_list, const char *node_name); +pcmk_node_t *pe_find_node_id(const GList *node_list, const char *id); +pcmk_node_t *pe_find_node_any(const GList *node_list, const char *id, const char *node_name); GList *find_operations(const char *rsc, const char *node, gboolean active_filter, - pe_working_set_t * data_set); + pcmk_scheduler_t *scheduler); void calculate_active_ops(const GList *sorted_op_list, int *start_index, int *stop_index); -int pe_bundle_replicas(const pe_resource_t *rsc); +int pe_bundle_replicas(const pcmk_resource_t *rsc); /*! * \brief Check whether a resource is any clone type @@ -55,9 +56,9 @@ int pe_bundle_replicas(const pe_resource_t *rsc); * \return true if resource is clone, false otherwise */ static inline bool -pe_rsc_is_clone(const pe_resource_t *rsc) +pe_rsc_is_clone(const pcmk_resource_t *rsc) { - return rsc && (rsc->variant == pe_clone); + return (rsc != NULL) && (rsc->variant == pcmk_rsc_variant_clone); } /*! @@ -68,9 +69,9 @@ pe_rsc_is_clone(const pe_resource_t *rsc) * \return true if resource is unique clone, false otherwise */ static inline bool -pe_rsc_is_unique_clone(const pe_resource_t *rsc) +pe_rsc_is_unique_clone(const pcmk_resource_t *rsc) { - return pe_rsc_is_clone(rsc) && pcmk_is_set(rsc->flags, pe_rsc_unique); + return pe_rsc_is_clone(rsc) && pcmk_is_set(rsc->flags, pcmk_rsc_unique); } /*! @@ -81,9 +82,9 @@ pe_rsc_is_unique_clone(const pe_resource_t *rsc) * \return true if resource is anonymous clone, false otherwise */ static inline bool -pe_rsc_is_anon_clone(const pe_resource_t *rsc) +pe_rsc_is_anon_clone(const pcmk_resource_t *rsc) { - return pe_rsc_is_clone(rsc) && !pcmk_is_set(rsc->flags, pe_rsc_unique); + return pe_rsc_is_clone(rsc) && !pcmk_is_set(rsc->flags, pcmk_rsc_unique); } /*! @@ -94,7 +95,7 @@ pe_rsc_is_anon_clone(const pe_resource_t *rsc) * \return true if resource is part of a bundle, false otherwise */ static inline bool -pe_rsc_is_bundled(const pe_resource_t *rsc) +pe_rsc_is_bundled(const pcmk_resource_t *rsc) { if (rsc == NULL) { return false; @@ -102,7 +103,7 @@ pe_rsc_is_bundled(const pe_resource_t *rsc) while (rsc->parent != NULL) { rsc = rsc->parent; } - return rsc->variant == pe_container; + return rsc->variant == pcmk_rsc_variant_bundle; } #ifdef __cplusplus |