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);
#define CRM_CHECK(expr, failure_action)
#define PCMK_RESOURCE_CLASS_SYSTEMD
char * strndup(const char *str, size_t len)
#define PCMK_RESOURCE_CLASS_OCF
#define PCMK_RESOURCE_CLASS_SERVICE
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
int crm_parse_agent_spec(const char *spec, char **standard, char **provider, char **type)
Parse a "standard[:provider]:type" agent specification.
uint32_t pcmk_get_ra_caps(const char *standard)
Get capabilities of a resource agent standard.
#define PCMK_RESOURCE_CLASS_STONITH
bool crm_provider_required(const char *standard)
Check whether a resource standard requires a provider to be specified.
#define PCMK_RESOURCE_CLASS_NAGIOS
#define PCMK_RESOURCE_CLASS_LSB
#define PCMK_RESOURCE_CLASS_UPSTART
char * crm_generate_ra_key(const char *standard, const char *provider, const char *type)
char * crm_strdup_printf(char const *format,...) __attribute__((__format__(__printf__
int pcmk__effective_rc(int rc)
enum crm_ais_msg_types type