pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Functions
agents.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <crm/crm.h>
#include <crm/common/util.h>
#include <crm/common/agents_compat.h>
Include dependency graph for agents.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Functions

uint32_t pcmk_get_ra_caps (const char *standard)
 Get capabilities of a resource agent standard. More...
 
int pcmk__effective_rc (int rc)
 
char * crm_generate_ra_key (const char *standard, const char *provider, const char *type)
 
int crm_parse_agent_spec (const char *spec, char **standard, char **provider, char **type)
 Parse a "standard[:provider]:type" agent specification. More...
 
bool pcmk_stonith_param (const char *param)
 Check whether a given stonith parameter is handled by Pacemaker. More...
 
bool crm_provider_required (const char *standard)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 13 of file agents.c.

Function Documentation

◆ crm_generate_ra_key()

char* crm_generate_ra_key ( const char *  standard,
const char *  provider,
const char *  type 
)

Definition at line 92 of file agents.c.

◆ crm_parse_agent_spec()

int crm_parse_agent_spec ( const char *  spec,
char **  standard,
char **  provider,
char **  type 
)

Parse a "standard[:provider]:type" agent specification.

Parameters
[in]specAgent specification
[out]standardNewly allocated memory containing agent standard (or NULL)
[out]providerNewly allocated memory containing agent provider (or NULL)
[put]type Newly allocated memory containing agent type (or NULL)
Returns
pcmk_ok if the string could be parsed, -EINVAL otherwise
Note
It is acceptable for the type to contain a ':' if the standard supports that. For example, systemd supports the form "systemd:UNIT@A:B".
It is the caller's responsibility to free the returned values.

Definition at line 124 of file agents.c.

◆ crm_provider_required()

bool crm_provider_required ( const char *  standard)
Deprecated:
Use pcmk_get_ra_caps() instead

Definition at line 207 of file agents.c.

◆ pcmk__effective_rc()

int pcmk__effective_rc ( int  rc)

Definition at line 71 of file agents.c.

◆ pcmk_get_ra_caps()

uint32_t pcmk_get_ra_caps ( const char *  standard)

Get capabilities of a resource agent standard.

Parameters
[in]standardStandard name
Returns
Bitmask of enum pcmk_ra_caps values

Definition at line 31 of file agents.c.

◆ pcmk_stonith_param()

bool pcmk_stonith_param ( const char *  param)

Check whether a given stonith parameter is handled by Pacemaker.

Return true if a given string is the name of one of the special resource instance attributes interpreted directly by Pacemaker for stonith-class resources.

Parameters
[in]paramParameter name to check
Returns
true if param is a special fencing parameter

Definition at line 174 of file agents.c.