pacemaker  2.1.0-7c3f660
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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_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

#define PCMK_OCF_MAJOR_VERSION   "1"

Definition at line 40 of file agents.h.

#define PCMK_OCF_MINOR_VERSION   "1"

Definition at line 41 of file agents.h.

#define PCMK_OCF_VERSION   PCMK_OCF_MAJOR_VERSION "." PCMK_OCF_MINOR_VERSION

Definition at line 42 of file agents.h.

#define PCMK_STONITH_ACTION_LIMIT   "pcmk_action_limit"

Definition at line 29 of file agents.h.

#define PCMK_STONITH_DELAY_BASE   "pcmk_delay_base"

Definition at line 30 of file agents.h.

#define PCMK_STONITH_DELAY_MAX   "pcmk_delay_max"

Definition at line 31 of file agents.h.

#define PCMK_STONITH_HOST_ARGUMENT   "pcmk_host_argument"

Definition at line 32 of file agents.h.

#define PCMK_STONITH_HOST_CHECK   "pcmk_host_check"

Definition at line 33 of file agents.h.

#define PCMK_STONITH_HOST_LIST   "pcmk_host_list"

Definition at line 34 of file agents.h.

#define PCMK_STONITH_HOST_MAP   "pcmk_host_map"

Definition at line 35 of file agents.h.

#define PCMK_STONITH_PROVIDES   "provides"

Definition at line 36 of file agents.h.

#define PCMK_STONITH_STONITH_TIMEOUT   "stonith-timeout"

Definition at line 37 of file agents.h.

Enumeration Type Documentation

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 45 of file agents.h.

Function Documentation

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

Definition at line 92 of file agents.c.

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 120 of file agents.c.

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.

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 170 of file agents.c.