pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
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/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/common/output_internal.h>
#include <crm/cib/internal.h>
Include dependency graph for cib_attrs.c:

Go to the source code of this file.

Macros

#define XPATH_UPPER_TRANS   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
#define XPATH_LOWER_TRANS   "abcdefghijklmnopqrstuvwxyz"
 
#define XPATH_NODE
 

Functions

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)
 
int find_nvpair_attr_delegate (cib_t *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 *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 *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 *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)
 

Macro Definition Documentation

◆ XPATH_LOWER_TRANS

#define XPATH_LOWER_TRANS   "abcdefghijklmnopqrstuvwxyz"

Definition at line 614 of file cib_attrs.c.

◆ XPATH_NODE

#define XPATH_NODE
Value:
"/" PCMK_XE_NODE "[translate(@" PCMK_XA_UNAME ",'" XPATH_UPPER_TRANS "','" XPATH_LOWER_TRANS "') ='%s']" \
"[@class='ocf'][@provider='pacemaker'][@type='remote'][translate(@id,'" XPATH_UPPER_TRANS "','" XPATH_LOWER_TRANS "') ='%s']" \
"[@name='" PCMK_META_REMOTE_NODE "'][translate(@value,'" XPATH_UPPER_TRANS "','" XPATH_LOWER_TRANS "') ='%s']" \
"[@" PCMK_XA_REMOTE_NODE "='true'][translate(@" PCMK_XA_ID ",'" XPATH_UPPER_TRANS "','" XPATH_LOWER_TRANS "') ='%s']"
#define PCMK_XE_NVPAIR
Definition: xml_names.h:144
#define PCMK_XA_REMOTE_NODE
Definition: xml_names.h:376
#define PCMK_XE_CIB
Definition: xml_names.h:79
#define PCMK_XE_STATUS
Definition: xml_names.h:204
#define PCMK_XE_PRIMITIVE
Definition: xml_names.h:164
#define XPATH_UPPER_TRANS
Definition: cib_attrs.c:613
#define PCMK_XA_UNAME
Definition: xml_names.h:431
#define PCMK_META_REMOTE_NODE
Definition: options.h:108
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_XE_CONFIGURATION
Definition: xml_names.h:87
#define PCMK_XE_META_ATTRIBUTES
Definition: xml_names.h:130
#define PCMK_XE_NODE
Definition: xml_names.h:136
#define XPATH_LOWER_TRANS
Definition: cib_attrs.c:614
#define PCMK__XE_NODE_STATE
#define PCMK_XE_NODES
Definition: xml_names.h:142
#define PCMK_XE_RESOURCES
Definition: xml_names.h:179

Definition at line 615 of file cib_attrs.c.

◆ XPATH_UPPER_TRANS

#define XPATH_UPPER_TRANS   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Definition at line 613 of file cib_attrs.c.

Function Documentation

◆ cib__delete_node_attr()

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 
)

Definition at line 371 of file cib_attrs.c.

◆ cib__get_node_attrs()

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 
)

Definition at line 345 of file cib_attrs.c.

◆ cib__update_node_attr()

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 
)

Definition at line 164 of file cib_attrs.c.

◆ delete_attr_delegate()

int delete_attr_delegate ( 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,
gboolean  to_console,
const char *  user_name 
)

Definition at line 511 of file cib_attrs.c.

◆ find_nvpair_attr_delegate()

int find_nvpair_attr_delegate ( cib_t 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 423 of file cib_attrs.c.

◆ query_node_uuid()

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

Definition at line 628 of file cib_attrs.c.

◆ read_attr_delegate()

int read_attr_delegate ( 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,
char **  attr_value,
gboolean  to_console,
const char *  user_name 
)

Definition at line 478 of file cib_attrs.c.

◆ update_attr_delegate()

int update_attr_delegate ( 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,
gboolean  to_console,
const char *  user_name,
const char *  node_type 
)

Definition at line 455 of file cib_attrs.c.