pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
agents.h
Go to the documentation of this file.
1/*
2 * Copyright 2017-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__CRM_COMMON_AGENTS__H
11#define PCMK__CRM_COMMON_AGENTS__H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
23#include <stdint.h> // uint32_t
24#include <stdbool.h>
25
26// Known (not necessarily supported) resource classes
27#define PCMK_RESOURCE_CLASS_OCF "ocf"
28#define PCMK_RESOURCE_CLASS_SERVICE "service"
29#define PCMK_RESOURCE_CLASS_LSB "lsb"
30#define PCMK_RESOURCE_CLASS_SYSTEMD "systemd"
31#define PCMK_RESOURCE_CLASS_STONITH "stonith"
32#define PCMK_RESOURCE_CLASS_ALERT "alert"
33
34/* Special stonith-class agent parameters interpreted directly by Pacemaker
35 * (not including the pcmk_ACTION_{action,retries,timeout} parameters)
36 */
37#define PCMK_STONITH_ACTION_LIMIT "pcmk_action_limit"
38#define PCMK_STONITH_DELAY_BASE "pcmk_delay_base"
39#define PCMK_STONITH_DELAY_MAX "pcmk_delay_max"
40#define PCMK_STONITH_HOST_ARGUMENT "pcmk_host_argument"
41#define PCMK_STONITH_HOST_CHECK "pcmk_host_check"
42#define PCMK_STONITH_HOST_LIST "pcmk_host_list"
43#define PCMK_STONITH_HOST_MAP "pcmk_host_map"
44#define PCMK_STONITH_PROVIDES "provides"
45#define PCMK_STONITH_STONITH_TIMEOUT "stonith-timeout"
46
47// OCF Resource Agent API standard version that this Pacemaker supports
48#define PCMK_OCF_MAJOR_VERSION "1"
49#define PCMK_OCF_MINOR_VERSION "1"
50#define PCMK_OCF_VERSION PCMK_OCF_MAJOR_VERSION "." PCMK_OCF_MINOR_VERSION
51
52// Capabilities supported by a resource agent standard
55 pcmk_ra_cap_provider = (1U << 0), // Requires provider
56 pcmk_ra_cap_status = (1U << 1), // Supports status instead of monitor
57 pcmk_ra_cap_params = (1U << 2), // Supports parameters
58 pcmk_ra_cap_unique = (1U << 3), // Supports unique clones
59 pcmk_ra_cap_promotable = (1U << 4), // Supports promotable clones
60 pcmk_ra_cap_stdin = (1U << 5), // Reads from standard input
61 pcmk_ra_cap_fence_params = (1U << 6), // Supports pcmk_monitor_timeout, etc.
62 pcmk_ra_cap_cli_exec = (1U << 7), // Supports execution by crm_resource
63};
64
65uint32_t pcmk_get_ra_caps(const char *standard);
66char *crm_generate_ra_key(const char *standard, const char *provider,
67 const char *type);
68int crm_parse_agent_spec(const char *spec, char **standard, char **provider,
69 char **type);
70bool pcmk_stonith_param(const char *param);
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif // PCMK__CRM_COMMON_AGENTS__H
int crm_parse_agent_spec(const char *spec, char **standard, char **provider, char **type)
Parse a "standard[:provider]:type" agent specification.
Definition agents.c:116
uint32_t pcmk_get_ra_caps(const char *standard)
Get capabilities of a resource agent standard.
Definition agents.c:27
bool pcmk_stonith_param(const char *param)
Check whether a given stonith parameter is handled by Pacemaker.
Definition agents.c:166
pcmk_ra_caps
Definition agents.h:53
@ pcmk_ra_cap_status
Definition agents.h:56
@ pcmk_ra_cap_cli_exec
Definition agents.h:62
@ pcmk_ra_cap_none
Definition agents.h:54
@ pcmk_ra_cap_unique
Definition agents.h:58
@ pcmk_ra_cap_params
Definition agents.h:57
@ pcmk_ra_cap_promotable
Definition agents.h:59
@ pcmk_ra_cap_provider
Definition agents.h:55
@ pcmk_ra_cap_fence_params
Definition agents.h:61
@ pcmk_ra_cap_stdin
Definition agents.h:60
char * crm_generate_ra_key(const char *standard, const char *provider, const char *type)
Definition agents.c:84
enum pcmk_ipc_server type
Definition cpg.c:3