pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
roles.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CRM_COMMON_ROLES__H
11 #define PCMK__CRM_COMMON_ROLES__H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
23 // String equivalents of enum rsc_role_e
24 
25 #define PCMK_ROLE_STOPPED "Stopped"
26 #define PCMK_ROLE_STARTED "Started"
27 #define PCMK_ROLE_UNPROMOTED "Unpromoted"
28 #define PCMK_ROLE_PROMOTED "Promoted"
29 
34 enum rsc_role_e {
40 };
41 
42 const char *pcmk_role_text(enum rsc_role_e role);
43 enum rsc_role_e pcmk_parse_role(const char *role);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif // PCMK__CRM_COMMON_ROLES__H
const char * pcmk_role_text(enum rsc_role_e role)
Get readable description of a resource role.
Definition: roles.c:23
Stopped.
Definition: roles.h:36
Promoted.
Definition: roles.h:39
enum rsc_role_e pcmk_parse_role(const char *role)
Parse a resource role from a string role specification.
Definition: roles.c:51
Unpromoted.
Definition: roles.h:38
rsc_role_e
Definition: roles.h:34
Started.
Definition: roles.h:37
Resource role is unknown.
Definition: roles.h:35