pacemaker  2.1.0-7c3f660
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/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

#define XPATH_ALERTS   XPATH_CONFIG "/" XML_CIB_TAG_ALERTS

Definition at line 187 of file alerts.c.

#define XPATH_CONFIG   "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION

Definition at line 184 of file alerts.c.

#define XPATH_CRMCONFIG   XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"

Definition at line 186 of file alerts.c.

#define XPATH_PATCHSET1_ALERTS   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS

Definition at line 179 of file alerts.c.

#define XPATH_PATCHSET1_CRMCONFIG   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG

Definition at line 178 of file alerts.c.

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

Definition at line 176 of file alerts.c.

#define XPATH_PATCHSET1_EITHER   XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS

Definition at line 181 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 153 of file alerts.c.

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

Definition at line 167 of file alerts.c.

bool pcmk__alert_in_patchset ( xmlNode *  msg,
bool  config 
)

Definition at line 199 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 95 of file alerts.c.

pcmk__alert_t* pcmk__dup_alert ( pcmk__alert_t entry)

Definition at line 133 of file alerts.c.

void pcmk__free_alert ( pcmk__alert_t entry)

Definition at line 108 of file alerts.c.

Variable Documentation

const char* pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]

Definition at line 22 of file alerts.c.