36 if (standard == NULL) {
95 bool std_empty = pcmk__str_empty(standard);
96 bool prov_empty = pcmk__str_empty(provider);
97 bool ty_empty = pcmk__str_empty(
type);
99 if (std_empty || ty_empty) {
105 (prov_empty ?
"" :
":"), (prov_empty ?
"" : provider),
129 CRM_CHECK(spec && standard && provider &&
type,
return -EINVAL);
134 colon = strchr(spec,
':');
135 if ((colon == NULL) || (colon == spec)) {
139 *standard =
strndup(spec, colon - spec);
143 colon = strchr(spec,
':');
144 if ((colon == NULL) || (colon == spec)) {
148 *provider =
strndup(spec, colon - spec);
158 *
type = strdup(spec);
197 param = strchr(param + 5,
'_');
#define CRM_CHECK(expr, failure_action)
Service active and promoted.
#define PCMK_STONITH_HOST_CHECK
#define PCMK_RESOURCE_CLASS_SERVICE
#define PCMK_STONITH_PROVIDES
#define PCMK_STONITH_HOST_MAP
#define PCMK_RESOURCE_CLASS_OCF
#define PCMK_STONITH_STONITH_TIMEOUT
Service promoted but more likely to fail soon.
#define PCMK_RESOURCE_CLASS_SYSTEMD
#define PCMK_STONITH_HOST_LIST
enum crm_ais_msg_types type
bool pcmk_stonith_param(const char *param)
Check whether a given stonith parameter is handled by Pacemaker.
char * strndup(const char *str, size_t len)
#define PCMK_RESOURCE_CLASS_UPSTART
#define PCMK_RESOURCE_CLASS_STONITH
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
int crm_parse_agent_spec(const char *spec, char **standard, char **provider, char **type)
Parse a "standard[:provider]:type" agent specification.
Deprecated Pacemaker resource agent API.
uint32_t pcmk_get_ra_caps(const char *standard)
Get capabilities of a resource agent standard.
bool crm_provider_required(const char *standard)
#define PCMK_STONITH_HOST_ARGUMENT
Service active but more likely to fail soon.
#define PCMK_RESOURCE_CLASS_LSB
#define PCMK_STONITH_DELAY_BASE
bool pcmk__starts_with(const char *str, const char *prefix)
Check whether a string starts with a certain sequence.
char * crm_generate_ra_key(const char *standard, const char *provider, const char *type)
#define PCMK_RESOURCE_CLASS_NAGIOS
#define PCMK_STONITH_DELAY_MAX
int pcmk__effective_rc(int rc)