pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cib_attrs.c File Reference
#include <crm_internal.h>
#include <sys/param.h>
#include <crm/crm.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
#include <crm/cib/internal.h>
Include dependency graph for cib_attrs.c:

Go to the source code of this file.

Macros

#define attr_msg(level, fmt, args...)
 
#define attr_snprintf(_str, _offset, _limit,...)
 
#define XPATH_MAX   1024
 
#define XPATH_NODE
 

Functions

int find_nvpair_attr_delegate (cib_t *the_cib, const char *attr, const char *section, const char *node_uuid, const char *attr_set_type, const char *set_name, const char *attr_id, const char *attr_name, gboolean to_console, char **value, const char *user_name)
 
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 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)
 

Macro Definition Documentation

#define attr_msg (   level,
  fmt,
  args... 
)
Value:
do { \
if(to_console) { \
printf(fmt"\n", ##args); \
} else { \
do_crm_log(level, fmt , ##args); \
} \
} while(0)
#define do_crm_log(level, fmt, args...)
Log a message.
Definition: logging.h:129

Definition at line 38 of file cib_attrs.c.

#define attr_snprintf (   _str,
  _offset,
  _limit,
  ... 
)
Value:
do { \
_offset += snprintf(_str + _offset, \
(_limit > _offset) ? _limit - _offset : 0, \
__VA_ARGS__); \
} while(0)

Definition at line 47 of file cib_attrs.c.

#define XPATH_MAX   1024

Definition at line 53 of file cib_attrs.c.

#define XPATH_NODE
Value:
"/" XML_CIB_TAG_NODE "[@" XML_ATTR_UNAME "='%s']" \
"[@class='ocf'][@provider='pacemaker'][@type='remote'][@id='%s']" \
"[@name='" XML_RSC_ATTR_REMOTE_NODE "'][@value='%s']" \
"[@" XML_NODE_IS_REMOTE "='true'][@" XML_ATTR_UUID "='%s']"
#define XML_CIB_TAG_NVPAIR
Definition: msg_xml.h:181
#define XML_CIB_TAG_NODES
Definition: msg_xml.h:160
#define XML_CIB_TAG_RESOURCES
Definition: msg_xml.h:159
#define XML_CIB_TAG_RESOURCE
Definition: msg_xml.h:195
#define XML_CIB_TAG_STATE
Definition: msg_xml.h:177
#define XML_TAG_META_SETS
Definition: msg_xml.h:185
#define XML_ATTR_UNAME
Definition: msg_xml.h:130
#define XML_NODE_IS_REMOTE
Definition: msg_xml.h:272
#define XML_RSC_ATTR_REMOTE_NODE
Definition: msg_xml.h:232
#define XML_CIB_TAG_NODE
Definition: msg_xml.h:178
#define XML_ATTR_UUID
Definition: msg_xml.h:131
#define XML_TAG_CIB
Definition: msg_xml.h:81
#define XML_CIB_TAG_STATUS
Definition: msg_xml.h:158
#define XML_CIB_TAG_CONFIGURATION
Definition: msg_xml.h:157

Definition at line 474 of file cib_attrs.c.

Function Documentation

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 
)

Definition at line 354 of file cib_attrs.c.

int find_nvpair_attr_delegate ( cib_t the_cib,
const char *  attr,
const char *  section,
const char *  node_uuid,
const char *  attr_set_type,
const char *  set_name,
const char *  attr_id,
const char *  attr_name,
gboolean  to_console,
char **  value,
const char *  user_name 
)

Definition at line 56 of file cib_attrs.c.

int query_node_uname ( cib_t the_cib,
const char *  uuid,
char **  uname 
)

Definition at line 523 of file cib_attrs.c.

int query_node_uuid ( cib_t the_cib,
const char *  uname,
char **  uuid,
int *  is_remote_node 
)

Definition at line 487 of file cib_attrs.c.

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 
)

Definition at line 331 of file cib_attrs.c.

int set_standby ( cib_t the_cib,
const char *  uuid,
const char *  scope,
const char *  standby_value 
)

Definition at line 567 of file cib_attrs.c.

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 
)

Definition at line 176 of file cib_attrs.c.