pacemaker
2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
|
Formatted output for pacemaker tools. More...
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <libxml/tree.h>
#include <libxml/HTMLtree.h>
#include <glib.h>
#include <crm/common/results.h>
Go to the source code of this file.
Data Structures | |
struct | pcmk__message_entry_s |
struct | pcmk__supported_format_s |
struct | pcmk__output_s |
This structure contains everything that makes up a single output formatter. More... | |
Macros | |
#define | PCMK__OUTPUT_ARGS(ARGS...) |
#define | PCMK__SUPPORTED_FORMAT_HTML { "html", pcmk__mk_html_output, pcmk__html_output_entries } |
#define | PCMK__SUPPORTED_FORMAT_LOG { "log", pcmk__mk_log_output, pcmk__log_output_entries } |
#define | PCMK__SUPPORTED_FORMAT_NONE |
#define | PCMK__SUPPORTED_FORMAT_TEXT { "text", pcmk__mk_text_output, pcmk__text_output_entries } |
#define | PCMK__SUPPORTED_FORMAT_XML { "xml", pcmk__mk_xml_output, pcmk__xml_output_entries } |
#define | PCMK__OUTPUT_SPACER_IF(out_obj, cond) |
#define | PCMK__OUTPUT_LIST_HEADER(out_obj, cond, retcode, title...) |
#define | PCMK__OUTPUT_LIST_FOOTER(out_obj, retcode) |
Typedefs | |
typedef struct pcmk__output_s | pcmk__output_t |
typedef pcmk__output_t *(* | pcmk__output_factory_t) (char **argv) |
typedef int(* | pcmk__message_fn_t) (pcmk__output_t *out, va_list args) |
typedef struct pcmk__message_entry_s | pcmk__message_entry_t |
typedef struct pcmk__supported_format_s | pcmk__supported_format_t |
Functions | |
pcmk__output_t * | pcmk__mk_html_output (char **argv) |
pcmk__output_t * | pcmk__mk_log_output (char **argv) |
pcmk__output_t * | pcmk__mk_none_output (char **argv) |
pcmk__output_t * | pcmk__mk_text_output (char **argv) |
pcmk__output_t * | pcmk__mk_xml_output (char **argv) |
int | pcmk__call_message (pcmk__output_t *out, const char *message_id,...) |
void | pcmk__output_free (pcmk__output_t *out) |
int | pcmk__output_new (pcmk__output_t **out, const char *fmt_name, const char *filename, char **argv) |
int | pcmk__register_format (GOptionGroup *group, const char *name, pcmk__output_factory_t create, const GOptionEntry *options) |
void | pcmk__register_formats (GOptionGroup *group, const pcmk__supported_format_t *table) |
void | pcmk__unregister_formats (void) |
void | pcmk__register_message (pcmk__output_t *out, const char *message_id, pcmk__message_fn_t fn) |
void | pcmk__register_messages (pcmk__output_t *out, const pcmk__message_entry_t *table) |
void | pcmk__indented_printf (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2 |
void void | pcmk__indented_vprintf (pcmk__output_t *out, const char *format, va_list args) G_GNUC_PRINTF(2 |
void void void | pcmk__formatted_printf (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2 |
void void void void | pcmk__formatted_vprintf (pcmk__output_t *out, const char *format, va_list args) G_GNUC_PRINTF(2 |
void void void void void | pcmk__text_prompt (const char *prompt, bool echo, char **dest) |
uint8_t | pcmk__output_get_log_level (const pcmk__output_t *out) |
void | pcmk__output_set_log_level (pcmk__output_t *out, uint8_t log_level) |
void | pcmk__output_set_log_filter (pcmk__output_t *out, const char *file, const char *function, uint32_t line, uint32_t tags) |
xmlNodePtr | pcmk__output_xml_create_parent (pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED |
void | pcmk__output_xml_add_node_copy (pcmk__output_t *out, xmlNodePtr node) |
xmlNodePtr | pcmk__output_create_xml_node (pcmk__output_t *out, const char *name,...) G_GNUC_NULL_TERMINATED |
xmlNodePtr | pcmk__output_create_xml_text_node (pcmk__output_t *out, const char *name, const char *content) |
void | pcmk__output_xml_push_parent (pcmk__output_t *out, xmlNodePtr parent) |
void | pcmk__output_xml_pop_parent (pcmk__output_t *out) |
xmlNodePtr | pcmk__output_xml_peek_parent (pcmk__output_t *out) |
xmlNodePtr | pcmk__output_create_html_node (pcmk__output_t *out, const char *element_name, const char *id, const char *class_name, const char *text) |
void | pcmk__html_add_header (const char *name,...) G_GNUC_NULL_TERMINATED |
void | pcmk__output_and_clear_error (GError **error, pcmk__output_t *out) |
int | pcmk__xml_output_new (pcmk__output_t **out, xmlNodePtr *xml) |
void | pcmk__xml_output_finish (pcmk__output_t *out, xmlNodePtr *xml) |
int | pcmk__log_output_new (pcmk__output_t **out) |
int | pcmk__text_output_new (pcmk__output_t **out, const char *filename) |
Variables | |
GOptionEntry | pcmk__html_output_entries [] |
GOptionEntry | pcmk__log_output_entries [] |
GOptionEntry | pcmk__none_output_entries [] |
GOptionEntry | pcmk__text_output_entries [] |
GOptionEntry | pcmk__xml_output_entries [] |
Formatted output for pacemaker tools.
Definition in file output_internal.h.
#define PCMK__OUTPUT_ARGS | ( | ARGS... | ) |
Definition at line 34 of file output_internal.h.
#define PCMK__OUTPUT_LIST_FOOTER | ( | out_obj, | |
retcode | |||
) |
Definition at line 985 of file output_internal.h.
#define PCMK__OUTPUT_LIST_HEADER | ( | out_obj, | |
cond, | |||
retcode, | |||
title... | |||
) |
Definition at line 978 of file output_internal.h.
#define PCMK__OUTPUT_SPACER_IF | ( | out_obj, | |
cond | |||
) |
Definition at line 973 of file output_internal.h.
#define PCMK__SUPPORTED_FORMAT_HTML { "html", pcmk__mk_html_output, pcmk__html_output_entries } |
Definition at line 157 of file output_internal.h.
#define PCMK__SUPPORTED_FORMAT_LOG { "log", pcmk__mk_log_output, pcmk__log_output_entries } |
Definition at line 158 of file output_internal.h.
#define PCMK__SUPPORTED_FORMAT_NONE |
Definition at line 159 of file output_internal.h.
#define PCMK__SUPPORTED_FORMAT_TEXT { "text", pcmk__mk_text_output, pcmk__text_output_entries } |
Definition at line 161 of file output_internal.h.
#define PCMK__SUPPORTED_FORMAT_XML { "xml", pcmk__mk_xml_output, pcmk__xml_output_entries } |
Definition at line 162 of file output_internal.h.
typedef struct pcmk__message_entry_s pcmk__message_entry_t |
typedef int(* pcmk__message_fn_t) (pcmk__output_t *out, va_list args) |
Definition at line 68 of file output_internal.h.
typedef pcmk__output_t*(* pcmk__output_factory_t) (char **argv) |
Definition at line 49 of file output_internal.h.
typedef struct pcmk__output_s pcmk__output_t |
Definition at line 37 of file output_internal.h.
typedef struct pcmk__supported_format_s pcmk__supported_format_t |
int pcmk__call_message | ( | pcmk__output_t * | out, |
const char * | message_id, | ||
... | |||
) |
void void void pcmk__formatted_printf | ( | pcmk__output_t * | out, |
const char * | format, | ||
... | |||
) |
void void void void pcmk__formatted_vprintf | ( | pcmk__output_t * | out, |
const char * | format, | ||
va_list | args | ||
) |
void pcmk__html_add_header | ( | const char * | name, |
... | |||
) |
Definition at line 455 of file output_html.c.
void pcmk__indented_printf | ( | pcmk__output_t * | out, |
const char * | format, | ||
... | |||
) |
void void pcmk__indented_vprintf | ( | pcmk__output_t * | out, |
const char * | format, | ||
va_list | args | ||
) |
int pcmk__log_output_new | ( | pcmk__output_t ** | out | ) |
pcmk__output_t* pcmk__mk_html_output | ( | char ** | argv | ) |
Definition at line 395 of file output_html.c.
pcmk__output_t* pcmk__mk_log_output | ( | char ** | argv | ) |
Definition at line 319 of file output_log.c.
pcmk__output_t* pcmk__mk_none_output | ( | char ** | argv | ) |
Definition at line 116 of file output_none.c.
pcmk__output_t* pcmk__mk_text_output | ( | char ** | argv | ) |
Definition at line 301 of file output_text.c.
pcmk__output_t* pcmk__mk_xml_output | ( | char ** | argv | ) |
Definition at line 403 of file output_xml.c.
void pcmk__output_and_clear_error | ( | GError ** | error, |
pcmk__output_t * | out | ||
) |
xmlNodePtr pcmk__output_create_html_node | ( | pcmk__output_t * | out, |
const char * | element_name, | ||
const char * | id, | ||
const char * | class_name, | ||
const char * | text | ||
) |
Definition at line 434 of file output_html.c.
xmlNodePtr pcmk__output_create_xml_node | ( | pcmk__output_t * | out, |
const char * | name, | ||
... | |||
) |
Definition at line 478 of file output_xml.c.
xmlNodePtr pcmk__output_create_xml_text_node | ( | pcmk__output_t * | out, |
const char * | name, | ||
const char * | content | ||
) |
Definition at line 497 of file output_xml.c.
void pcmk__output_free | ( | pcmk__output_t * | out | ) |
uint8_t pcmk__output_get_log_level | ( | const pcmk__output_t * | out | ) |
Definition at line 357 of file output_log.c.
int pcmk__output_new | ( | pcmk__output_t ** | out, |
const char * | fmt_name, | ||
const char * | filename, | ||
char ** | argv | ||
) |
void pcmk__output_set_log_filter | ( | pcmk__output_t * | out, |
const char * | file, | ||
const char * | function, | ||
uint32_t | line, | ||
uint32_t | tags | ||
) |
Definition at line 394 of file output_log.c.
void pcmk__output_set_log_level | ( | pcmk__output_t * | out, |
uint8_t | log_level | ||
) |
Definition at line 369 of file output_log.c.
void pcmk__output_xml_add_node_copy | ( | pcmk__output_t * | out, |
xmlNodePtr | node | ||
) |
Definition at line 460 of file output_xml.c.
xmlNodePtr pcmk__output_xml_create_parent | ( | pcmk__output_t * | out, |
const char * | name, | ||
... | |||
) |
Definition at line 442 of file output_xml.c.
xmlNodePtr pcmk__output_xml_peek_parent | ( | pcmk__output_t * | out | ) |
Definition at line 535 of file output_xml.c.
void pcmk__output_xml_pop_parent | ( | pcmk__output_t * | out | ) |
Definition at line 522 of file output_xml.c.
void pcmk__output_xml_push_parent | ( | pcmk__output_t * | out, |
xmlNodePtr | parent | ||
) |
Definition at line 509 of file output_xml.c.
int pcmk__register_format | ( | GOptionGroup * | group, |
const char * | name, | ||
pcmk__output_factory_t | create, | ||
const GOptionEntry * | options | ||
) |
void pcmk__register_formats | ( | GOptionGroup * | group, |
const pcmk__supported_format_t * | table | ||
) |
void pcmk__register_message | ( | pcmk__output_t * | out, |
const char * | message_id, | ||
pcmk__message_fn_t | fn | ||
) |
void pcmk__register_messages | ( | pcmk__output_t * | out, |
const pcmk__message_entry_t * | table | ||
) |
int pcmk__text_output_new | ( | pcmk__output_t ** | out, |
const char * | filename | ||
) |
void void void void void pcmk__text_prompt | ( | const char * | prompt, |
bool | echo, | ||
char ** | dest | ||
) |
Definition at line 402 of file output_text.c.
void pcmk__xml_output_finish | ( | pcmk__output_t * | out, |
xmlNodePtr * | xml | ||
) |
int pcmk__xml_output_new | ( | pcmk__output_t ** | out, |
xmlNodePtr * | xml | ||
) |
GOptionEntry pcmk__html_output_entries[] |
Definition at line 44 of file output_html.c.
GOptionEntry pcmk__log_output_entries[] |
Definition at line 19 of file output_log.c.
GOptionEntry pcmk__none_output_entries[] |
Definition at line 18 of file output_none.c.
GOptionEntry pcmk__text_output_entries[] |
Definition at line 20 of file output_text.c.
GOptionEntry pcmk__xml_output_entries[] |
Definition at line 29 of file output_xml.c.