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