/usr/include/pacemaker/crm/cib_util.h is in libcrmcluster1-dev 1.1.6-2ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | /*
* Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef CIB_UTIL__H
#define CIB_UTIL__H
/* Utility functions */
extern const char *get_object_path(const char *object_type);
extern const char *get_object_parent(const char *object_type);
extern xmlNode *get_object_root(const char *object_type,xmlNode *the_root);
extern xmlNode *create_cib_fragment_adv(
xmlNode *update, const char *section, const char *source);
/* Error Interpretation*/
extern const char *cib_error2string(enum cib_errors);
extern xmlNode *createEmptyCib(void);
extern gboolean verifyCibXml(xmlNode *cib);
extern int cib_section2enum(const char *a_section);
#define create_cib_fragment(update,cib_section) create_cib_fragment_adv(update, cib_section, __FUNCTION__)
extern xmlNode *diff_cib_object(
xmlNode *old, xmlNode *new,gboolean suppress);
extern gboolean apply_cib_diff(
xmlNode *old, xmlNode *diff, xmlNode **new);
extern void log_cib_diff(int log_level, xmlNode *diff, const char *function);
extern gboolean cib_diff_version_details(
xmlNode *diff, int *admin_epoch, int *epoch, int *updates,
int *_admin_epoch, int *_epoch, int *_updates);
extern gboolean cib_version_details(
xmlNode *cib, int *admin_epoch, int *epoch, int *updates);
extern enum cib_errors 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);
static inline enum cib_errors
update_attr(
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)
{
return update_attr_delegate(
the_cib, call_options, section, node_uuid, set_type, set_name,
attr_id, attr_name, attr_value, to_console, NULL);
}
extern enum cib_errors 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);
static inline enum cib_errors
find_nvpair_attr(
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)
{
return find_nvpair_attr_delegate(
the_cib, attr, section, node_uuid, set_type,
set_name, attr_id, attr_name, to_console, value, NULL);
}
extern enum cib_errors 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);
static inline enum
cib_errors read_attr(
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)
{
return read_attr_delegate(
the_cib, section, node_uuid, set_type, set_name,
attr_id, attr_name, attr_value, to_console, NULL);
}
extern enum cib_errors 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);
static inline enum
cib_errors delete_attr(
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)
{
return delete_attr_delegate(
the_cib, options, section, node_uuid, set_type, set_name,
attr_id, attr_name, attr_value, to_console, NULL);
}
extern enum cib_errors query_node_uuid(
cib_t *the_cib, const char *uname, char **uuid);
extern enum cib_errors query_node_uname(
cib_t *the_cib, const char *uuid, char **uname);
extern enum cib_errors set_standby(
cib_t *the_cib,
const char *uuid, const char *scope, const char *standby_value);
extern const char *feature_set(xmlNode *xml_obj);
extern gboolean startCib(const char *filename);
extern xmlNode *get_cib_copy(cib_t *cib);
extern xmlNode *cib_get_generation(cib_t *cib);
extern int cib_compare_generation(xmlNode *left, xmlNode *right);
extern gboolean determine_host(cib_t *cib_conn, char **node_uname, char **node_uuid);
extern void cib_metadata(void);
extern void verify_cib_options(GHashTable *options);
extern const char *cib_pref(GHashTable *options, const char *name);
extern gboolean cib_read_config(GHashTable *options, xmlNode *current_cib);
extern gboolean cib_internal_config_changed(xmlNode *diff);
#endif
|