class documentation
class HooksRunner(object):
Hook runner.
This class is instantiated on the node side (ganeti-noded) and not on the master side.
Method | __init__ |
Constructor for hooks runner. |
Method |
|
Run the scripts in the hooks directory. |
Method |
|
Check that the hooks will be run only locally and then run them. |
Instance Variable | _BASE |
Undocumented |
Constructor for hooks runner.
Parameters | |
hooks | if not None, this overrides the pathutils.HOOKS_BASE_DIR (useful for unittests) |
Run the scripts in the hooks directory.
Parameters | |
hpath:str | the path to the hooks directory which holds the scripts |
phase:str | either constants.HOOKS_PHASE_PRE or constants.HOOKS_PHASE_POST |
env:dict | dictionary with the environment for the hook |
Returns | |
list | list of 3-element tuples:
|
Raises | |
errors.ProgrammerError | for invalid input parameters |