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_debug(
"Unrecognizable schedulerd message: invalid message type '%s'",
100 crm_debug(
"Unrecognizable schedulerd message: no reference");
141 do_schedulerd_api_call(
pcmk_ipc_api_t *api,
const char *task, xmlNode *cib,
char **ref)
156 private->client_uuid);
161 crm_debug(
"Couldn't send request to schedulerd: %s rc=%d",
xmlNode * get_message_xml(xmlNode *msg, const char *field)
enum crm_exit_e crm_exit_t
union pcmk_schedulerd_api_reply_t::@7 data
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
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
Wrappers for and extensions to libxml2.
pcmk__ipc_methods_t * pcmk__schedulerd_api_methods()
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
int(* new_data)(pcmk_ipc_api_t *api)
bool(* dispatch)(pcmk_ipc_api_t *api, xmlNode *msg)
struct pcmk_schedulerd_api_reply_t::@7::@8 graph
#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.
IPC commands for Schedulerd.
#define create_request(task, xml_data, host_to, sys_to, sys_from, uuid_from)
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.