pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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/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

#define XPATH_ALERTS   XPATH_CONFIG "/" XML_CIB_TAG_ALERTS

Definition at line 186 of file alerts.c.

#define XPATH_CONFIG   "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION

Definition at line 183 of file alerts.c.

#define XPATH_CRMCONFIG   XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"

Definition at line 185 of file alerts.c.

#define XPATH_PATCHSET1_ALERTS   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS

Definition at line 178 of file alerts.c.

#define XPATH_PATCHSET1_CRMCONFIG   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG

Definition at line 177 of file alerts.c.

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

Definition at line 175 of file alerts.c.

#define XPATH_PATCHSET1_EITHER   XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS

Definition at line 180 of file alerts.c.

Function Documentation

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

Definition at line 152 of file alerts.c.

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

Definition at line 166 of file alerts.c.

bool pcmk__alert_in_patchset ( xmlNode *  msg,
bool  config 
)

Definition at line 198 of file alerts.c.

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 94 of file alerts.c.

pcmk__alert_t* pcmk__dup_alert ( pcmk__alert_t entry)

Definition at line 132 of file alerts.c.

void pcmk__free_alert ( pcmk__alert_t entry)

Definition at line 107 of file alerts.c.

Variable Documentation

const char* pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]

Definition at line 21 of file alerts.c.