On Fri, May 20, 2011 at 09:23:50AM +0100, Guido Trotter wrote: > From: Adeodato Simo <[email protected]> > > We move all error code definitions, plus the _Error and _ErrorIf helpers, > to a private _VerifyErrors mix-in class that can be later shared by the new > two cluster verify LUs. > > (_Error and _ErrorIf code was moved around verbatim, except to disable > "_VerifyError class does not have 'op' or '_feedback_fn' members" errors > from pylint.) > > Signed-off-by: Adeodato Simo <[email protected]> > --- > lib/cmdlib.py | 93 +++++++++++++++++++++++++++++++------------------------- > 1 files changed, 51 insertions(+), 42 deletions(-) > > diff --git a/lib/cmdlib.py b/lib/cmdlib.py > index a69e93a..c26411f 100644 > --- a/lib/cmdlib.py > +++ b/lib/cmdlib.py > @@ -1286,13 +1286,12 @@ def _VerifyCertificate(filename): > raise errors.ProgrammerError("Unhandled certificate error code %r" % > errcode) > > > -class LUClusterVerify(LogicalUnit): > - """Verifies the cluster status. > +class _VerifyErrors(object): > + """Mix-in for cluster/group verify LUs. > > + It provides _Error and _ErrorIf, and updates the self.bad boolean. (Expects > + self.op and self._feedback_fn to be available.) > """
One empty line before closing """. rest LGTM. iustin
