23 typedef struct schedulerd_api_private_s {
31 struct schedulerd_api_private_s *
private = NULL;
33 api->
api_data = calloc(1,
sizeof(
struct schedulerd_api_private_s));
41 private->client_uuid = pcmk__getpid_s();
49 free(((
struct schedulerd_api_private_s *)
data)->client_uuid);
69 if (command == NULL) {
81 xmlNode *msg_data = NULL;
85 const char *value = NULL;
93 crm_info(
"Unrecognizable message from schedulerd: " 101 crm_info(
"Unrecognizable message from schedulerd: no reference");
116 crm_info(
"Unrecognizable message from schedulerd: " 117 "unknown command '%s'", pcmk__s(value,
""));
143 do_schedulerd_api_call(
pcmk_ipc_api_t *api,
const char *task, xmlNode *cib,
char **ref)
158 private->client_uuid);
163 crm_debug(
"Couldn't send request to schedulerd: %s rc=%d",
enum crm_exit_e crm_exit_t
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
struct pcmk_schedulerd_api_reply_t::@8::@9 graph
G_GNUC_INTERNAL void pcmk__call_ipc_callback(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, crm_exit_t status, void *event_data)
#define crm_debug(fmt, args...)
enum pcmk_schedulerd_api_reply reply_type
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define F_CRM_TGRAPH_INPUT
int pcmk_schedulerd_api_graph(pcmk_ipc_api_t *api, xmlNode *cib, char **ref)
Make an IPC request to the scheduler for the transition graph.
#define CRM_SYSTEM_PENGINE
union pcmk_schedulerd_api_reply_t::@8 data
Wrappers for and extensions to libxml2.
G_GNUC_INTERNAL int pcmk__send_ipc_request(pcmk_ipc_api_t *api, xmlNode *request)
void free_xml(xmlNode *child)
int(* post_connect)(pcmk_ipc_api_t *api)
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
xmlNode * get_message_xml(const xmlNode *msg, const char *field)
int(* new_data)(pcmk_ipc_api_t *api)
bool(* dispatch)(pcmk_ipc_api_t *api, xmlNode *msg)
#define XML_ATTR_REFERENCE
void(* free_data)(void *api_data)
#define XML_ATTR_RESPONSE
bool(* reply_expected)(pcmk_ipc_api_t *api, xmlNode *request)
IPC interface to Pacemaker daemons.
Daemon's reply to client IPC request.
pcmk__ipc_methods_t * pcmk__schedulerd_api_methods(void)
IPC commands for Schedulerd.
#define create_request(task, xml_data, host_to, sys_to, sys_from, uuid_from)
#define crm_info(fmt, args...)
struct schedulerd_api_private_s schedulerd_api_private_t
bool pcmk_ipc_is_connected(pcmk_ipc_api_t *api)
Check whether an IPC API connection is active.