pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Functions
nodes.c File Reference
#include <crm_internal.h>
#include <libxml/tree.h>
#include <crm/common/nvpair.h>
Include dependency graph for nodes.c:

Go to the source code of this file.

Macros

#define XP_SHUTDOWN
 

Functions

bool pcmk_node_is_online (const pcmk_node_t *node)
 
bool pcmk_node_is_pending (const pcmk_node_t *node)
 
bool pcmk_node_is_clean (const pcmk_node_t *node)
 
bool pcmk_node_is_shutting_down (const pcmk_node_t *node)
 
bool pcmk_node_is_in_maintenance (const pcmk_node_t *node)
 
bool pcmk_foreach_active_resource (pcmk_node_t *node, bool(*fn)(pcmk_resource_t *, void *), void *user_data)
 
void pcmk__xe_add_node (xmlNode *xml, const char *node, int nodeid)
 
pcmk_node_tpcmk__find_node_in_list (const GList *nodes, const char *node_name)
 
const char * pcmk_cib_node_shutdown (xmlNode *cib, const char *node)
 Get value of a node's shutdown attribute from CIB, if present. More...
 

Macro Definition Documentation

◆ XP_SHUTDOWN

#define XP_SHUTDOWN
Value:
"//" PCMK__XE_NODE_STATE "[@" PCMK_XA_UNAME "='%s']/" \
PCMK__XE_TRANSIENT_ATTRIBUTES "/" PCMK_XE_INSTANCE_ATTRIBUTES "/" \
PCMK_XE_NVPAIR "[@" PCMK_XA_NAME "='" PCMK__NODE_ATTR_SHUTDOWN "']"
#define PCMK_XA_NAME
Definition: xml_names.h:330
#define PCMK__NODE_ATTR_SHUTDOWN
#define PCMK_XA_UNAME
Definition: xml_names.h:431
#define PCMK__XE_NODE_STATE
#define PCMK_XE_INSTANCE_ATTRIBUTES
Definition: xml_names.h:122

Definition at line 165 of file nodes.c.

Function Documentation

◆ pcmk__find_node_in_list()

pcmk_node_t* pcmk__find_node_in_list ( const GList *  nodes,
const char *  node_name 
)

Definition at line 150 of file nodes.c.

◆ pcmk__xe_add_node()

void pcmk__xe_add_node ( xmlNode *  xml,
const char *  node,
int  nodeid 
)

Definition at line 127 of file nodes.c.

◆ pcmk_cib_node_shutdown()

const char* pcmk_cib_node_shutdown ( xmlNode *  cib,
const char *  node 
)

Get value of a node's shutdown attribute from CIB, if present.

Parameters
[in]cibCIB to check
[in]nodeName of node to check
Returns
Value of shutdown attribute for node in cib if any, otherwise NULL
Note
The return value is a pointer into cib and so is valid only for the lifetime of that object.

Definition at line 181 of file nodes.c.

◆ pcmk_foreach_active_resource()

bool pcmk_foreach_active_resource ( pcmk_node_t node,
bool(*)(pcmk_resource_t *, void *)  fn,
void *  user_data 
)

Definition at line 107 of file nodes.c.

◆ pcmk_node_is_clean()

bool pcmk_node_is_clean ( const pcmk_node_t node)

Definition at line 61 of file nodes.c.

◆ pcmk_node_is_in_maintenance()

bool pcmk_node_is_in_maintenance ( const pcmk_node_t node)

Definition at line 89 of file nodes.c.

◆ pcmk_node_is_online()

bool pcmk_node_is_online ( const pcmk_node_t node)

Definition at line 24 of file nodes.c.

◆ pcmk_node_is_pending()

bool pcmk_node_is_pending ( const pcmk_node_t node)

Definition at line 42 of file nodes.c.

◆ pcmk_node_is_shutting_down()

bool pcmk_node_is_shutting_down ( const pcmk_node_t node)

Definition at line 75 of file nodes.c.