pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
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/xml.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)
 
int cib_apply_patch_event (xmlNode *event, xmlNode *input, xmlNode **output, int level)
 
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)
 

Variables

struct config_root_s known_paths []
 

Macro Definition Documentation

#define XPATH_CONFIG_CHANGE
Value:
"//" XML_DIFF_CHANGE "[contains(@" XML_DIFF_PATH ",'/" XML_CIB_TAG_CRMCONFIG "/')]"
#define XML_DIFF_CHANGE
Definition: msg_xml.h:404
#define XML_DIFF_PATH
Definition: msg_xml.h:409
#define XML_CIB_TAG_CRMCONFIG
Definition: msg_xml.h:144

Definition at line 738 of file cib_utils.c.

Function Documentation

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

Definition at line 697 of file cib_utils.c.

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 512 of file cib_utils.c.

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

Definition at line 99 of file cib_utils.c.

xmlNode* cib_get_generation ( cib_t cib)

Definition at line 66 of file cib_utils.c.

gboolean cib_internal_config_changed ( xmlNode *  diff)

Definition at line 743 of file cib_utils.c.

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 759 of file cib_utils.c.

void cib_metadata ( void  )

Definition at line 649 of file cib_utils.c.

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

Definition at line 547 of file cib_utils.c.

void cib_native_notify ( gpointer  data,
gpointer  user_data 
)

Definition at line 594 of file cib_utils.c.

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 213 of file cib_utils.c.

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

Definition at line 664 of file cib_utils.c.

gboolean cib_read_config ( GHashTable *  options,
xmlNode *  current_cib 
)

Definition at line 670 of file cib_utils.c.

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

Definition at line 81 of file cib_utils.c.

xmlNode* createEmptyCib ( int  admin_epoch)

Definition at line 168 of file cib_utils.c.

const char* get_object_parent ( const char *  object_type)

Definition at line 138 of file cib_utils.c.

const char* get_object_path ( const char *  object_type)

Definition at line 123 of file cib_utils.c.

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

Definition at line 152 of file cib_utils.c.

void verify_cib_options ( GHashTable *  options)

Definition at line 658 of file cib_utils.c.

Variable Documentation

struct config_root_s known_paths[]
Initial value:
= {
{ NULL, NULL, "//cib" },
{ XML_TAG_CIB, NULL, "//cib" },
{ XML_CIB_TAG_STATUS, "/cib", "//cib/status" },
{ XML_CIB_TAG_CONFIGURATION,"/cib", "//cib/configuration" },
{ XML_CIB_TAG_CRMCONFIG, "/cib/configuration", "//cib/configuration/crm_config" },
{ XML_CIB_TAG_NODES, "/cib/configuration", "//cib/configuration/nodes" },
{ XML_CIB_TAG_DOMAINS, "/cib/configuration", "//cib/configuration/domains" },
{ XML_CIB_TAG_RESOURCES, "/cib/configuration", "//cib/configuration/resources" },
{ XML_CIB_TAG_CONSTRAINTS, "/cib/configuration", "//cib/configuration/constraints" },
{ XML_CIB_TAG_OPCONFIG, "/cib/configuration", "//cib/configuration/op_defaults" },
{ XML_CIB_TAG_RSCCONFIG, "/cib/configuration", "//cib/configuration/rsc_defaults" },
{ XML_CIB_TAG_ACLS, "/cib/configuration", "//cib/configuration/acls" },
{ XML_TAG_FENCING_TOPOLOGY, "/cib/configuration", "//cib/configuration/fencing-topology" },
{ XML_CIB_TAG_SECTION_ALL, NULL, "//cib" },
}
#define XML_CIB_TAG_SECTION_ALL
Definition: msg_xml.h:137
#define XML_CIB_TAG_DOMAINS
Definition: msg_xml.h:142
#define XML_CIB_TAG_CONSTRAINTS
Definition: msg_xml.h:143
#define XML_TAG_FENCING_TOPOLOGY
Definition: msg_xml.h:391
#define XML_CIB_TAG_NODES
Definition: msg_xml.h:141
#define XML_CIB_TAG_RESOURCES
Definition: msg_xml.h:140
#define XML_CIB_TAG_ACLS
Definition: msg_xml.h:147
#define XML_TAG_CIB
Definition: msg_xml.h:76
#define XML_CIB_TAG_CRMCONFIG
Definition: msg_xml.h:144
#define XML_CIB_TAG_RSCCONFIG
Definition: msg_xml.h:146
#define XML_CIB_TAG_STATUS
Definition: msg_xml.h:139
#define XML_CIB_TAG_CONFIGURATION
Definition: msg_xml.h:138
#define XML_CIB_TAG_OPCONFIG
Definition: msg_xml.h:145

Definition at line 47 of file cib_utils.c.