pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Functions
pcmk_resource.c File Reference
#include <crm_internal.h>
#include <errno.h>
#include <glib.h>
#include <libxml/tree.h>
#include <crm/cib/internal.h>
#include <crm/common/mainloop.h>
#include <crm/common/results.h>
#include <crm/common/output_internal.h>
#include <crm/pengine/internal.h>
#include <pacemaker.h>
#include <pacemaker-internal.h>
Include dependency graph for pcmk_resource.c:

Go to the source code of this file.

Macros

#define XPATH_OP_HISTORY
 

Functions

int pcmk__resource_delete (cib_t *cib, uint32_t cib_opts, const char *rsc_id, const char *rsc_type)
 
int pcmk_resource_delete (xmlNodePtr *xml, const char *rsc_id, const char *rsc_type)
 Remove a resource. More...
 
int pcmk__resource_digests (pcmk__output_t *out, pcmk_resource_t *rsc, const pcmk_node_t *node, GHashTable *overrides)
 
int pcmk_resource_digests (xmlNodePtr *xml, pcmk_resource_t *rsc, const pcmk_node_t *node, GHashTable *overrides)
 Calculate and output resource operation digests. More...
 

Macro Definition Documentation

◆ XPATH_OP_HISTORY

#define XPATH_OP_HISTORY
Value:
"[@" PCMK_XA_UNAME "='%s']" \
#define PCMK__XE_LRM_RESOURCES
#define PCMK_XE_STATUS
Definition: xml_names.h:204
#define PCMK__XE_LRM_RESOURCE
#define PCMK_XA_UNAME
Definition: xml_names.h:431
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK__XE_LRM
#define PCMK__XE_NODE_STATE

Definition at line 26 of file pcmk_resource.c.

Function Documentation

◆ pcmk__resource_delete()

int pcmk__resource_delete ( cib_t cib,
uint32_t  cib_opts,
const char *  rsc_id,
const char *  rsc_type 
)

Definition at line 123 of file pcmk_resource.c.

◆ pcmk__resource_digests()

int pcmk__resource_digests ( pcmk__output_t out,
pcmk_resource_t rsc,
const pcmk_node_t node,
GHashTable *  overrides 
)

Definition at line 196 of file pcmk_resource.c.

◆ pcmk_resource_delete()

int pcmk_resource_delete ( xmlNodePtr *  xml,
const char *  rsc_id,
const char *  rsc_type 
)

Remove a resource.

Parameters
[in,out]xmlDestination for the result, as an XML tree
[in]rsc_idResource to remove
[in]rsc_typeType of the resource ("primitive", "group", etc.)
Returns
Standard Pacemaker return code
Note
This function will return pcmk_rc_ok if rsc_id doesn't exist or if rsc_type is incorrect for rsc_id (deleting something that doesn't exist always succeeds).

Definition at line 148 of file pcmk_resource.c.

◆ pcmk_resource_digests()

int pcmk_resource_digests ( xmlNodePtr *  xml,
pcmk_resource_t rsc,
const pcmk_node_t node,
GHashTable *  overrides 
)

Calculate and output resource operation digests.

Parameters
[out]xmlWhere to store XML with result
[in,out]rscResource to calculate digests for
[in]nodeNode whose operation history should be used
[in]overridesHash table of configuration parameters to override
Returns
Standard Pacemaker return code

Definition at line 236 of file pcmk_resource.c.