pacemaker  1.1.18-7fdfbbe
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 attrd. More...
 
int attrd_clear_delegate (crm_ipc_t *ipc, const char *host, const char *resource, const char *operation, const char *interval, const char *user_name, int options)
 Send a request to 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 261 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,
const char *  user_name,
int  options 
)

Send a request to attrd to clear resource failure.

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

Definition at line 236 of file attrd_client.c.

const char* attrd_get_target ( const char *  name)

Definition at line 264 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 attrd.

Parameters
[in]ipcConnection to attrd (or NULL to use a local connection)
[in]commandA character indicating the type of 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 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 attrd, else -errno

Definition at line 135 of file attrd_client.c.