diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:53:20 +0000 |
commit | e5a812082ae033afb1eed82c0f2df3d0f6bdc93f (patch) | |
tree | a6716c9275b4b413f6c9194798b34b91affb3cc7 /include/crm/cib | |
parent | Initial commit. (diff) | |
download | pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.tar.xz pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.zip |
Adding upstream version 2.1.6.upstream/2.1.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/crm/cib')
-rw-r--r-- | include/crm/cib/Makefile.am | 16 | ||||
-rw-r--r-- | include/crm/cib/cib_types.h | 223 | ||||
-rw-r--r-- | include/crm/cib/internal.h | 264 | ||||
-rw-r--r-- | include/crm/cib/util.h | 73 | ||||
-rw-r--r-- | include/crm/cib/util_compat.h | 40 |
5 files changed, 616 insertions, 0 deletions
diff --git a/include/crm/cib/Makefile.am b/include/crm/cib/Makefile.am new file mode 100644 index 0000000..0cd236c --- /dev/null +++ b/include/crm/cib/Makefile.am @@ -0,0 +1,16 @@ +# +# Copyright 2012-2021 the Pacemaker project contributors +# +# The version control history for this file may have further details. +# +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. +# +MAINTAINERCLEANFILES = Makefile.in + +headerdir=$(pkgincludedir)/crm/cib + +noinst_HEADERS = internal.h +header_HEADERS = cib_types.h \ + util.h \ + util_compat.h diff --git a/include/crm/cib/cib_types.h b/include/crm/cib/cib_types.h new file mode 100644 index 0000000..5bd10e4 --- /dev/null +++ b/include/crm/cib/cib_types.h @@ -0,0 +1,223 @@ +/* + * Copyright 2004-2023 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef PCMK__CRM_CIB_CIB_TYPES__H +# define PCMK__CRM_CIB_CIB_TYPES__H + +# include <glib.h> // gboolean, GList +# include <libxml/tree.h> // xmlNode +# include <crm/common/ipc.h> +# include <crm/common/xml.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \file + * \brief Data types for Cluster Information Base access + * \ingroup cib + */ + +enum cib_variant { + cib_undefined = 0, + cib_native = 1, + cib_file = 2, + cib_remote = 3, + +#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) + //! \deprecated This value will be removed in a future release + cib_database = 4, +#endif // !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) +}; + +enum cib_state { + cib_connected_command, + cib_connected_query, + cib_disconnected +}; + +enum cib_conn_type { + cib_command, + cib_query, + cib_no_connection, + cib_command_nonblocking, +}; + +enum cib_call_options { + cib_none = 0, + cib_verbose = (1 << 0), //!< Prefer stderr to logs + cib_xpath = (1 << 1), + cib_multiple = (1 << 2), + cib_can_create = (1 << 3), + cib_discard_reply = (1 << 4), + cib_no_children = (1 << 5), + cib_xpath_address = (1 << 6), + cib_mixed_update = (1 << 7), + cib_scope_local = (1 << 8), + cib_dryrun = (1 << 9), + cib_sync_call = (1 << 12), + cib_no_mtime = (1 << 13), + cib_zero_copy = (1 << 14), + cib_inhibit_notify = (1 << 16), + +#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) + //! \deprecated This value will be removed in a future release + cib_quorum_override = (1 << 20), +#endif // !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) + + //! \deprecated This value will be removed in a future release + cib_inhibit_bcast = (1 << 24), + + cib_force_diff = (1 << 28), +}; + +typedef struct cib_s cib_t; + +typedef struct cib_api_operations_s { + int (*signon) (cib_t *cib, const char *name, enum cib_conn_type type); + int (*signon_raw) (cib_t *cib, const char *name, enum cib_conn_type type, + int *event_fd); + int (*signoff) (cib_t *cib); + int (*free) (cib_t *cib); + int (*set_op_callback) (cib_t *cib, void (*callback) (const xmlNode *msg, + int callid, int rc, + xmlNode *output)); + int (*add_notify_callback) (cib_t *cib, const char *event, + void (*callback) (const char *event, + xmlNode *msg)); + int (*del_notify_callback) (cib_t *cib, const char *event, + void (*callback) (const char *event, + xmlNode *msg)); + int (*set_connection_dnotify) (cib_t *cib, + void (*dnotify) (gpointer user_data)); + int (*inputfd) (cib_t *cib); + int (*noop) (cib_t *cib, int call_options); + int (*ping) (cib_t *cib, xmlNode **output_data, int call_options); + int (*query) (cib_t *cib, const char *section, xmlNode **output_data, + int call_options); + int (*query_from) (cib_t *cib, const char *host, const char *section, + xmlNode **output_data, int call_options); + + //! \deprecated This method will be removed and should not be used + int (*is_master) (cib_t *cib); + + //! \deprecated Use the set_primary() method instead + int (*set_master) (cib_t *cib, int call_options); + + //! \deprecated Use the set_secondary() method instead + int (*set_slave) (cib_t *cib, int call_options); + + //! \deprecated This method will be removed and should not be used + int (*set_slave_all) (cib_t *cib, int call_options); + + int (*sync) (cib_t *cib, const char *section, int call_options); + int (*sync_from) (cib_t *cib, const char *host, const char *section, + int call_options); + int (*upgrade) (cib_t *cib, int call_options); + int (*bump_epoch) (cib_t *cib, int call_options); + int (*create) (cib_t *cib, const char *section, xmlNode *data, + int call_options); + int (*modify) (cib_t *cib, const char *section, xmlNode *data, + int call_options); + + //! \deprecated Use the \p modify() method instead + int (*update) (cib_t *cib, const char *section, xmlNode *data, + int call_options); + + int (*replace) (cib_t *cib, const char *section, xmlNode *data, + int call_options); + int (*remove) (cib_t *cib, const char *section, xmlNode *data, + int call_options); + int (*erase) (cib_t *cib, xmlNode **output_data, int call_options); + + //! \deprecated This method does nothing and should not be called + int (*delete_absolute) (cib_t *cib, const char *section, xmlNode *data, + int call_options); + + int (*quit) (cib_t *cib, int call_options); + int (*register_notification) (cib_t *cib, const char *callback, + int enabled); + gboolean (*register_callback) (cib_t *cib, int call_id, int timeout, + gboolean only_success, void *user_data, + const char *callback_name, + void (*callback) (xmlNode*, int, int, + xmlNode*, void *)); + gboolean (*register_callback_full)(cib_t *cib, int call_id, int timeout, + gboolean only_success, void *user_data, + const char *callback_name, + void (*callback)(xmlNode *, int, int, + xmlNode *, void *), + void (*free_func)(void *)); + + /*! + * \brief Set the local CIB manager as the cluster's primary instance + * + * \param[in,out] cib CIB connection + * \param[in] call_options Group of enum cib_call_options flags + * + * \return Legacy Pacemaker return code (in particular, pcmk_ok on success) + */ + int (*set_primary)(cib_t *cib, int call_options); + + /*! + * \brief Set the local CIB manager as a secondary instance + * + * \param[in,out] cib CIB connection + * \param[in] call_options Group of enum cib_call_options flags + * + * \return Legacy Pacemaker return code (in particular, pcmk_ok on success) + */ + int (*set_secondary)(cib_t *cib, int call_options); + + /*! + * \brief Get the given CIB connection's unique client identifier(s) + * + * These can be used to check whether this client requested the action that + * triggered a CIB notification. + * + * \param[in] cib CIB connection + * \param[out] async_id If not \p NULL, where to store asynchronous client + * ID + * \param[out] sync_id If not \p NULL, where to store synchronous client + * ID + * + * \return Legacy Pacemaker return code + * + * \note The client IDs are assigned by \p pacemaker-based when the client + * connects. \p cib_t variants that don't connect to + * \p pacemaker-based may never be assigned a client ID. + * \note Some variants may have only one client for both asynchronous and + * synchronous requests. + */ + int (*client_id)(const cib_t *cib, const char **async_id, + const char **sync_id); +} cib_api_operations_t; + +struct cib_s { + enum cib_state state; + enum cib_conn_type type; + enum cib_variant variant; + + int call_id; + int call_timeout; + void *variant_opaque; + void *delegate_fn; + + GList *notify_list; + void (*op_callback) (const xmlNode *msg, int call_id, int rc, + xmlNode *output); + cib_api_operations_t *cmds; +}; + +#ifdef __cplusplus +} +#endif + +#endif // PCMK__CRM_CIB_CIB_TYPES__H diff --git a/include/crm/cib/internal.h b/include/crm/cib/internal.h new file mode 100644 index 0000000..374902b --- /dev/null +++ b/include/crm/cib/internal.h @@ -0,0 +1,264 @@ +/* + * Copyright 2004-2023 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef CIB_INTERNAL__H +# define CIB_INTERNAL__H +# include <crm/cib.h> +# include <crm/common/ipc_internal.h> +# include <crm/common/output_internal.h> + +// Request types for CIB manager IPC/CPG +#define PCMK__CIB_REQUEST_SECONDARY "cib_slave" +#define PCMK__CIB_REQUEST_ALL_SECONDARY "cib_slave_all" +#define PCMK__CIB_REQUEST_PRIMARY "cib_master" +#define PCMK__CIB_REQUEST_SYNC_TO_ALL "cib_sync" +#define PCMK__CIB_REQUEST_SYNC_TO_ONE "cib_sync_one" +#define PCMK__CIB_REQUEST_IS_PRIMARY "cib_ismaster" +#define PCMK__CIB_REQUEST_BUMP "cib_bump" +#define PCMK__CIB_REQUEST_QUERY "cib_query" +#define PCMK__CIB_REQUEST_CREATE "cib_create" +#define PCMK__CIB_REQUEST_MODIFY "cib_modify" +#define PCMK__CIB_REQUEST_DELETE "cib_delete" +#define PCMK__CIB_REQUEST_ERASE "cib_erase" +#define PCMK__CIB_REQUEST_REPLACE "cib_replace" +#define PCMK__CIB_REQUEST_APPLY_PATCH "cib_apply_diff" +#define PCMK__CIB_REQUEST_UPGRADE "cib_upgrade" +#define PCMK__CIB_REQUEST_ABS_DELETE "cib_delete_alt" +#define PCMK__CIB_REQUEST_NOOP "noop" +#define PCMK__CIB_REQUEST_SHUTDOWN "cib_shutdown_req" + +# define F_CIB_CLIENTID "cib_clientid" +# define F_CIB_CALLOPTS "cib_callopt" +# define F_CIB_CALLID "cib_callid" +# define F_CIB_CALLDATA "cib_calldata" +# define F_CIB_OPERATION "cib_op" +# define F_CIB_ISREPLY "cib_isreplyto" +# define F_CIB_SECTION "cib_section" +# define F_CIB_HOST "cib_host" +# define F_CIB_RC "cib_rc" +# define F_CIB_UPGRADE_RC "cib_upgrade_rc" +# define F_CIB_DELEGATED "cib_delegated_from" +# define F_CIB_OBJID "cib_object" +# define F_CIB_OBJTYPE "cib_object_type" +# define F_CIB_EXISTING "cib_existing_object" +# define F_CIB_SEENCOUNT "cib_seen" +# define F_CIB_TIMEOUT "cib_timeout" +# define F_CIB_UPDATE "cib_update" +# define F_CIB_GLOBAL_UPDATE "cib_update" +# define F_CIB_UPDATE_RESULT "cib_update_result" +# define F_CIB_CLIENTNAME "cib_clientname" +# define F_CIB_NOTIFY_TYPE "cib_notify_type" +# define F_CIB_NOTIFY_ACTIVATE "cib_notify_activate" +# define F_CIB_UPDATE_DIFF "cib_update_diff" +# define F_CIB_USER "cib_user" +# define F_CIB_LOCAL_NOTIFY_ID "cib_local_notify_id" +# define F_CIB_PING_ID "cib_ping_id" +# define F_CIB_SCHEMA_MAX "cib_schema_max" +# define F_CIB_CHANGE_SECTION "cib_change_section" + +# define T_CIB "cib" +# define T_CIB_NOTIFY "cib_notify" +/* notify sub-types */ +# define T_CIB_PRE_NOTIFY "cib_pre_notify" +# define T_CIB_POST_NOTIFY "cib_post_notify" +# define T_CIB_UPDATE_CONFIRM "cib_update_confirmation" +# define T_CIB_REPLACE_NOTIFY "cib_refresh_notify" + +/*! + * \internal + * \enum cib_change_section_info + * \brief Flags to indicate which sections of the CIB have changed + */ +enum cib_change_section_info { + cib_change_section_none = 0, //!< No sections have changed + cib_change_section_nodes = (1 << 0), //!< The nodes section has changed + cib_change_section_alerts = (1 << 1), //!< The alerts section has changed + cib_change_section_status = (1 << 2), //!< The status section has changed +}; + + +gboolean cib_diff_version_details(xmlNode * diff, int *admin_epoch, int *epoch, int *updates, + int *_admin_epoch, int *_epoch, int *_updates); + +gboolean cib_read_config(GHashTable * options, xmlNode * current_cib); + +typedef struct cib_notify_client_s { + const char *event; + const char *obj_id; /* implement one day */ + const char *obj_type; /* implement one day */ + void (*callback) (const char *event, xmlNode * msg); + +} cib_notify_client_t; + +typedef struct cib_callback_client_s { + void (*callback) (xmlNode *, int, int, xmlNode *, void *); + const char *id; + void *user_data; + gboolean only_success; + struct timer_rec_s *timer; + void (*free_func)(void *); +} cib_callback_client_t; + +struct timer_rec_s { + int call_id; + int timeout; + guint ref; + cib_t *cib; +}; + +#define cib__set_call_options(cib_call_opts, call_for, flags_to_set) do { \ + cib_call_opts = pcmk__set_flags_as(__func__, __LINE__, \ + LOG_TRACE, "CIB call", (call_for), (cib_call_opts), \ + (flags_to_set), #flags_to_set); \ + } while (0) + +#define cib__clear_call_options(cib_call_opts, call_for, flags_to_clear) do { \ + cib_call_opts = pcmk__clear_flags_as(__func__, __LINE__, \ + LOG_TRACE, "CIB call", (call_for), (cib_call_opts), \ + (flags_to_clear), #flags_to_clear); \ + } while (0) + +typedef int (*cib_op_t) (const char *, int, const char *, xmlNode *, + xmlNode *, xmlNode *, xmlNode **, xmlNode **); + +cib_t *cib_new_variant(void); + +int cib_perform_op(const char *op, int call_options, cib_op_t * fn, gboolean is_query, + const char *section, xmlNode * req, xmlNode * input, + gboolean manage_counters, gboolean * config_changed, + xmlNode * current_cib, xmlNode ** result_cib, xmlNode ** diff, + xmlNode ** output); + +xmlNode *cib_create_op(int call_id, const char *op, const char *host, + const char *section, xmlNode * data, int call_options, + const char *user_name); + +void cib_native_callback(cib_t * cib, xmlNode * msg, int call_id, int rc); +void cib_native_notify(gpointer data, gpointer user_data); + +int cib_process_query(const char *op, int options, const char *section, xmlNode * req, + xmlNode * input, xmlNode * existing_cib, xmlNode ** result_cib, + xmlNode ** answer); + +int cib_process_erase(const char *op, int options, const char *section, xmlNode * req, + xmlNode * input, xmlNode * existing_cib, xmlNode ** result_cib, + xmlNode ** answer); + +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_process_create(const char *op, int options, const char *section, xmlNode * req, + xmlNode * input, xmlNode * existing_cib, xmlNode ** result_cib, + xmlNode ** answer); + +int cib_process_modify(const char *op, int options, const char *section, xmlNode * req, + xmlNode * input, xmlNode * existing_cib, xmlNode ** result_cib, + xmlNode ** answer); + +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_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); + +/*! + * \internal + * \brief Query or modify a CIB + * + * \param[in] op PCMK__CIB_REQUEST_* operation to be performed + * \param[in] options Flag set of \c cib_call_options + * \param[in] section XPath to query or modify + * \param[in] req unused + * \param[in] input Portion of CIB to modify (used with + * PCMK__CIB_REQUEST_CREATE, + * PCMK__CIB_REQUEST_MODIFY, and + * PCMK__CIB_REQUEST_REPLACE) + * \param[in,out] existing_cib Input CIB (used with PCMK__CIB_REQUEST_QUERY) + * \param[in,out] result_cib CIB copy to make changes in (used with + * PCMK__CIB_REQUEST_CREATE, + * PCMK__CIB_REQUEST_MODIFY, + * PCMK__CIB_REQUEST_DELETE, and + * PCMK__CIB_REQUEST_REPLACE) + * \param[out] answer Query result (used with PCMK__CIB_REQUEST_QUERY) + * + * \return Legacy Pacemaker return code + */ +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); + +bool cib__config_changed_v1(xmlNode *last, xmlNode *next, xmlNode **diff); + +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); + + +int cib_file_read_and_verify(const char *filename, const char *sigfile, + xmlNode **root); +int cib_file_write_with_digest(xmlNode *cib_root, const char *cib_dirname, + const char *cib_filename); + +void cib__set_output(cib_t *cib, pcmk__output_t *out); + +cib_callback_client_t* cib__lookup_id (int call_id); + +/*! + * \internal + * \brief Connect to, query, and optionally disconnect from the CIB + * + * Open a read-write connection to the CIB manager if an already connected + * client is not passed in. Then query the CIB and store the resulting XML. + * Finally, disconnect if the CIB connection isn't being returned to the caller. + * + * \param[in,out] out Output object (may be \p NULL) + * \param[in,out] cib If not \p NULL, where to store CIB connection + * \param[out] cib_object Where to store query result + * + * \return Standard Pacemaker return code + * + * \note If \p cib is not \p NULL, the caller is responsible for freeing \p *cib + * using \p cib_delete(). + * \note If \p *cib points to an existing \p cib_t object, this function will + * reuse it instead of creating a new one. If the existing client is + * already connected, the connection will be reused, even if it's + * read-only. + */ +int cib__signon_query(pcmk__output_t *out, cib_t **cib, xmlNode **cib_object); + +int cib__clean_up_connection(cib_t **cib); + +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); + +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__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); + +#endif diff --git a/include/crm/cib/util.h b/include/crm/cib/util.h new file mode 100644 index 0000000..18726bb --- /dev/null +++ b/include/crm/cib/util.h @@ -0,0 +1,73 @@ +/* + * Copyright 2004-2022 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef PCMK__CRM_CIB_UTIL__H +# define PCMK__CRM_CIB_UTIL__H + +#include <glib.h> // gboolean +#include <libxml/tree.h> // xmlNode +#include <crm/cib/cib_types.h> // cib_t + +#ifdef __cplusplus +extern "C" { +#endif + +/* Utility functions */ +xmlNode *createEmptyCib(int cib_epoch); + +gboolean cib_version_details(xmlNode * cib, int *admin_epoch, int *epoch, int *updates); + +int update_attr_delegate(cib_t * the_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, gboolean to_console, + const char *user_name, const char *node_type); + +int find_nvpair_attr_delegate(cib_t * the_cib, const char *attr, + const char *section, const char *node_uuid, + const char *set_type, const char *set_name, + const char *attr_id, const char *attr_name, + gboolean to_console, char **value, const char *user_name); + +int read_attr_delegate(cib_t * the_cib, + const char *section, const char *node_uuid, + const char *set_type, const char *set_name, + const char *attr_id, const char *attr_name, + char **attr_value, gboolean to_console, const char *user_name); + +int delete_attr_delegate(cib_t * the_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, gboolean to_console, const char *user_name); + +int query_node_uuid(cib_t * the_cib, const char *uname, char **uuid, int *is_remote_node); + +int query_node_uname(cib_t * the_cib, const char *uuid, char **uname); + +int set_standby(cib_t * the_cib, const char *uuid, const char *scope, const char *standby_value); + +xmlNode *cib_get_generation(cib_t * cib); + +void cib_metadata(void); +const char *cib_pref(GHashTable * options, const char *name); + +int cib_apply_patch_event(xmlNode *event, xmlNode *input, xmlNode **output, + int level); + +#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) +#include <crm/cib/util_compat.h> +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/crm/cib/util_compat.h b/include/crm/cib/util_compat.h new file mode 100644 index 0000000..20f1e2d --- /dev/null +++ b/include/crm/cib/util_compat.h @@ -0,0 +1,40 @@ +/* + * Copyright 2021 the Pacemaker project contributors + * + * The version control history for this file may have further details. + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ + +#ifndef PCMK__CRM_CIB_UTIL_COMPAT__H +# define PCMK__CRM_CIB_UTIL_COMPAT__H + +#include <crm/common/xml.h> +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \file + * \brief Deprecated Pacemaker configuration utilities + * \ingroup cib + * \deprecated Do not include this header directly. The utilities in this + * header, and the header itself, will be removed in a future + * release. + */ + +//! \deprecated Use pcmk_cib_xpath_for() instead +const char *get_object_path(const char *object_type); + +//! \deprecated Use pcmk_cib_parent_name_for() instead +const char *get_object_parent(const char *object_type); + +//! \deprecated Use pcmk_cib_xpath_for() instead +xmlNode *get_object_root(const char *object_type, xmlNode *the_root); + +#ifdef __cplusplus +} +#endif + +#endif // PCMK__CRM_CIB_UTIL_COMPAT__H |