pacemaker  2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
Macros | Functions | Variables
alerts.c File Reference
#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/lrmd.h>
#include <crm/msg_xml.h>
#include <crm/common/alerts_internal.h>
#include <crm/common/xml_internal.h>
#include <crm/cib/internal.h>
Include dependency graph for alerts.c:

Go to the source code of this file.

Macros

#define XPATH_PATCHSET1_DIFF   "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
 
#define XPATH_PATCHSET1_CRMCONFIG   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG
 
#define XPATH_PATCHSET1_ALERTS   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS
 
#define XPATH_PATCHSET1_EITHER   XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS
 
#define XPATH_CONFIG   "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION
 
#define XPATH_CRMCONFIG   XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"
 
#define XPATH_ALERTS   XPATH_CONFIG "/" XML_CIB_TAG_ALERTS
 

Functions

pcmk__alert_tpcmk__alert_new (const char *id, const char *path)
 Create a new alert entry structure. More...
 
void pcmk__free_alert (pcmk__alert_t *entry)
 
pcmk__alert_tpcmk__dup_alert (pcmk__alert_t *entry)
 
void pcmk__add_alert_key (GHashTable *table, enum pcmk__alert_keys_e name, const char *value)
 
void pcmk__add_alert_key_int (GHashTable *table, enum pcmk__alert_keys_e name, int value)
 
bool pcmk__alert_in_patchset (xmlNode *msg, bool config)
 

Variables

const char * pcmk__alert_keys [PCMK__ALERT_INTERNAL_KEY_MAX][3]
 

Macro Definition Documentation

◆ XPATH_ALERTS

#define XPATH_ALERTS   XPATH_CONFIG "/" XML_CIB_TAG_ALERTS

Definition at line 183 of file alerts.c.

◆ XPATH_CONFIG

#define XPATH_CONFIG   "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION

Definition at line 180 of file alerts.c.

◆ XPATH_CRMCONFIG

#define XPATH_CRMCONFIG   XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"

Definition at line 182 of file alerts.c.

◆ XPATH_PATCHSET1_ALERTS

#define XPATH_PATCHSET1_ALERTS   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS

Definition at line 175 of file alerts.c.

◆ XPATH_PATCHSET1_CRMCONFIG

#define XPATH_PATCHSET1_CRMCONFIG   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG

Definition at line 174 of file alerts.c.

◆ XPATH_PATCHSET1_DIFF

#define XPATH_PATCHSET1_DIFF   "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED

Definition at line 172 of file alerts.c.

◆ XPATH_PATCHSET1_EITHER

#define XPATH_PATCHSET1_EITHER   XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS

Definition at line 177 of file alerts.c.

Function Documentation

◆ pcmk__add_alert_key()

void pcmk__add_alert_key ( GHashTable *  table,
enum pcmk__alert_keys_e  name,
const char *  value 
)

Definition at line 149 of file alerts.c.

◆ pcmk__add_alert_key_int()

void pcmk__add_alert_key_int ( GHashTable *  table,
enum pcmk__alert_keys_e  name,
int  value 
)

Definition at line 163 of file alerts.c.

◆ pcmk__alert_in_patchset()

bool pcmk__alert_in_patchset ( xmlNode *  msg,
bool  config 
)

Definition at line 195 of file alerts.c.

◆ pcmk__alert_new()

pcmk__alert_t* pcmk__alert_new ( const char *  id,
const char *  path 
)

Create a new alert entry structure.

Parameters
[in]idID to use
[in]pathPath to alert agent executable
Returns
Pointer to newly allocated alert entry
Note
Non-string fields will be filled in with defaults. It is the caller's responsibility to free the result, using pcmk__free_alert().

Definition at line 95 of file alerts.c.

◆ pcmk__dup_alert()

pcmk__alert_t* pcmk__dup_alert ( pcmk__alert_t entry)

Definition at line 133 of file alerts.c.

◆ pcmk__free_alert()

void pcmk__free_alert ( pcmk__alert_t entry)

Definition at line 108 of file alerts.c.

Variable Documentation

◆ pcmk__alert_keys

const char* pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]

Definition at line 22 of file alerts.c.