pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Functions
nodes.h File Reference

Scheduler API for nodes. More...

#include <stdbool.h>
#include <glib.h>
#include <libxml/tree.h>
#include <crm/common/scheduler_types.h>
Include dependency graph for nodes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcmk__node_details
 
struct  pcmk__scored_node
 

Macros

#define PCMK_NODE_ATTR_MAINTENANCE   "maintenance"
 
#define PCMK_NODE_ATTR_STANDBY   "standby"
 
#define PCMK_NODE_ATTR_TERMINATE   "terminate"
 

Typedefs

typedef struct pcmk__node_private pcmk__node_private_t
 

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)
 
const char * pcmk_cib_node_shutdown (xmlNode *cib, const char *node)
 Get value of a node's shutdown attribute from CIB, if present. More...
 

Detailed Description

Scheduler API for nodes.

Definition in file nodes.h.

Macro Definition Documentation

◆ PCMK_NODE_ATTR_MAINTENANCE

#define PCMK_NODE_ATTR_MAINTENANCE   "maintenance"

Definition at line 31 of file nodes.h.

◆ PCMK_NODE_ATTR_STANDBY

#define PCMK_NODE_ATTR_STANDBY   "standby"

Definition at line 32 of file nodes.h.

◆ PCMK_NODE_ATTR_TERMINATE

#define PCMK_NODE_ATTR_TERMINATE   "terminate"

Definition at line 33 of file nodes.h.

Typedef Documentation

◆ pcmk__node_private_t

Definition at line 37 of file nodes.h.

Function Documentation

◆ 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 200 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 127 of file nodes.c.

◆ pcmk_node_is_clean()

bool pcmk_node_is_clean ( const pcmk_node_t node)

Definition at line 81 of file nodes.c.

◆ pcmk_node_is_in_maintenance()

bool pcmk_node_is_in_maintenance ( const pcmk_node_t node)

Definition at line 109 of file nodes.c.

◆ pcmk_node_is_online()

bool pcmk_node_is_online ( const pcmk_node_t node)

Definition at line 44 of file nodes.c.

◆ pcmk_node_is_pending()

bool pcmk_node_is_pending ( const pcmk_node_t node)

Definition at line 62 of file nodes.c.

◆ pcmk_node_is_shutting_down()

bool pcmk_node_is_shutting_down ( const pcmk_node_t node)

Definition at line 95 of file nodes.c.