pacemaker  2.1.0-7c3f660
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pacemaker.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019-2021 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 PACEMAKER__H
11 # define PACEMAKER__H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
23 # include <glib.h>
24 # include <libxml/tree.h>
25 # include <crm/pengine/pe_types.h>
26 
27 # include <crm/stonith-ng.h>
28 
38 int pcmk_controller_status(xmlNodePtr *xml, char *dest_node, unsigned int message_timeout_ms);
39 
48 int pcmk_designated_controller(xmlNodePtr *xml, unsigned int message_timeout_ms);
49 
59 int pcmk_pacemakerd_status(xmlNodePtr *xml, char *ipc_name, unsigned int message_timeout_ms);
60 
72 int pcmk_resource_digests(xmlNodePtr *xml, pe_resource_t *rsc,
73  pe_node_t *node, GHashTable *overrides,
74  pe_working_set_t *data_set);
75 
84 int pcmk_list_nodes(xmlNodePtr *xml, char *node_types);
85 
86 #ifdef BUILD_PUBLIC_LIBPACEMAKER
87 
104 int pcmk_fence_action(stonith_t *st, const char *target, const char *action,
105  const char *name, unsigned int timeout, unsigned int tolerance,
106  int delay);
107 
125 int pcmk_fence_history(xmlNodePtr *xml, stonith_t *st, char *target,
126  unsigned int timeout, bool quiet, int verbose,
127  bool broadcast, bool cleanup);
128 
141 int pcmk_fence_installed(xmlNodePtr *xml, stonith_t *st, unsigned int timeout);
142 
155 int pcmk_fence_last(xmlNodePtr *xml, const char *target, bool as_nodeid);
156 
170 int pcmk_fence_list_targets(xmlNodePtr *xml, stonith_t *st,
171  const char *device_id, unsigned int timeout);
172 
186 int pcmk_fence_metadata(xmlNodePtr *xml, stonith_t *st, char *agent,
187  unsigned int timeout);
188 
203 int pcmk_fence_registered(xmlNodePtr *xml, stonith_t *st, char *target,
204  unsigned int timeout);
205 
221 int pcmk_fence_register_level(stonith_t *st, char *target, int fence_level,
222  stonith_key_value_t *devices);
223 
238 int pcmk_fence_unregister_level(stonith_t *st, char *target, int fence_level);
239 
255 int pcmk_fence_validate(xmlNodePtr *xml, stonith_t *st, const char *agent,
256  const char *id, stonith_key_value_t *params,
257  unsigned int timeout);
258 
259 #endif
260 
261 #ifdef __cplusplus
262 }
263 #endif
264 
265 #endif
int pcmk_pacemakerd_status(xmlNodePtr *xml, char *ipc_name, unsigned int message_timeout_ms)
Get pacemakerd status.
int pcmk_designated_controller(xmlNodePtr *xml, unsigned int message_timeout_ms)
Get designated controller.
const char * action
Definition: pcmk_fence.c:30
int pcmk_resource_digests(xmlNodePtr *xml, pe_resource_t *rsc, pe_node_t *node, GHashTable *overrides, pe_working_set_t *data_set)
Calculate and output resource operation digests.
stonith_t * st
Definition: pcmk_fence.c:28
unsigned int tolerance
Definition: pcmk_fence.c:33
int pcmk_list_nodes(xmlNodePtr *xml, char *node_types)
Get nodes list.
const char * target
Definition: pcmk_fence.c:29
int pcmk_controller_status(xmlNodePtr *xml, char *dest_node, unsigned int message_timeout_ms)
Get controller status.
int delay
Definition: pcmk_fence.c:34
Fencing aka. STONITH.
Data types for cluster status.
char * name
Definition: pcmk_fence.c:31
unsigned int timeout
Definition: pcmk_fence.c:32