Callbacks

The Callbacks Object is a container of the Callback Objects for the cluster.

Description

arcapix.fs.gpfs.callbacks.setShowAllCallbacks(showall=True)

Pragma function to cause Callbacks to list all callbacks on the Filesystem, including system callbacks.

Parameters:showall – Specify True to show all callbacks. Specify False to only show user callbacks.

Note

System callbacks can’t be created, deleted, or changed.

class arcapix.fs.gpfs.callbacks.Callbacks

Collection of callback objects

new(command, events, **kwargs)

Create a new callback

Parameters:
  • command – Path to an executable, or some Python callable, that the callback should run.
  • events – An event or list of events that should trigger the callback
  • callbackId – An identifier for the callback
  • parms – List of parameters to be passed to the command. These can include GPFS variables.
  • overwrite – Pass overwrite=True to replace any existing callback with the same id
Returns:

The newly created callback object

Return type:

Callback

destroy(*callbackId)

Destroy one or more user callbacks

clear()

Destroy all user callbacks

installedOnNode(nodeId)

Returns a dict of the the user callbacks installed on the specified node (including those installed on all nodes)

Return type:dict of Callback

Examples

Add a new Callback

>>> from arcapix.fs.gpfs import Cluster
>>>
>>> # Load our cluster
... mycluster = Cluster()
>>>
>>> # Add callback
... mycluster.callbacks.new("/tmp/myscript.sh", "startup")
>>>