pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 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...
 
char * crm_generate_ra_key (const char *standard, const char *provider, const char *type)
 
bool crm_provider_required (const char *standard)
 Check whether a resource standard requires a provider to be specified. More...
 
int crm_parse_agent_spec (const char *spec, char **standard, char **provider, char **type)
 Parse a "standard[:provider]:type" agent specification. More...
 

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 11 of file agents.c.

Function Documentation

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

Definition at line 68 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 110 of file agents.c.

bool crm_provider_required ( const char *  standard)

Check whether a resource standard requires a provider to be specified.

Deprecated:
Parameters
[in]standardStandard name
Returns
TRUE if standard requires a provider, FALSE otherwise

Definition at line 90 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 29 of file agents.c.