quattor/ncm-ncd — pull request #8 by piojo (2013-08-28 15:30:25+00:00)
Title: Implement hooks for ncm-ncd

Implement pre and post-configuration actions for ncm-ncd, as described in [the wiki](https://trac.lal.in2p3.fr/Quattor/wiki/Development/PrePostActionsNCMNCD).

Hooks are invoked with `--{pre,post}-hook` and they may time out after `--{pre,post}-hook-timeout` seconds.

The first commit is just preparation work: cleaning up and adding tests.

Commits 8b684c8 to 8b0fdc6 are my first approach: store the hooks in the state of the object and access it in the appropriate method. But the code got ugly. So from there on, I clean things up quite a bit:

* I refactor the method that truly executes the components.
* Commits 28ee02a and badd1d7 pass the hook as arguments to `executeConfigComponents`.

I am not convinced of which approach is better in this case. I'll appreciate feedback.