pacemaker  2.0.5-ba59be712
Scalable High-Availability cluster resource manager
Macros | Functions
cib_utils.c File Reference
#include <crm_internal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <sys/utsname.h>
#include <glib.h>
#include <crm/crm.h>
#include <crm/cib/internal.h>
#include <crm/msg_xml.h>
#include <crm/common/iso8601_internal.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/pengine/rules.h>
Include dependency graph for cib_utils.c:

Go to the source code of this file.

Macros

#define XPATH_CONFIG_CHANGE
 

Functions

xmlNode * cib_get_generation (cib_t *cib)
 
gboolean cib_version_details (xmlNode *cib, int *admin_epoch, int *epoch, int *updates)
 
gboolean cib_diff_version_details (xmlNode *diff, int *admin_epoch, int *epoch, int *updates, int *_admin_epoch, int *_epoch, int *_updates)
 
const char * get_object_path (const char *object_type)
 
const char * get_object_parent (const char *object_type)
 
xmlNode * get_object_root (const char *object_type, xmlNode *the_root)
 
xmlNode * createEmptyCib (int admin_epoch)
 
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 *token, 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)
 
void cib_metadata (void)
 
void verify_cib_options (GHashTable *options)
 
const char * cib_pref (GHashTable *options, const char *name)
 
gboolean cib_read_config (GHashTable *options, xmlNode *current_cib)
 
gboolean cib_internal_config_changed (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_apply_patch_event (xmlNode *event, xmlNode *input, xmlNode **output, int level)
 

Macro Definition Documentation

◆ XPATH_CONFIG_CHANGE

#define XPATH_CONFIG_CHANGE
Value:
"//" XML_DIFF_CHANGE "[contains(@" XML_DIFF_PATH ",'/" XML_CIB_TAG_CRMCONFIG "/')]"
#define XML_DIFF_CHANGE
Definition: msg_xml.h:415
#define XML_DIFF_PATH
Definition: msg_xml.h:420
#define XML_CIB_TAG_CRMCONFIG
Definition: msg_xml.h:151

Definition at line 688 of file cib_utils.c.

Function Documentation

◆ cib_apply_patch_event()

int cib_apply_patch_event ( xmlNode *  event,
xmlNode *  input,
xmlNode **  output,
int  level 
)
Deprecated:

Definition at line 735 of file cib_utils.c.

◆ cib_create_op()

xmlNode* cib_create_op ( int  call_id,
const char *  token,
const char *  op,
const char *  host,
const char *  section,
xmlNode *  data,
int  call_options,
const char *  user_name 
)

Definition at line 503 of file cib_utils.c.

◆ cib_diff_version_details()

gboolean cib_diff_version_details ( xmlNode *  diff,
int *  admin_epoch,
int *  epoch,
int *  updates,
int *  _admin_epoch,
int *  _epoch,
int *  _updates 
)

Definition at line 93 of file cib_utils.c.

◆ cib_get_generation()

xmlNode* cib_get_generation ( cib_t cib)

Definition at line 60 of file cib_utils.c.

◆ cib_internal_config_changed()

gboolean cib_internal_config_changed ( xmlNode *  diff)

Definition at line 693 of file cib_utils.c.

◆ cib_internal_op()

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 
)

Definition at line 709 of file cib_utils.c.

◆ cib_metadata()

void cib_metadata ( void  )

Definition at line 639 of file cib_utils.c.

◆ cib_native_callback()

void cib_native_callback ( cib_t cib,
xmlNode *  msg,
int  call_id,
int  rc 
)

Definition at line 538 of file cib_utils.c.

◆ cib_native_notify()

void cib_native_notify ( gpointer  data,
gpointer  user_data 
)

Definition at line 585 of file cib_utils.c.

◆ cib_perform_op()

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 
)

Definition at line 207 of file cib_utils.c.

◆ cib_pref()

const char* cib_pref ( GHashTable *  options,
const char *  name 
)

Definition at line 655 of file cib_utils.c.

◆ cib_read_config()

gboolean cib_read_config ( GHashTable *  options,
xmlNode *  current_cib 
)

Definition at line 661 of file cib_utils.c.

◆ cib_version_details()

gboolean cib_version_details ( xmlNode *  cib,
int *  admin_epoch,
int *  epoch,
int *  updates 
)

Definition at line 75 of file cib_utils.c.

◆ createEmptyCib()

xmlNode* createEmptyCib ( int  admin_epoch)

Definition at line 162 of file cib_utils.c.

◆ get_object_parent()

const char* get_object_parent ( const char *  object_type)

Definition at line 132 of file cib_utils.c.

◆ get_object_path()

const char* get_object_path ( const char *  object_type)

Definition at line 117 of file cib_utils.c.

◆ get_object_root()

xmlNode* get_object_root ( const char *  object_type,
xmlNode *  the_root 
)

Definition at line 146 of file cib_utils.c.

◆ verify_cib_options()

void verify_cib_options ( GHashTable *  options)

Definition at line 649 of file cib_utils.c.