class documentation

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 Variable bad Undocumented
Method _Error Log an error message if the passed condition is True.
Method _ErrorIf Log an error message if the passed condition is True.
Method _ErrorMsg Log a single error message.
Method _ErrorMsgList Format multiple error messages.
def _Error(self, ecode, item, message, *args, **kwargs):

Log an error message if the passed condition is True.

def _ErrorIf(self, cond, *args, **kwargs):

Log an error message if the passed condition is True.

def _ErrorMsg(self, error_descriptor, object_name, message, log_type=ETYPE_ERROR):

Log a single error message.

def _ErrorMsgList(self, error_descriptor, object_name, message_list, log_type=ETYPE_ERROR):

Format multiple error messages.

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.

Parameters
error_descriptor:tuple (string, string, string)triplet describing the error (object_type, code, description)
object_name:stringname of object (instance, node ..) the error relates to
message_list:list of stringsbody of error messages
log_type:stringlog message type (WARNING, ERROR ..)