pacemaker  2.1.5-b7adf64e51
Scalable High-Availability cluster resource manager
Macros | Functions
attrs.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <crm/msg_xml.h>
#include <crm/common/attrd_internal.h>
Include dependency graph for attrs.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 
#define LRM_TARGET_ENV   "OCF_RESKEY_" CRM_META "_" XML_LRM_ATTR_TARGET
 

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

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_" CRM_META "_" XML_LRM_ATTR_TARGET

Definition at line 21 of file attrs.c.

Function Documentation

◆ pcmk__node_attr_target()

const char* pcmk__node_attr_target ( const char *  name)

Definition at line 39 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 80 of file attrs.c.