14 #include <libxml/tree.h>
25 #define XPATH_OP_HISTORY "//" XML_CIB_TAG_STATUS \
26 "/" XML_CIB_TAG_STATE "[@" XML_ATTR_UNAME "='%s']" \
27 "/" XML_CIB_TAG_LRM "/" XML_LRM_TAG_RESOURCES \
28 "/" XML_LRM_TAG_RESOURCE "[@" XML_ATTR_ID "='%s']"
34 xmlNode *history = NULL;
48 guint interval_ms = 0;
53 || (interval_ms != 0)) {
88 const char *task = NULL;
89 xmlNode *xml_op = NULL;
91 guint interval_ms = 0;
94 if ((out == NULL) || (rsc == NULL) || (node == NULL) || (data_set == NULL)) {
103 xml_op = best_op(rsc, node, data_set);
106 if (xml_op != NULL) {
117 overrides,
true, data_set);
118 rc = out->
message(out,
"digests", rsc, node, task, interval_ms, digests);
xmlNode * first_named_child(const xmlNode *parent, const char *name)
#define XML_LRM_ATTR_INTERVAL
int(* message)(pcmk__output_t *out, const char *message_id,...)
bool pcmk__ends_with(const char *s, const char *match)
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
Wrappers for and extensions to glib mainloop.
int pcmk__resource_digests(pcmk__output_t *out, pe_resource_t *rsc, pe_node_t *node, GHashTable *overrides, pe_working_set_t *data_set)
op_digest_cache_t * pe__calculate_digests(pe_resource_t *rsc, const char *task, guint *interval_ms, pe_node_t *node, xmlNode *xml_op, GHashTable *overrides, bool calc_secure, pe_working_set_t *data_set)
int pcmk__out_prologue(pcmk__output_t **out, xmlNodePtr *xml)
int pcmk_resource_digests(xmlNodePtr *xml, pe_resource_t *rsc, pe_node_t *node, GHashTable *overrides, pe_working_set_t *data_set)
Calculate and output resource operation digests.
#define XML_LRM_ATTR_TASK
Formatted output for pacemaker tools.
int crm_element_value_ms(const xmlNode *data, const char *name, guint *dest)
Retrieve the millisecond value of an XML attribute.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
struct pe_node_shared_s * details
void pcmk__register_lib_messages(pcmk__output_t *out)
#define XML_LRM_ATTR_RESTART_DIGEST
void pe__free_digests(gpointer ptr)
enum pe_obj_types variant
void pcmk__out_epilogue(pcmk__output_t *out, xmlNodePtr *xml, int retval)
Function and executable result codes.
This structure contains everything that makes up a single output formatter.
#define XML_LRM_ATTR_INTERVAL_MS
#define XML_LRM_TAG_RSC_OP
xmlNode * crm_next_same_xml(const xmlNode *sibling)
Get next instance of same XML tag.