From e5a812082ae033afb1eed82c0f2df3d0f6bdc93f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 08:53:20 +0200 Subject: Adding upstream version 2.1.6. Signed-off-by: Daniel Baumann --- include/pcmki/pcmki_scheduler.h | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 include/pcmki/pcmki_scheduler.h (limited to 'include/pcmki/pcmki_scheduler.h') diff --git a/include/pcmki/pcmki_scheduler.h b/include/pcmki/pcmki_scheduler.h new file mode 100644 index 0000000..dde50a5 --- /dev/null +++ b/include/pcmki/pcmki_scheduler.h @@ -0,0 +1,43 @@ +/* + * Copyright 2014-2023 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef PCMK__PCMKI_PCMKI_SCHEDULER__H +# define PCMK__PCMKI_PCMKI_SCHEDULER__H + +# include +# include +# include +# include +# include +# include + +# include + +typedef struct { + const char *id; + const char *node_attribute; + pe_resource_t *dependent; // The resource being colocated + pe_resource_t *primary; // The resource the dependent is colocated with + + int dependent_role; // Colocation applies only if dependent has this role + int primary_role; // Colocation applies only if primary has this role + + int score; + bool influence; // Whether dependent influences active primary placement +} pcmk__colocation_t; + +void pcmk__unpack_constraints(pe_working_set_t *data_set); + +void pcmk__schedule_actions(xmlNode *cib, unsigned long long flags, + pe_working_set_t *data_set); + +GList *pcmk__with_this_colocations(const pe_resource_t *rsc); +GList *pcmk__this_with_colocations(const pe_resource_t *rsc); + +#endif -- cgit v1.2.3