pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
attrd_client.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/attrd.h>
Include dependency graph for attrd_client.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 
#define LRM_TARGET_ENV   "OCF_RESKEY_" CRM_META "_" XML_LRM_ATTR_TARGET
 

Functions

int attrd_update_delegate (crm_ipc_t *ipc, char command, const char *host, const char *name, const char *value, const char *section, const char *set, const char *dampen, const char *user_name, int options)
 Send a request to pacemaker-attrd. More...
 
int attrd_clear_delegate (crm_ipc_t *ipc, const char *host, const char *resource, const char *operation, const char *interval_spec, const char *user_name, int options)
 Send a request to pacemaker-attrd to clear resource failure. More...
 
const char * attrd_get_target (const char *name)
 

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 10 of file attrd_client.c.

#define LRM_TARGET_ENV   "OCF_RESKEY_" CRM_META "_" XML_LRM_ATTR_TARGET

Definition at line 270 of file attrd_client.c.

Function Documentation

int attrd_clear_delegate ( crm_ipc_t ipc,
const char *  host,
const char *  resource,
const char *  operation,
const char *  interval_spec,
const char *  user_name,
int  options 
)

Send a request to pacemaker-attrd to clear resource failure.

Parameters
[in]ipcConnection to pacemaker-attrd (NULL to use local connection)
[in]hostAffect only this host (or NULL for all hosts)
[in]resourceName of resource to clear (or NULL for all)
[in]operationName of operation to clear (or NULL for all)
[in]interval_specIf operation is not NULL, its interval
[in]user_nameACL user to pass to pacemaker-attrd
[in]optionsattrd_opt_remote if host is a Pacemaker Remote node
Returns
pcmk_ok if request was successfully submitted to pacemaker-attrd, else -errno

Definition at line 238 of file attrd_client.c.

const char* attrd_get_target ( const char *  name)

Definition at line 273 of file attrd_client.c.

int attrd_update_delegate ( crm_ipc_t ipc,
char  command,
const char *  host,
const char *  name,
const char *  value,
const char *  section,
const char *  set,
const char *  dampen,
const char *  user_name,
int  options 
)

Send a request to pacemaker-attrd.

Parameters
[in]ipcConnection to pacemaker-attrd (or NULL to use a local connection)
[in]commandA character indicating the type of pacemaker-attrd request: U or v: update attribute (or refresh if name is NULL) u: update attributes matching regular expression in name D: delete attribute (value must be NULL) R: refresh B: update both attribute and its dampening Y: update attribute dampening only Q: query attribute C: remove peer specified by host
[in]hostAffect only this host (or NULL for all hosts)
[in]nameName of attribute to affect
[in]valueAttribute value to set
[in]sectionStatus or nodes
[in]setID of attribute set to use (or NULL to choose first)
[in]dampenAttribute dampening to use with B/Y, and U/v if creating
[in]user_nameACL user to pass to pacemaker-attrd
[in]optionsBitmask that may include: attrd_opt_remote: host is a Pacemaker Remote node attrd_opt_private: attribute is private (not kept in CIB)
Returns
pcmk_ok if request was successfully submitted to pacemaker-attrd, else -errno

Definition at line 135 of file attrd_client.c.