This source file includes following definitions.
- pcmk_resource_id
- pcmk_resource_is_managed
- pcmk__multiply_active_text
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <stdio.h>
13 #include <stdbool.h>
14
15 #include <crm/common/scheduler.h>
16 #include <crm/common/scheduler_internal.h>
17
18
19
20
21
22
23
24
25
26 const char *
27 pcmk_resource_id(const pcmk_resource_t *rsc)
28 {
29 return (rsc == NULL)? NULL : rsc->id;
30 }
31
32
33
34
35
36
37
38
39
40 bool
41 pcmk_resource_is_managed(const pcmk_resource_t *rsc)
42 {
43 return (rsc == NULL)? false : pcmk_is_set(rsc->flags, pcmk_rsc_managed);
44 }
45
46
47
48
49
50
51
52
53 const char *
54 pcmk__multiply_active_text(enum rsc_recovery_type recovery)
55 {
56 switch (recovery) {
57 case pcmk_multiply_active_stop:
58 return "shutting it down";
59 case pcmk_multiply_active_restart:
60 return "attempting recovery";
61 case pcmk_multiply_active_block:
62 return "waiting for an administrator";
63 case pcmk_multiply_active_unexpected:
64 return "stopping unexpected instances";
65 }
66 return "Unknown";
67 }