1
2
3
4
5
6
7
8
9
10 #ifndef PE_STATUS_PRIVATE__H
11 # define PE_STATUS_PRIVATE__H
12
13
14
15
16
17 #if defined(PCMK__UNIT_TESTING)
18 #undef G_GNUC_INTERNAL
19 #define G_GNUC_INTERNAL
20 #endif
21
22
23
24
25
26 # define status_print(fmt, args...) \
27 if(options & pe_print_html) { \
28 FILE *stream = print_data; \
29 fprintf(stream, fmt, ##args); \
30 } else if(options & pe_print_printf || options & pe_print_ncurses) { \
31 FILE *stream = print_data; \
32 fprintf(stream, fmt, ##args); \
33 } else if(options & pe_print_xml) { \
34 FILE *stream = print_data; \
35 fprintf(stream, fmt, ##args); \
36 } else if(options & pe_print_log) { \
37 int log_level = *(int*)print_data; \
38 do_crm_log(log_level, fmt, ##args); \
39 }
40
41 typedef struct notify_data_s {
42 GSList *keys;
43
44 const char *action;
45
46 pe_action_t *pre;
47 pe_action_t *post;
48 pe_action_t *pre_done;
49 pe_action_t *post_done;
50
51 GList *active;
52 GList *inactive;
53 GList *start;
54 GList *stop;
55 GList *demote;
56 GList *promote;
57 GList *promoted;
58 GList *unpromoted;
59 GHashTable *allowed_nodes;
60 } notify_data_t;
61
62 G_GNUC_INTERNAL
63 pe_resource_t *pe__create_clone_child(pe_resource_t *rsc,
64 pe_working_set_t *data_set);
65
66 G_GNUC_INTERNAL
67 void pe__create_action_notifications(pe_resource_t *rsc, notify_data_t *n_data);
68
69 G_GNUC_INTERNAL
70 void pe__free_action_notification_data(notify_data_t *n_data);
71
72 G_GNUC_INTERNAL
73 notify_data_t *pe__action_notif_pseudo_ops(pe_resource_t *rsc, const char *task,
74 pe_action_t *action,
75 pe_action_t *complete);
76
77 G_GNUC_INTERNAL
78 void pe__force_anon(const char *standard, pe_resource_t *rsc, const char *rid,
79 pe_working_set_t *data_set);
80
81 G_GNUC_INTERNAL
82 gint pe__cmp_rsc_priority(gconstpointer a, gconstpointer b);
83
84 G_GNUC_INTERNAL
85 gboolean pe__unpack_resource(xmlNode *xml_obj, pe_resource_t **rsc,
86 pe_resource_t *parent, pe_working_set_t *data_set);
87
88 G_GNUC_INTERNAL
89 gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set);
90
91 G_GNUC_INTERNAL
92 gboolean unpack_resources(const xmlNode *xml_resources,
93 pe_working_set_t *data_set);
94
95 G_GNUC_INTERNAL
96 gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set);
97
98 G_GNUC_INTERNAL
99 gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set);
100
101 G_GNUC_INTERNAL
102 gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set);
103
104 G_GNUC_INTERNAL
105 gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set);
106
107 G_GNUC_INTERNAL
108 op_digest_cache_t *pe__compare_fencing_digest(pe_resource_t *rsc,
109 const char *agent,
110 pe_node_t *node,
111 pe_working_set_t *data_set);
112
113 G_GNUC_INTERNAL
114 void pe__unpack_node_health_scores(pe_working_set_t *data_set);
115
116 G_GNUC_INTERNAL
117 pe_node_t *pe__bundle_active_node(const pe_resource_t *rsc,
118 unsigned int *count_all,
119 unsigned int *count_clean);
120
121 #endif