1
2
3
4
5
6
7
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
17
18
19
20
21
22
23
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
30
31
32
33
34 enum rsc_role_e {
35 pcmk_role_unknown = 0,
36 pcmk_role_stopped = 1,
37 pcmk_role_started = 2,
38 pcmk_role_unpromoted = 3,
39 pcmk_role_promoted = 4,
40
41 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
42
43 RSC_ROLE_UNKNOWN = pcmk_role_unknown,
44
45
46 RSC_ROLE_STOPPED = pcmk_role_stopped,
47
48
49 RSC_ROLE_STARTED = pcmk_role_started,
50
51
52 RSC_ROLE_UNPROMOTED = pcmk_role_unpromoted,
53
54
55 RSC_ROLE_SLAVE = pcmk_role_unpromoted,
56
57
58 RSC_ROLE_PROMOTED = pcmk_role_promoted,
59
60
61 RSC_ROLE_MASTER = pcmk_role_promoted,
62 #endif
63 };
64
65 const char *pcmk_role_text(enum rsc_role_e role);
66 enum rsc_role_e pcmk_parse_role(const char *role);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif