pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <ctype.h>
#include <crm/crm.h>
#include <crm/lrmd.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/common/util.h>
#include <crm/common/scheduler.h>
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
Functions | |
const char * | pcmk_action_text (enum action_tasks action) |
Get string equivalent of an action type. More... | |
enum action_tasks | pcmk_parse_action (const char *action_name) |
Parse an action type from an action name. More... | |
const char * | pcmk_on_fail_text (enum action_fail_response on_fail) |
Get string equivalent of a failure handling type. More... | |
char * | pcmk__op_key (const char *rsc_id, const char *op_type, guint interval_ms) |
Generate an operation key (RESOURCE_ACTION_INTERVAL) More... | |
gboolean | parse_op_key (const char *key, char **rsc_id, char **op_type, guint *interval_ms) |
char * | pcmk__notify_key (const char *rsc_id, const char *notify_type, const char *op_type) |
gboolean | decode_transition_magic (const char *magic, char **uuid, int *transition_id, int *action_id, int *op_status, int *op_rc, int *target_rc) |
Parse a transition magic string into its constituent parts. More... | |
char * | pcmk__transition_key (int transition_id, int action_id, int target_rc, const char *node) |
gboolean | decode_transition_key (const char *key, char **uuid, int *transition_id, int *action_id, int *target_rc) |
Parse a transition key into its constituent parts. More... | |
int | rsc_op_expected_rc (const lrmd_event_data_t *op) |
gboolean | did_rsc_op_fail (lrmd_event_data_t *op, int target_rc) |
xmlNode * | crm_create_op_xml (xmlNode *parent, const char *prefix, const char *task, const char *interval_spec, const char *timeout) |
Create a CIB XML element for an operation. More... | |
bool | crm_op_needs_metadata (const char *rsc_class, const char *op) |
Check whether an operation requires resource agent meta-data. More... | |
bool | pcmk__is_fencing_action (const char *action) |
xmlNode* crm_create_op_xml | ( | xmlNode * | parent, |
const char * | prefix, | ||
const char * | task, | ||
const char * | interval_spec, | ||
const char * | timeout | ||
) |
Create a CIB XML element for an operation.
[in,out] | parent | If not NULL, make new XML node a child of this |
[in] | prefix | Generate an ID using this prefix |
[in] | task | Operation task to set |
[in] | interval_spec | Operation interval to set |
[in] | timeout | If not NULL, operation timeout to set |
bool crm_op_needs_metadata | ( | const char * | rsc_class, |
const char * | op | ||
) |
Check whether an operation requires resource agent meta-data.
[in] | rsc_class | Resource agent class (or NULL to skip class check) |
[in] | op | Operation action (or NULL to skip op check) |
gboolean decode_transition_key | ( | const char * | key, |
char ** | uuid, | ||
int * | transition_id, | ||
int * | action_id, | ||
int * | target_rc | ||
) |
Parse a transition key into its constituent parts.
[in] | key | Transition key to parse (must be non-NULL) |
[out] | uuid | If non-NULL, where to store copy of parsed UUID |
[out] | transition_id | If non-NULL, where to store parsed transition ID |
[out] | action_id | If non-NULL, where to store parsed action ID |
[out] | target_rc | If non-NULL, where to stored parsed target rc |
gboolean decode_transition_magic | ( | const char * | magic, |
char ** | uuid, | ||
int * | transition_id, | ||
int * | action_id, | ||
int * | op_status, | ||
int * | op_rc, | ||
int * | target_rc | ||
) |
Parse a transition magic string into its constituent parts.
[in] | magic | Magic string to parse (must be non-NULL) |
[out] | uuid | If non-NULL, where to store copy of parsed UUID |
[out] | transition_id | If non-NULL, where to store parsed transition ID |
[out] | action_id | If non-NULL, where to store parsed action ID |
[out] | op_status | If non-NULL, where to store parsed result status |
[out] | op_rc | If non-NULL, where to store parsed actual rc |
[out] | target_rc | If non-NULL, where to stored parsed target rc |
gboolean did_rsc_op_fail | ( | lrmd_event_data_t * | op, |
int | target_rc | ||
) |
gboolean parse_op_key | ( | const char * | key, |
char ** | rsc_id, | ||
char ** | op_type, | ||
guint * | interval_ms | ||
) |
char* pcmk__notify_key | ( | const char * | rsc_id, |
const char * | notify_type, | ||
const char * | op_type | ||
) |
char* pcmk__op_key | ( | const char * | rsc_id, |
const char * | op_type, | ||
guint | interval_ms | ||
) |
Generate an operation key (RESOURCE_ACTION_INTERVAL)
[in] | rsc_id | ID of resource being operated on |
[in] | op_type | Operation name |
[in] | interval_ms | Operation interval |
char* pcmk__transition_key | ( | int | transition_id, |
int | action_id, | ||
int | target_rc, | ||
const char * | node | ||
) |
const char* pcmk_action_text | ( | enum action_tasks | action | ) |
const char* pcmk_on_fail_text | ( | enum action_fail_response | on_fail | ) |
enum action_tasks pcmk_parse_action | ( | const char * | action_name | ) |
int rsc_op_expected_rc | ( | const lrmd_event_data_t * | op | ) |