pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
fencing_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018-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__FENCING_FENCING_PRIVATE__H
11 #define PCMK__FENCING_FENCING_PRIVATE__H
12 
13 #include <stdbool.h> // bool
14 
15 #include <glib.h> // G_GNUC_INTERNAL, GHashTable
16 
17 #include <crm/stonith-ng.h> // stonith_t, stonith_key_value_t
18 #include <crm/fencing/internal.h> // stonith_action_t
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 G_GNUC_INTERNAL
26 
27 // Utilities from st_rhcs.c
28 
29 G_GNUC_INTERNAL
31 
32 G_GNUC_INTERNAL
33 int stonith__rhcs_metadata(const char *agent, int timeout, char **output);
34 
35 G_GNUC_INTERNAL
36 bool stonith__agent_is_rhcs(const char *agent);
37 
38 G_GNUC_INTERNAL
39 int stonith__rhcs_validate(stonith_t *st, int call_options, const char *target,
40  const char *agent, GHashTable *params,
41  const char *host_arg, int timeout,
42  char **output, char **error_output);
43 
44 #ifdef HAVE_STONITH_STONITH_H
45 // Utilities from st_lha.c
46 
47 G_GNUC_INTERNAL
49 
50 G_GNUC_INTERNAL
51 int stonith__lha_metadata(const char *agent, int timeout, char **output);
52 
53 G_GNUC_INTERNAL
54 bool stonith__agent_is_lha(const char *agent);
55 
56 G_GNUC_INTERNAL
57 int stonith__lha_validate(stonith_t *st, int call_options, const char *target,
58  const char *agent, GHashTable *params,
59  int timeout, char **output, char **error_output);
60 #endif
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif // PCMK__FENCING_FENCING_PRIVATE__H
struct stonith_action_s stonith_action_t
Definition: internal.h:56
int stonith__lha_validate(stonith_t *st, int call_options, const char *target, const char *agent, GHashTable *params, int timeout, char **output, char **error_output)
Definition: st_lha.c:302
int stonith__lha_metadata(const char *agent, int timeout, char **output)
Definition: st_lha.c:179
const char * action
Definition: pcmk_fence.c:32
int stonith__list_lha_agents(stonith_key_value_t **devices)
Definition: st_lha.c:119
stonith_t * st
Definition: pcmk_fence.c:30
G_GNUC_INTERNAL int stonith__rhcs_validate(stonith_t *st, int call_options, const char *target, const char *agent, GHashTable *params, const char *host_arg, int timeout, char **output, char **error_output)
Definition: st_rhcs.c:268
G_GNUC_INTERNAL bool stonith__agent_is_rhcs(const char *agent)
Definition: st_rhcs.c:257
const char * target
Definition: pcmk_fence.c:31
G_GNUC_INTERNAL int stonith__list_rhcs_agents(stonith_key_value_t **devices)
Definition: st_rhcs.c:36
Fencing aka. STONITH.
G_GNUC_INTERNAL int stonith__rhcs_metadata(const char *agent, int timeout, char **output)
Retrieve metadata for RHCS-compatible fence agent.
Definition: st_rhcs.c:225
bool stonith__agent_is_lha(const char *agent)
Definition: st_lha.c:92
unsigned int timeout
Definition: pcmk_fence.c:34
G_GNUC_INTERNAL int stonith__execute(stonith_action_t *action)
Definition: st_actions.c:695