pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Enumerations | Functions
roles.h File Reference

Scheduler API for resource roles. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCMK_ROLE_STOPPED   "Stopped"
 
#define PCMK_ROLE_STARTED   "Started"
 
#define PCMK_ROLE_UNPROMOTED   "Unpromoted"
 
#define PCMK_ROLE_PROMOTED   "Promoted"
 

Enumerations

enum  rsc_role_e {
  pcmk_role_unknown = 0, pcmk_role_stopped = 1, pcmk_role_started = 2, pcmk_role_unpromoted = 3,
  pcmk_role_promoted = 4, RSC_ROLE_UNKNOWN = pcmk_role_unknown, RSC_ROLE_STOPPED = pcmk_role_stopped, RSC_ROLE_STARTED = pcmk_role_started,
  RSC_ROLE_UNPROMOTED = pcmk_role_unpromoted, RSC_ROLE_SLAVE = pcmk_role_unpromoted, RSC_ROLE_PROMOTED = pcmk_role_promoted, RSC_ROLE_MASTER = pcmk_role_promoted
}
 

Functions

const char * pcmk_role_text (enum rsc_role_e role)
 Get readable description of a resource role. More...
 
enum rsc_role_e pcmk_parse_role (const char *role)
 Parse a resource role from a string role specification. More...
 

Detailed Description

Scheduler API for resource roles.

Definition in file roles.h.

Macro Definition Documentation

◆ PCMK_ROLE_PROMOTED

#define PCMK_ROLE_PROMOTED   "Promoted"

Definition at line 28 of file roles.h.

◆ PCMK_ROLE_STARTED

#define PCMK_ROLE_STARTED   "Started"

Definition at line 26 of file roles.h.

◆ PCMK_ROLE_STOPPED

#define PCMK_ROLE_STOPPED   "Stopped"

Definition at line 25 of file roles.h.

◆ PCMK_ROLE_UNPROMOTED

#define PCMK_ROLE_UNPROMOTED   "Unpromoted"

Definition at line 27 of file roles.h.

Enumeration Type Documentation

◆ rsc_role_e

enum rsc_role_e

Possible roles that a resource can be in (order matters; values can be compared with less than and greater than)

Enumerator
pcmk_role_unknown 

Resource role is unknown.

pcmk_role_stopped 

Stopped.

pcmk_role_started 

Started.

pcmk_role_unpromoted 

Unpromoted.

pcmk_role_promoted 

Promoted.

RSC_ROLE_UNKNOWN 
Deprecated:
Use pcmk_role_unknown instead
RSC_ROLE_STOPPED 
Deprecated:
Use pcmk_role_stopped instead
RSC_ROLE_STARTED 
Deprecated:
Use pcmk_role_started instead
RSC_ROLE_UNPROMOTED 
Deprecated:
Use pcmk_role_unpromoted instead
RSC_ROLE_SLAVE 
Deprecated:
Use pcmk_role_unpromoted instead
RSC_ROLE_PROMOTED 
Deprecated:
Use pcmk_role_promoted instead
RSC_ROLE_MASTER 
Deprecated:
Use pcmk_role_promoted instead

Definition at line 34 of file roles.h.

Function Documentation

◆ pcmk_parse_role()

enum rsc_role_e pcmk_parse_role ( const char *  role)

Parse a resource role from a string role specification.

Parameters
[in]roleRole specification
Returns
Resource role corresponding to role

Definition at line 59 of file roles.c.

◆ pcmk_role_text()

const char* pcmk_role_text ( enum rsc_role_e  role)

Get readable description of a resource role.

Parameters
[in]roleResource role
Returns
Static string describing role, suitable for logging or display

Definition at line 23 of file roles.c.