This source file includes following definitions.
- based_get_op_function
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <glib.h>
13
14 #include <crm/crm.h>
15 #include <crm/cib.h>
16 #include <pacemaker-based.h>
17
18 static const cib__op_fn_t cib_op_functions[] = {
19 [cib__op_abs_delete] = cib_process_delete_absolute,
20 [cib__op_apply_patch] = cib_server_process_diff,
21 [cib__op_bump] = cib_process_bump,
22 [cib__op_commit_transact] = cib_process_commit_transaction,
23 [cib__op_create] = cib_process_create,
24 [cib__op_delete] = cib_process_delete,
25 [cib__op_erase] = cib_process_erase,
26 [cib__op_is_primary] = cib_process_readwrite,
27 [cib__op_modify] = cib_process_modify,
28 [cib__op_noop] = cib_process_noop,
29 [cib__op_ping] = cib_process_ping,
30 [cib__op_primary] = cib_process_readwrite,
31 [cib__op_query] = cib_process_query,
32 [cib__op_replace] = cib_process_replace_svr,
33 [cib__op_secondary] = cib_process_readwrite,
34 [cib__op_shutdown] = cib_process_shutdown_req,
35 [cib__op_sync_all] = cib_process_sync,
36 [cib__op_sync_one] = cib_process_sync_one,
37 [cib__op_upgrade] = cib_process_upgrade_server,
38 [cib__op_schemas] = cib_process_schemas,
39 };
40
41
42
43
44
45
46
47
48
49 cib__op_fn_t
50 based_get_op_function(const cib__operation_t *operation)
51 {
52 enum cib__op_type type = operation->type;
53
54 CRM_ASSERT(type >= 0);
55
56 if (type >= PCMK__NELEM(cib_op_functions)) {
57 return NULL;
58 }
59 return cib_op_functions[type];
60 }