summaryrefslogtreecommitdiffstats
path: root/include/pcmki/pcmki_scheduler.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:53:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:53:20 +0000
commite5a812082ae033afb1eed82c0f2df3d0f6bdc93f (patch)
treea6716c9275b4b413f6c9194798b34b91affb3cc7 /include/pcmki/pcmki_scheduler.h
parentInitial commit. (diff)
downloadpacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.tar.xz
pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.zip
Adding upstream version 2.1.6.upstream/2.1.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/pcmki/pcmki_scheduler.h')
-rw-r--r--include/pcmki/pcmki_scheduler.h43
1 files changed, 43 insertions, 0 deletions
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 <glib.h>
+# include <crm/crm.h>
+# include <crm/common/iso8601.h>
+# include <crm/pengine/rules.h>
+# include <crm/pengine/common.h>
+# include <crm/pengine/status.h>
+
+# include <crm/pengine/complex.h>
+
+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