36 if (standard == NULL) {
95 if (!standard && !provider && !type) {
100 (standard? standard :
""),
101 (provider?
":" :
""), (provider? provider :
""),
125 CRM_CHECK(spec && standard && provider && type,
return -EINVAL);
130 colon = strchr(spec,
':');
131 if ((colon == NULL) || (colon == spec)) {
135 *standard =
strndup(spec, colon - spec);
139 colon = strchr(spec,
':');
140 if ((colon == NULL) || (colon == spec)) {
144 *provider =
strndup(spec, colon - spec);
154 *type = strdup(spec);
193 param = strchr(param + 5,
'_');
#define CRM_CHECK(expr, failure_action)
#define PCMK_STONITH_HOST_CHECK
#define PCMK_STONITH_PROVIDES
#define PCMK_STONITH_HOST_MAP
#define PCMK_RESOURCE_CLASS_SYSTEMD
bool pcmk_stonith_param(const char *param)
Check whether a given stonith parameter is handled by Pacemaker.
#define PCMK_STONITH_STONITH_TIMEOUT
#define PCMK_STONITH_HOST_LIST
enum crm_ais_msg_types type
char * strndup(const char *str, size_t len)
bool crm_provider_required(const char *standard)
int pcmk__effective_rc(int rc)
#define PCMK_RESOURCE_CLASS_OCF
#define PCMK_RESOURCE_CLASS_SERVICE
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define PCMK_STONITH_ACTION_LIMIT
Deprecated Pacemaker resource agent API.
char * crm_generate_ra_key(const char *standard, const char *provider, const char *type)
#define PCMK_RESOURCE_CLASS_STONITH
#define PCMK_STONITH_HOST_ARGUMENT
#define PCMK_RESOURCE_CLASS_NAGIOS
#define PCMK_RESOURCE_CLASS_LSB
int crm_parse_agent_spec(const char *spec, char **standard, char **provider, char **type)
Parse a "standard[:provider]:type" agent specification.
#define PCMK_RESOURCE_CLASS_UPSTART
#define PCMK_STONITH_DELAY_BASE
uint32_t pcmk_get_ra_caps(const char *standard)
Get capabilities of a resource agent standard.
bool pcmk__starts_with(const char *str, const char *prefix)
Check whether a string starts with a certain sequence.
#define PCMK_STONITH_DELAY_MAX