Package linspector :: Package lib :: Package tasks :: Module task :: Class Task
[hide private]
[frames] | no frames]

Class Task

source code

Known Subclasses:

Base class for all built-in Tasks.

Instance Methods [hide private]
 
set_task_type(self, taskType)
sets the type of this task.
source code
 
get_task_type(self)
returns the type set by set_type_task
source code
 
execute_task(self, msg)
this is the method tasks usually override.
source code
 
_execute(self, taskType, msg)
internal method which gets called for any member in a hostgroup.
source code
Method Details [hide private]

set_task_type(self, taskType)

source code 

sets the type of this task.

Be aware! this method can only get called once!

params:
    taskType: the type of this task

execute_task(self, msg)

source code 

this is the method tasks usually override. 
It gets called anytime the task should get executed

default does nothing

params:
    msg: the msg for this task

_execute(self, taskType, msg)

source code 

internal method which gets called for any member in a hostgroup.
It determines if it has an appropriate type by comparing taskType with get_task_type().
Calls execute_task() if the type matches

params: 
    taskType: the type of the fail which is compared with get_task_type()
    msg: the error message
    
return: 
    True if execute_task() is called succesfully, else False