Package ganeti :: Module opcodes :: Class OpTestDelay
[hide private]
[frames] | no frames]

Class OpTestDelay

source code


Sleeps for a configured amount of time.

This is used just for debugging and testing.

Parameters:

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.

Nested Classes [hide private]

Inherited from BaseOpCode: __metaclass__

Instance Methods [hide private]
 
OP_DSC_FORMATTER(self, value)
A callable that should format the OP_DSC_FIELD; if not present, then the field will be simply converted to string
source code

Inherited from OpCode: Summary, TinySummary, __getstate__

Inherited from BaseOpCode: Validate, __setstate__

Inherited from outils.ValidatedSlots: __init__

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

Class Methods [hide private]

Inherited from OpCode: LoadOpCode

Inherited from BaseOpCode: GetAllParams

Inherited from outils.ValidatedSlots: GetAllSlots

Class Variables [hide private]
  OP_DSC_FIELD = "duration"
The name of a field whose value will be included in the string returned by Summary(); see the docstring of that method for details).
  OP_PARAMS = [("duration", ht.NoDefault, ht.TNumber, None), ("o...
List of opcode attributes, the default values they should get if not already defined, and types they must match.

Inherited from OpCode: OP_ID, OP_RESULT, WITH_LU

Instance Variables [hide private]

Inherited from OpCode: dry_run, priority

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

OP_DSC_FORMATTER(self, value)

source code 
A callable that should format the OP_DSC_FIELD; if not present, then the field will be simply converted to string
Overrides: OP_DSC_FORMATTER

Class Variable Details [hide private]

OP_PARAMS

List of opcode attributes, the default values they should get if not already defined, and types they must match.
Value:
[("duration", ht.NoDefault, ht.TNumber, None), ("on_master", True, ht.\
TBool, None), ("on_nodes", ht.EmptyList, ht.TListOf(ht.TNonEmptyString\
), None), ("on_node_uuids", None, ht.TMaybeListOf(ht.TNonEmptyString),\
 None), ("repeat", 0, ht.TNonNegativeInt, None),]