10 #ifndef __PCMK_SERVICES__    11 #  define __PCMK_SERVICES__    28 #  include <sys/types.h>    33 #    define OCF_ROOT_DIR "/usr/lib/ocf"    37 #    define LSB_ROOT_DIR "/etc/init.d"    42 #    define SYSTEMCTL "/bin/systemctl"    46 #define PCMK_RESOURCE_CLASS_OCF     "ocf"    47 #define PCMK_RESOURCE_CLASS_SERVICE "service"    48 #define PCMK_RESOURCE_CLASS_LSB     "lsb"    49 #define PCMK_RESOURCE_CLASS_SYSTEMD "systemd"    50 #define PCMK_RESOURCE_CLASS_UPSTART "upstart"    51 #define PCMK_RESOURCE_CLASS_NAGIOS  "nagios"    52 #define PCMK_RESOURCE_CLASS_STONITH "stonith"    58 #define PCMK_OCF_REASON_PREFIX "ocf-exit-reason:"    61 #define PCMK_DEFAULT_AGENT_VERSION "0.1"   222                                      guint interval_ms, 
int timeout );
   243                                       const char *provider, 
const char *agent,
   244                                       const char *
action, guint interval_ms,
   245                                       int timeout , GHashTable *params,
   299                                    int timeout, GHashTable *params,
   300                                    int sequence, 
void *cb_data);
   304     static inline const char *services_lrm_status_str(
enum op_status status) {
   316                 default:
return "UNKNOWN!";
   320     static inline const char *services_ocf_exitcode_str(
enum ocf_exitcode code) {
   327                 return "invalid parameter";
   329                 return "unimplemented feature";
   331                 return "insufficient privileges";
   333                 return "not installed";
   335                 return "not configured";
   337                 return "not running";
   341                 return "master (failed)";
   345                 return "OCF_NOT_SUPPORTED";
   347                 return "OCF_PENDING";
   349                 return "OCF_CANCELLED";
   351                 return "OCF_TIMEOUT";
   353                 return "OCF_OTHER_ERROR";
   355                 return "OCF_DEGRADED";
   357                 return "OCF_DEGRADED_MASTER";
 gboolean services_action_cancel(const char *name, const char *action, guint interval_ms)
Cancel a recurring action.
 
struct svc_action_s svc_action_t
 
void services_action_free(svc_action_t *op)
 
gboolean services_action_kick(const char *name, const char *action, guint interval_ms)
 
const char * resources_find_service_class(const char *agent)
Find first service class that can provide a specified agent.
 
svc_action_t * services_action_create(const char *name, const char *action, guint interval_ms, int timeout)
 
svc_action_t * services_action_create_generic(const char *exec, const char *args[])
 
gboolean services_action_async_fork_notify(svc_action_t *op, void(*action_callback)(svc_action_t *), void(*action_fork_callback)(svc_action_t *))
 
svc_action_t * resources_action_create(const char *name, const char *standard, const char *provider, const char *agent, const char *action, guint interval_ms, int timeout, GHashTable *params, enum svc_action_flags flags)
Create a new resource action.
 
void services_action_cleanup(svc_action_t *op)
 
enum svc_action_flags flags
 
svc_action_private_t * opaque
 
svc_action_t * services_alert_create(const char *id, const char *exec, int timeout, GHashTable *params, int sequence, void *cb_data)
Create an alert agent action.
 
gboolean services_action_sync(svc_action_t *op)
 
GList * resources_list_providers(const char *standard)
Get a list of providers.
 
Function and executable result codes.
 
int services_action_user(svc_action_t *op, const char *user)
Set the user and group that an action will execute as.
 
GList * resources_list_standards(void)
 
GList * get_directory_list(const char *root, gboolean files, gboolean executable)
Get a list of files or directories in a given path.
 
gboolean resources_agent_exists(const char *standard, const char *provider, const char *agent)
 
GList * resources_list_agents(const char *standard, const char *provider)
Get a list of resource agents.
 
gboolean services_alert_async(svc_action_t *action, void(*cb)(svc_action_t *op))
Execute an alert agent action.
 
GList * services_list(void)
 
gboolean services_action_async(svc_action_t *op, void(*action_callback)(svc_action_t *))