Rework exit model
While updating the confd code, I realised that we have _lots_ of duplication in the exit model for the various programs. So this patch attempts to abstract all the exits via a couple of new functions; sorry for the somewhat big patch, but I hope the payoff is worth the change: the actual exit conditions are much clearer. Note that the patch (also) moves the exitIfBad function to Utils.hs, since that is more logical. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Showing
- htools/Ganeti/BasicTypes.hs 0 additions, 11 deletionshtools/Ganeti/BasicTypes.hs
- htools/Ganeti/Confd/Server.hs 1 addition, 2 deletionshtools/Ganeti/Confd/Server.hs
- htools/Ganeti/Daemon.hs 8 additions, 23 deletionshtools/Ganeti/Daemon.hs
- htools/Ganeti/HTools/CLI.hs 3 additions, 4 deletionshtools/Ganeti/HTools/CLI.hs
- htools/Ganeti/HTools/ExtLoader.hs 8 additions, 23 deletionshtools/Ganeti/HTools/ExtLoader.hs
- htools/Ganeti/HTools/Program/Hspace.hs 9 additions, 22 deletionshtools/Ganeti/HTools/Program/Hspace.hs
- htools/Ganeti/HTools/Utils.hs 32 additions, 0 deletionshtools/Ganeti/HTools/Utils.hs
Loading
Please register or sign in to comment