1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_AGENTS__H
11 #define PCMK__CRM_COMMON_AGENTS__H
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17
18
19
20
21
22
23 #include <stdint.h>
24 #include <stdbool.h>
25
26
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 #define PCMK_RESOURCE_CLASS_NAGIOS "nagios"
35
36 #define PCMK_RESOURCE_CLASS_UPSTART "upstart"
37
38
39
40
41 #define PCMK_STONITH_ACTION_LIMIT "pcmk_action_limit"
42 #define PCMK_STONITH_DELAY_BASE "pcmk_delay_base"
43 #define PCMK_STONITH_DELAY_MAX "pcmk_delay_max"
44 #define PCMK_STONITH_HOST_ARGUMENT "pcmk_host_argument"
45 #define PCMK_STONITH_HOST_CHECK "pcmk_host_check"
46 #define PCMK_STONITH_HOST_LIST "pcmk_host_list"
47 #define PCMK_STONITH_HOST_MAP "pcmk_host_map"
48 #define PCMK_STONITH_PROVIDES "provides"
49 #define PCMK_STONITH_STONITH_TIMEOUT "stonith-timeout"
50
51
52 #define PCMK_OCF_MAJOR_VERSION "1"
53 #define PCMK_OCF_MINOR_VERSION "1"
54 #define PCMK_OCF_VERSION PCMK_OCF_MAJOR_VERSION "." PCMK_OCF_MINOR_VERSION
55
56
57 enum pcmk_ra_caps {
58 pcmk_ra_cap_none = 0U,
59 pcmk_ra_cap_provider = (1U << 0),
60 pcmk_ra_cap_status = (1U << 1),
61 pcmk_ra_cap_params = (1U << 2),
62 pcmk_ra_cap_unique = (1U << 3),
63 pcmk_ra_cap_promotable = (1U << 4),
64 pcmk_ra_cap_stdin = (1U << 5),
65 pcmk_ra_cap_fence_params = (1U << 6),
66 pcmk_ra_cap_cli_exec = (1U << 7),
67 };
68
69 uint32_t pcmk_get_ra_caps(const char *standard);
70 char *crm_generate_ra_key(const char *standard, const char *provider,
71 const char *type);
72 int crm_parse_agent_spec(const char *spec, char **standard, char **provider,
73 char **type);
74 bool pcmk_stonith_param(const char *param);
75
76 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
77 #include <crm/common/agents_compat.h>
78 #endif
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif