class documentation

class OpTestDelay(OpCode):

View In Hierarchy

Sleeps for a configured amount of time.

This is used just for debugging and testing.

Parameters:

  • duration: the time to sleep, in seconds
  • on_master: if true, sleep on the master
  • on_nodes: list of nodes in which to sleep

If the on_master parameter is true, it will execute a sleep on the master (before any node sleep).

If the on_nodes list is not empty, it will sleep on those nodes (after the sleep on the master, if that is enabled).

As an additional feature, the case of duration < 0 will be reported as an execution error, so this opcode can be used as a failure generator. The case of duration == 0 will not be treated specially.

Constant OP_DSC_FIELD Undocumented
Constant OP_PARAMS Undocumented

Inherited from OpCode:

Class Method LoadOpCode Generic load opcode method.
Method __getstate__ Specialized getstate for opcodes.
Method Summary Generates a summary description of this opcode.
Method TinySummary Generates a compact summary description of the opcode.
Constant OP_RESULT Callable to verify opcode result
Constant WITH_LU Boolean that specifies whether this should be included in mcpu's dispatch table
Class Variable OP_DSC_FORMATTER A callable that should format the OP_DSC_FIELD; if not present, then the field will be simply converted to string
Class Variable OP_ID The ID of this opcode. This should be unique amongst all children of this class.
Instance Variable dry_run Whether the LU should be run in dry-run mode, i.e. just the check steps
Instance Variable priority Opcode priority for queue

Inherited from BaseOpCode (via OpCode):

Class Method GetAllParams Compute list of all parameters for an opcode.
Method __init__ Constructor for BaseOpCode.
Method __setstate__ Generic unserializer.
Method Validate Validate opcode parameters, optionally setting default values.

Inherited from ValidatedSlots (via OpCode, BaseOpCode):

Class Method GetAllSlots Compute the list of all declared slots for a class.
Class Variable __slots__ Undocumented
OP_DSC_FIELD: str =

Undocumented

Value
'duration'
OP_PARAMS =

Undocumented

Value
[('duration', None, ht.TDouble, 'Duration parameter for \'OpTestDelay\''),
 ('on_master', True, ht.TBool, 'on_master field for \'OpTestDelay\''),
 ('on_nodes',
  [],
  ht.TListOf(ht.TNonEmptyString),
  'on_nodes field for \'OpTestDelay\''),
 ('on_node_uuids', None, ht.TMaybe(ht.TListOf(ht.TNonEmptyString)), 'on_node_uui
...