pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Macros | Enumerations | Functions
agents.h File Reference

API related to resource agents. More...

#include <stdint.h>
#include <stdbool.h>
#include <crm/common/agents_compat.h>
Include dependency graph for agents.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCMK_RESOURCE_CLASS_OCF   "ocf"
 
#define PCMK_RESOURCE_CLASS_SERVICE   "service"
 
#define PCMK_RESOURCE_CLASS_LSB   "lsb"
 
#define PCMK_RESOURCE_CLASS_SYSTEMD   "systemd"
 
#define PCMK_RESOURCE_CLASS_STONITH   "stonith"
 
#define PCMK_RESOURCE_CLASS_ALERT   "alert"
 
#define PCMK_RESOURCE_CLASS_NAGIOS   "nagios"
 
#define PCMK_RESOURCE_CLASS_UPSTART   "upstart"
 
#define PCMK_STONITH_ACTION_LIMIT   "pcmk_action_limit"
 
#define PCMK_STONITH_DELAY_BASE   "pcmk_delay_base"
 
#define PCMK_STONITH_DELAY_MAX   "pcmk_delay_max"
 
#define PCMK_STONITH_HOST_ARGUMENT   "pcmk_host_argument"
 
#define PCMK_STONITH_HOST_CHECK   "pcmk_host_check"
 
#define PCMK_STONITH_HOST_LIST   "pcmk_host_list"
 
#define PCMK_STONITH_HOST_MAP   "pcmk_host_map"
 
#define PCMK_STONITH_PROVIDES   "provides"
 
#define PCMK_STONITH_STONITH_TIMEOUT   "stonith-timeout"
 
#define PCMK_OCF_MAJOR_VERSION   "1"
 
#define PCMK_OCF_MINOR_VERSION   "1"
 
#define PCMK_OCF_VERSION   PCMK_OCF_MAJOR_VERSION "." PCMK_OCF_MINOR_VERSION
 

Enumerations

enum  pcmk_ra_caps {
  pcmk_ra_cap_none = 0, pcmk_ra_cap_provider = (1 << 0), pcmk_ra_cap_status = (1 << 1), pcmk_ra_cap_params = (1 << 2),
  pcmk_ra_cap_unique = (1 << 3), pcmk_ra_cap_promotable = (1 << 4), pcmk_ra_cap_stdin = (1 << 5), pcmk_ra_cap_fence_params = (1 << 6)
}
 

Functions

uint32_t pcmk_get_ra_caps (const char *standard)
 Get capabilities of a resource agent standard. More...
 
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...
 

Detailed Description

API related to resource agents.

Definition in file agents.h.

Macro Definition Documentation

◆ PCMK_OCF_MAJOR_VERSION

#define PCMK_OCF_MAJOR_VERSION   "1"

Definition at line 52 of file agents.h.

◆ PCMK_OCF_MINOR_VERSION

#define PCMK_OCF_MINOR_VERSION   "1"

Definition at line 53 of file agents.h.

◆ PCMK_OCF_VERSION

#define PCMK_OCF_VERSION   PCMK_OCF_MAJOR_VERSION "." PCMK_OCF_MINOR_VERSION

Definition at line 54 of file agents.h.

◆ PCMK_RESOURCE_CLASS_ALERT

#define PCMK_RESOURCE_CLASS_ALERT   "alert"

Definition at line 32 of file agents.h.

◆ PCMK_RESOURCE_CLASS_LSB

#define PCMK_RESOURCE_CLASS_LSB   "lsb"

Definition at line 29 of file agents.h.

◆ PCMK_RESOURCE_CLASS_NAGIOS

#define PCMK_RESOURCE_CLASS_NAGIOS   "nagios"
Deprecated:
Do not use

Definition at line 34 of file agents.h.

◆ PCMK_RESOURCE_CLASS_OCF

#define PCMK_RESOURCE_CLASS_OCF   "ocf"

Definition at line 27 of file agents.h.

◆ PCMK_RESOURCE_CLASS_SERVICE

#define PCMK_RESOURCE_CLASS_SERVICE   "service"

Definition at line 28 of file agents.h.

◆ PCMK_RESOURCE_CLASS_STONITH

#define PCMK_RESOURCE_CLASS_STONITH   "stonith"

Definition at line 31 of file agents.h.

◆ PCMK_RESOURCE_CLASS_SYSTEMD

#define PCMK_RESOURCE_CLASS_SYSTEMD   "systemd"

Definition at line 30 of file agents.h.

◆ PCMK_RESOURCE_CLASS_UPSTART

#define PCMK_RESOURCE_CLASS_UPSTART   "upstart"
Deprecated:
Do not use

Definition at line 36 of file agents.h.

◆ PCMK_STONITH_ACTION_LIMIT

#define PCMK_STONITH_ACTION_LIMIT   "pcmk_action_limit"

Definition at line 41 of file agents.h.

◆ PCMK_STONITH_DELAY_BASE

#define PCMK_STONITH_DELAY_BASE   "pcmk_delay_base"

Definition at line 42 of file agents.h.

◆ PCMK_STONITH_DELAY_MAX

#define PCMK_STONITH_DELAY_MAX   "pcmk_delay_max"

Definition at line 43 of file agents.h.

◆ PCMK_STONITH_HOST_ARGUMENT

#define PCMK_STONITH_HOST_ARGUMENT   "pcmk_host_argument"

Definition at line 44 of file agents.h.

◆ PCMK_STONITH_HOST_CHECK

#define PCMK_STONITH_HOST_CHECK   "pcmk_host_check"

Definition at line 45 of file agents.h.

◆ PCMK_STONITH_HOST_LIST

#define PCMK_STONITH_HOST_LIST   "pcmk_host_list"

Definition at line 46 of file agents.h.

◆ PCMK_STONITH_HOST_MAP

#define PCMK_STONITH_HOST_MAP   "pcmk_host_map"

Definition at line 47 of file agents.h.

◆ PCMK_STONITH_PROVIDES

#define PCMK_STONITH_PROVIDES   "provides"

Definition at line 48 of file agents.h.

◆ PCMK_STONITH_STONITH_TIMEOUT

#define PCMK_STONITH_STONITH_TIMEOUT   "stonith-timeout"

Definition at line 49 of file agents.h.

Enumeration Type Documentation

◆ pcmk_ra_caps

Enumerator
pcmk_ra_cap_none 
pcmk_ra_cap_provider 
pcmk_ra_cap_status 
pcmk_ra_cap_params 
pcmk_ra_cap_unique 
pcmk_ra_cap_promotable 
pcmk_ra_cap_stdin 
pcmk_ra_cap_fence_params 

Definition at line 57 of file agents.h.

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.

◆ 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.