NAME
FusionInventory::Agent::Task - Base class for agent task
DESCRIPTION
This is an abstract class for all task performed by the agent.
METHODS
new(%params)
The constructor. The following parameters are allowed, as keys of the %params hash:
- logger
-
the logger object to use (default: a new stderr logger)
- config
- target
- storage
- prologresp
- client
- deviceid
isEnabled()
This is a method to be implemented by each subclass.
run()
This is a method to be implemented by each subclass.
abort()
Abort running task immediatly.
getModules($task)
Return a list of modules for the task. All modules installed at the same location than this package, belonging to __PACKAGE__::$task namespace, will be returned. If not optional $task is given, base search namespace will be __PACKAGE__::Inventory instead.
getRemote()
Method to get the task remote status.
Returns the string set by setRemote() API or an empty string.
setRemote([$task])
Method to set or reset the task remote status.
Without $task parameter, the API resets the remote status to an empty string.