Package ganeti :: Module cmdlib :: Class _VerifyErrors
[hide private]
[frames] | no frames]

Class _VerifyErrors

source code


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.)

Instance Methods [hide private]
 
_Error(self, ecode, item, msg, *args, **kwargs)
Format an error message.
source code
 
_ErrorIf(self, cond, *args, **kwargs)
Log an error message if the passed condition is True.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  TCLUSTER = "cluster"
  TNODE = "node"
  TINSTANCE = "instance"
  ECLUSTERCFG = TCLUSTER, "ECLUSTERCFG"
  ECLUSTERCERT = TCLUSTER, "ECLUSTERCERT"
  ECLUSTERFILECHECK = TCLUSTER, "ECLUSTERFILECHECK"
  ECLUSTERDANGLINGNODES = TNODE, "ECLUSTERDANGLINGNODES"
  ECLUSTERDANGLINGINST = TNODE, "ECLUSTERDANGLINGINST"
  EINSTANCEBADNODE = TINSTANCE, "EINSTANCEBADNODE"
  EINSTANCEDOWN = TINSTANCE, "EINSTANCEDOWN"
  EINSTANCELAYOUT = TINSTANCE, "EINSTANCELAYOUT"
  EINSTANCEMISSINGDISK = TINSTANCE, "EINSTANCEMISSINGDISK"
  EINSTANCEFAULTYDISK = TINSTANCE, "EINSTANCEFAULTYDISK"
  EINSTANCEWRONGNODE = TINSTANCE, "EINSTANCEWRONGNODE"
  EINSTANCESPLITGROUPS = TINSTANCE, "EINSTANCESPLITGROUPS"
  ENODEDRBD = TNODE, "ENODEDRBD"
  ENODEDRBDHELPER = TNODE, "ENODEDRBDHELPER"
  ENODEFILECHECK = TNODE, "ENODEFILECHECK"
  ENODEHOOKS = TNODE, "ENODEHOOKS"
  ENODEHV = TNODE, "ENODEHV"
  ENODELVM = TNODE, "ENODELVM"
  ENODEN1 = TNODE, "ENODEN1"
  ENODENET = TNODE, "ENODENET"
  ENODEOS = TNODE, "ENODEOS"
  ENODEORPHANINSTANCE = TNODE, "ENODEORPHANINSTANCE"
  ENODEORPHANLV = TNODE, "ENODEORPHANLV"
  ENODERPC = TNODE, "ENODERPC"
  ENODESSH = TNODE, "ENODESSH"
  ENODEVERSION = TNODE, "ENODEVERSION"
  ENODESETUP = TNODE, "ENODESETUP"
  ENODETIME = TNODE, "ENODETIME"
  ENODEOOBPATH = TNODE, "ENODEOOBPATH"
  ETYPE_FIELD = "code"
  ETYPE_ERROR = "ERROR"
  ETYPE_WARNING = "WARNING"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_Error(self, ecode, item, msg, *args, **kwargs)

source code 

Format an error message.

Based on the opcode's error_codes parameter, either format a parseable error code, or a simpler error string.

This must be called only from Exec and functions called from Exec.