pacemaker  1.1.14-70404b0
Scalable High-Availability cluster resource manager
Data Fields
stonith_api_operations_s Struct Reference

#include <stonith-ng.h>

Data Fields

int(* free )(stonith_t *st)
 Destroy the stonith api structure. More...
 
int(* connect )(stonith_t *st, const char *name, int *stonith_fd)
 Connect to the local stonith daemon. More...
 
int(* disconnect )(stonith_t *st)
 Disconnect from the local stonith daemon. More...
 
int(* remove_device )(stonith_t *st, int options, const char *name)
 Remove a registered stonith device with the local stonith daemon. More...
 
int(* register_device )(stonith_t *st, int options, const char *id, const char *namespace, const char *agent, stonith_key_value_t *params)
 Register a stonith device with the local stonith daemon. More...
 
int(* remove_level )(stonith_t *st, int options, const char *node, int level)
 Remove a fencing level for a specific node. More...
 
int(* register_level )(stonith_t *st, int options, const char *node, int level, stonith_key_value_t *device_list)
 Register a fencing level containing the fencing devices to be used at that level for a specific node. More...
 
int(* metadata )(stonith_t *st, int options, const char *device, const char *namespace, char **output, int timeout)
 Get the metadata documentation for a resource. More...
 
int(* list_agents )(stonith_t *stonith, int call_options, const char *namespace, stonith_key_value_t **devices, int timeout)
 Retrieve a list of installed stonith agents. More...
 
int(* list )(stonith_t *st, int options, const char *id, char **list_output, int timeout)
 Retrieve string listing hosts and port assignments from a local stonith device. More...
 
int(* monitor )(stonith_t *st, int options, const char *id, int timeout)
 Check to see if a local stonith device is reachable. More...
 
int(* status )(stonith_t *st, int options, const char *id, const char *port, int timeout)
 Check to see if a local stonith device's port is reachable. More...
 
int(* query )(stonith_t *st, int options, const char *node, stonith_key_value_t **devices, int timeout)
 Retrieve a list of registered stonith devices. More...
 
int(* fence )(stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance)
 Issue a fencing action against a node. More...
 
int(* confirm )(stonith_t *st, int options, const char *node)
 Manually confirm that a node is down. More...
 
int(* history )(stonith_t *st, int options, const char *node, stonith_history_t **output, int timeout)
 Retrieve a list of fencing operations that have occurred for a specific node. More...
 
int(* register_notification )(stonith_t *st, const char *event, void(*notify)(stonith_t *st, stonith_event_t *e))
 
int(* remove_notification )(stonith_t *st, const char *event)
 
int(* register_callback )(stonith_t *st, int call_id, int timeout, int options, void *userdata, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))
 Register a callback to receive the result of an async call id. More...
 
int(* remove_callback )(stonith_t *st, int call_id, bool all_callbacks)
 Remove a registered callback for a given call id. More...
 
int(* remove_level_full )(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level)
 Remove fencing level for specific node, node regex or attribute. More...
 
int(* register_level_full )(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level, stonith_key_value_t *device_list)
 Register fencing level for specific node, node regex or attribute. More...
 

Detailed Description

Definition at line 120 of file stonith-ng.h.

Field Documentation

int(* stonith_api_operations_s::confirm) (stonith_t *st, int options, const char *node)

Manually confirm that a node is down.

Return values
0success
negativeerror code on failure.

Definition at line 273 of file stonith-ng.h.

int(* stonith_api_operations_s::connect) (stonith_t *st, const char *name, int *stonith_fd)

Connect to the local stonith daemon.

Return values
0,success
negativeerror code on failure

Definition at line 133 of file stonith-ng.h.

int(* stonith_api_operations_s::disconnect) (stonith_t *st)

Disconnect from the local stonith daemon.

Return values
0,success
negativeerror code on failure

Definition at line 141 of file stonith-ng.h.

int(* stonith_api_operations_s::fence) (stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance)

Issue a fencing action against a node.

Note
Possible actions are, 'on', 'off', and 'reboot'.
Parameters
st,stonithconnection
options,calloptions
node,Thetarget node to fence
action,Thefencing action to take
timeout,Thedefault per device timeout to use with each device capable of fencing the target.
Return values
0success
negativeerror code on failure.

Definition at line 264 of file stonith-ng.h.

int(* stonith_api_operations_s::free) (stonith_t *st)

Destroy the stonith api structure.

Definition at line 125 of file stonith-ng.h.

int(* stonith_api_operations_s::history) (stonith_t *st, int options, const char *node, stonith_history_t **output, int timeout)

Retrieve a list of fencing operations that have occurred for a specific node.

Note
History is not available in standalone mode.
Return values
0success
negativeerror code on failure.

Definition at line 283 of file stonith-ng.h.

int(* stonith_api_operations_s::list) (stonith_t *st, int options, const char *id, char **list_output, int timeout)

Retrieve string listing hosts and port assignments from a local stonith device.

Return values
0on success
negativeerror code on failure

Definition at line 219 of file stonith-ng.h.

int(* stonith_api_operations_s::list_agents) (stonith_t *stonith, int call_options, const char *namespace, stonith_key_value_t **devices, int timeout)

Retrieve a list of installed stonith agents.

Note
if namespace is not provided, all known agents will be returned
list must be freed using stonith_key_value_freeall()
call_options parameter is not used, it is reserved for future use.
Return values
numitems in list on success
negativeerror code on failure

Definition at line 210 of file stonith-ng.h.

int(* stonith_api_operations_s::metadata) (stonith_t *st, int options, const char *device, const char *namespace, char **output, int timeout)

Get the metadata documentation for a resource.

Note
Value is returned in output. Output must be freed when set.
Return values
0success
negativeerror code on failure

Definition at line 197 of file stonith-ng.h.

int(* stonith_api_operations_s::monitor) (stonith_t *st, int options, const char *id, int timeout)

Check to see if a local stonith device is reachable.

Return values
0on success
negativeerror code on failure

Definition at line 227 of file stonith-ng.h.

int(* stonith_api_operations_s::query) (stonith_t *st, int options, const char *node, stonith_key_value_t **devices, int timeout)

Retrieve a list of registered stonith devices.

Note
If node is provided, only devices that can fence the node id will be returned.
Return values
numitems in list on success
negativeerror code on failure

Definition at line 246 of file stonith-ng.h.

int(* stonith_api_operations_s::register_callback) (stonith_t *st, int call_id, int timeout, int options, void *userdata, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))

Register a callback to receive the result of an async call id.

Parameters
call_id,Thecall id to register the callback for.
timeout,Thedefault timeout period to wait until this callback expires
options,Optionflags, st_opt_timeout_updates and st_opt_report_only_success are the only valid options for this function.
userdate,Apointer that will be handed back in the callback.
callback_name,Uniquename given to callback
callback,Thecallback function
Return values
0success
negativeerror code on failure.

Definition at line 304 of file stonith-ng.h.

int(* stonith_api_operations_s::register_device) (stonith_t *st, int options, const char *id, const char *namespace, const char *agent, stonith_key_value_t *params)

Register a stonith device with the local stonith daemon.

Note
Synchronous, guaranteed to occur in daemon before function returns.
Return values
0,success
negativeerror code on failure

Definition at line 162 of file stonith-ng.h.

int(* stonith_api_operations_s::register_level) (stonith_t *st, int options, const char *node, int level, stonith_key_value_t *device_list)

Register a fencing level containing the fencing devices to be used at that level for a specific node.

Note
This feature is not available when stonith is in standalone mode.
Return values
0,success
negativeerror code on failure

Definition at line 186 of file stonith-ng.h.

int(* stonith_api_operations_s::register_level_full) (stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level, stonith_key_value_t *device_list)

Register fencing level for specific node, node regex or attribute.

Parameters
[in]stStonithd connection to use
[in]optionsBitmask of stonith_call_options to pass to stonithd
[in]nodeIf not NULL, target level by this node name
[in]patternIf not NULL, target by node name using this regex
[in]attrIf not NULL, target by this node attribute
[in]valueIf not NULL, target by this node attribute value
[in]levelIndex number of level to add
[in]device_listDevices to use in level
Returns
0 on success, negative error code otherwise
Note
This feature is not available when stonith is in standalone mode. The caller should set only one of node, pattern or attr/value.

Definition at line 354 of file stonith-ng.h.

int(* stonith_api_operations_s::register_notification) (stonith_t *st, const char *event, void(*notify)(stonith_t *st, stonith_event_t *e))

Definition at line 285 of file stonith-ng.h.

int(* stonith_api_operations_s::remove_callback) (stonith_t *st, int call_id, bool all_callbacks)

Remove a registered callback for a given call id.

Definition at line 315 of file stonith-ng.h.

int(* stonith_api_operations_s::remove_device) (stonith_t *st, int options, const char *name)

Remove a registered stonith device with the local stonith daemon.

Note
Synchronous, guaranteed to occur in daemon before function returns.
Return values
0,success
negativeerror code on failure

Definition at line 151 of file stonith-ng.h.

int(* stonith_api_operations_s::remove_level) (stonith_t *st, int options, const char *node, int level)

Remove a fencing level for a specific node.

Note
This feature is not available when stonith is in standalone mode.
Return values
0,success
negativeerror code on failure

Definition at line 174 of file stonith-ng.h.

int(* stonith_api_operations_s::remove_level_full) (stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level)

Remove fencing level for specific node, node regex or attribute.

Parameters
[in]stStonithd connection to use
[in]optionsBitmask of stonith_call_options to pass to stonithd
[in]nodeIf not NULL, target level by this node name
[in]patternIf not NULL, target by node name using this regex
[in]attrIf not NULL, target by this node attribute
[in]valueIf not NULL, target by this node attribute value
[in]levelIndex number of level to remove
Returns
0 on success, negative error code otherwise
Note
This feature is not available when stonith is in standalone mode. The caller should set only one of node, pattern or attr/value.

Definition at line 333 of file stonith-ng.h.

int(* stonith_api_operations_s::remove_notification) (stonith_t *st, const char *event)

Definition at line 288 of file stonith-ng.h.

int(* stonith_api_operations_s::status) (stonith_t *st, int options, const char *id, const char *port, int timeout)

Check to see if a local stonith device's port is reachable.

Return values
0on success
negativeerror code on failure

Definition at line 235 of file stonith-ng.h.


The documentation for this struct was generated from the following file: