pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
Macros | Functions
attrs.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <crm/common/xml.h>
#include <crm/common/scheduler.h>
#include <crm/common/scheduler_internal.h>
Include dependency graph for attrs.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 
#define OCF_RESKEY_PREFIX   "OCF_RESKEY_"
 
#define LRM_TARGET_ENV   OCF_RESKEY_PREFIX CRM_META "_" PCMK__META_ON_NODE
 

Functions

const char * pcmk__node_attr_target (const char *name)
 
char * pcmk_promotion_score_name (const char *rsc_id)
 Return the name of the node attribute used as a promotion score. More...
 
const char * pcmk__node_attr (const pcmk_node_t *node, const char *name, const char *target, enum pcmk__rsc_node node_type)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 11 of file attrs.c.

◆ LRM_TARGET_ENV

#define LRM_TARGET_ENV   OCF_RESKEY_PREFIX CRM_META "_" PCMK__META_ON_NODE

Definition at line 23 of file attrs.c.

◆ OCF_RESKEY_PREFIX

#define OCF_RESKEY_PREFIX   "OCF_RESKEY_"

Definition at line 22 of file attrs.c.

Function Documentation

◆ pcmk__node_attr()

const char* pcmk__node_attr ( const pcmk_node_t node,
const char *  name,
const char *  target,
enum pcmk__rsc_node  node_type 
)

Definition at line 118 of file attrs.c.

◆ pcmk__node_attr_target()

const char* pcmk__node_attr_target ( const char *  name)

Definition at line 42 of file attrs.c.

◆ pcmk_promotion_score_name()

char* pcmk_promotion_score_name ( const char *  rsc_id)

Return the name of the node attribute used as a promotion score.

Parameters
[in]rsc_idResource ID that promotion score is for (or NULL to check the OCF_RESOURCE_INSTANCE environment variable)
Returns
Newly allocated string with the node attribute name (or NULL on error, including no ID or environment variable specified)
Note
It is the caller's responsibility to free() the result.

Definition at line 92 of file attrs.c.