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