10#ifndef PCMK__CRM_CIB_INTERNAL__H
11#define PCMK__CRM_CIB_INTERNAL__H
24#define PCMK__CIB_REQUEST_SECONDARY "cib_slave"
25#define PCMK__CIB_REQUEST_PRIMARY "cib_master"
26#define PCMK__CIB_REQUEST_SYNC_TO_ALL "cib_sync"
27#define PCMK__CIB_REQUEST_SYNC_TO_ONE "cib_sync_one"
28#define PCMK__CIB_REQUEST_IS_PRIMARY "cib_ismaster"
29#define PCMK__CIB_REQUEST_BUMP "cib_bump"
30#define PCMK__CIB_REQUEST_QUERY "cib_query"
31#define PCMK__CIB_REQUEST_CREATE "cib_create"
32#define PCMK__CIB_REQUEST_MODIFY "cib_modify"
33#define PCMK__CIB_REQUEST_DELETE "cib_delete"
34#define PCMK__CIB_REQUEST_ERASE "cib_erase"
35#define PCMK__CIB_REQUEST_REPLACE "cib_replace"
36#define PCMK__CIB_REQUEST_APPLY_PATCH "cib_apply_diff"
37#define PCMK__CIB_REQUEST_UPGRADE "cib_upgrade"
38#define PCMK__CIB_REQUEST_ABS_DELETE "cib_delete_alt"
39#define PCMK__CIB_REQUEST_NOOP "noop"
40#define PCMK__CIB_REQUEST_SHUTDOWN "cib_shutdown_req"
41#define PCMK__CIB_REQUEST_COMMIT_TRANSACT "cib_commit_transact"
42#define PCMK__CIB_REQUEST_SCHEMAS "cib_schemas"
86 int *_admin_epoch,
int *_epoch,
int *_updates);
90typedef int (*
cib__op_fn_t)(
const char *, int,
const char *, xmlNode *,
91 xmlNode *, xmlNode *, xmlNode **, xmlNode **);
108 void (*
callback) (xmlNode *, int, int, xmlNode *,
void *);
123#define cib__set_call_options(cib_call_opts, call_for, flags_to_set) do { \
124 cib_call_opts = pcmk__set_flags_as(__func__, __LINE__, \
125 LOG_TRACE, "CIB call", (call_for), (cib_call_opts), \
126 (flags_to_set), #flags_to_set); \
129#define cib__clear_call_options(cib_call_opts, call_for, flags_to_clear) do { \
130 cib_call_opts = pcmk__clear_flags_as(__func__, __LINE__, \
131 LOG_TRACE, "CIB call", (call_for), (cib_call_opts), \
132 (flags_to_clear), #flags_to_clear); \
161cib__client_triggers_refresh(
const char *
name)
177 xmlNode *req, xmlNode *
input,
bool manage_counters,
178 bool *config_changed, xmlNode **current_cib,
179 xmlNode **result_cib, xmlNode **diff, xmlNode **output);
182 const char *section, xmlNode *
data,
int call_options,
183 const char *user_name,
const char *client_name,
193int cib_process_query(
const char *op,
int options,
const char *section, xmlNode * req,
194 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
197int cib_process_erase(
const char *op,
int options,
const char *section, xmlNode * req,
198 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
201int cib_process_bump(
const char *op,
int options,
const char *section, xmlNode * req,
202 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
206 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
209int cib_process_create(
const char *op,
int options,
const char *section, xmlNode * req,
210 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
213int cib_process_modify(
const char *op,
int options,
const char *section, xmlNode * req,
214 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
217int cib_process_delete(
const char *op,
int options,
const char *section, xmlNode * req,
218 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
221int cib_process_diff(
const char *op,
int options,
const char *section, xmlNode * req,
222 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
226 xmlNode *
input, xmlNode * existing_cib, xmlNode ** result_cib,
252 const xmlNode *req, xmlNode *
input, xmlNode *existing_cib,
253 xmlNode **result_cib, xmlNode ** answer);
256 const char *section, xmlNode *
data,
257 xmlNode ** output_data,
int call_options,
const char *user_name);
263 const char *cib_filename);
297 const char *section,
const char *node_uuid,
const char *set_type,
298 const char *set_name,
const char *attr_id,
const char *attr_name,
299 const char *attr_value,
const char *user_name,
300 const char *node_type);
303 const char *node_uuid,
const char *set_type,
const char *set_name,
304 const char *attr_id,
const char *attr_name,
const char *user_name,
308 const char *section,
const char *node_uuid,
const char *set_type,
309 const char *set_name,
const char *attr_id,
const char *attr_name,
310 const char *attr_value,
const char *user_name);
int cib__extend_transaction(cib_t *cib, xmlNode *request)
int cib__clean_up_connection(cib_t **cib)
void cib_native_callback(cib_t *cib, xmlNode *msg, int call_id, int rc)
int cib_process_delete(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
int cib_process_xpath(const char *op, int options, const char *section, const xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
int cib__get_operation(const char *op, const cib__operation_t **operation)
int cib__get_notify_patchset(const xmlNode *msg, const xmlNode **patchset)
int cib_process_query(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
struct cib_callback_client_s cib_callback_client_t
int cib_process_modify(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
cib_t * cib_new_variant(void)
@ cib__op_attr_none
No special attributes.
@ cib__op_attr_transaction
Supported in a transaction.
@ cib__op_attr_privileged
Requires privileges.
@ cib__op_attr_local
Must only be processed locally.
@ cib__op_attr_replaces
Replaces CIB.
@ cib__op_attr_modifies
Modifies CIB.
@ cib__op_attr_writes_through
Writes to disk on success.
int cib_file_write_with_digest(xmlNode *cib_root, const char *cib_dirname, const char *cib_filename)
int cib_process_create(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
int cib_perform_op(cib_t *cib, const char *op, uint32_t call_options, cib__op_fn_t fn, bool is_query, const char *section, xmlNode *req, xmlNode *input, bool manage_counters, bool *config_changed, xmlNode **current_cib, xmlNode **result_cib, xmlNode **diff, xmlNode **output)
int cib__get_node_attrs(pcmk__output_t *out, cib_t *cib, const char *section, const char *node_uuid, const char *set_type, const char *set_name, const char *attr_id, const char *attr_name, const char *user_name, xmlNode **result)
int cib__signon_query(pcmk__output_t *out, cib_t **cib, xmlNode **cib_object)
struct cib_notify_client_s cib_notify_client_t
int cib__create_op(cib_t *cib, const char *op, const char *host, const char *section, xmlNode *data, int call_options, const char *user_name, const char *client_name, xmlNode **op_msg)
int cib_process_bump(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
int cib_process_replace(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
int cib__update_node_attr(pcmk__output_t *out, cib_t *cib, int call_options, const char *section, const char *node_uuid, const char *set_type, const char *set_name, const char *attr_id, const char *attr_name, const char *attr_value, const char *user_name, const char *node_type)
void cib__set_output(cib_t *cib, pcmk__output_t *out)
int cib_internal_op(cib_t *cib, const char *op, const char *host, const char *section, xmlNode *data, xmlNode **output_data, int call_options, const char *user_name)
gboolean cib_diff_version_details(xmlNode *diff, int *admin_epoch, int *epoch, int *updates, int *_admin_epoch, int *_epoch, int *_updates)
int cib_process_diff(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
int cib_process_upgrade(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
cib_callback_client_t * cib__lookup_id(int call_id)
int cib__delete_node_attr(pcmk__output_t *out, cib_t *cib, int options, const char *section, const char *node_uuid, const char *set_type, const char *set_name, const char *attr_id, const char *attr_name, const char *attr_value, const char *user_name)
int(* cib__op_fn_t)(const char *, int, const char *, xmlNode *, xmlNode *, xmlNode *, xmlNode **, xmlNode **)
struct cib__operation_s cib__operation_t
int cib_process_erase(const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
@ cib__op_commit_transact
gboolean cib_read_config(GHashTable *options, xmlNode *current_cib)
int cib__signon_attempts(cib_t *cib, enum cib_conn_type type, int attempts)
int cib_file_read_and_verify(const char *filename, const char *sigfile, xmlNode **root)
void cib_native_notify(gpointer data, gpointer user_data)
enum pcmk_ipc_server type
@ pcmk_ipc_unknown
Unknown or invalid.
Formatted output for pacemaker tools.
pcmk__action_result_t result
enum pcmk_ipc_server pcmk__parse_server(const char *text)
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
uint32_t flags
Group of enum cib__op_attr flags.
void(* callback)(xmlNode *, int, int, xmlNode *, void *)
void(* free_func)(void *)
struct timer_rec_s * timer
void(* callback)(const char *event, xmlNode *msg)
This structure contains everything that makes up a single output formatter.