Commit f8f590c8 authored by Guido Trotter's avatar Guido Trotter
Browse files

Convert TestDelay repeat to the type system

Turns out with the current implementation of the type system a variable
can both be required and not required. Interesting (but perhaps worth a
further look).
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent adb6d685
......@@ -9668,15 +9668,13 @@ class LUTestDelay(NoHooksLU):
("duration", _TFloat),
("on_master", _TBool),
("on_nodes", _TListOf(_TNonEmptyString)),
("repeat", _TPositiveInt)
_OP_DEFS = [
("repeat", 0),
REQ_BGL = False
def CheckArguments(self):
# TODO: convert to the type system
self.op.repeat = getattr(self.op, "repeat", 0)
if self.op.repeat < 0:
raise errors.OpPrereqError("Repetition count cannot be negative")
def ExpandNames(self):
"""Expand names and set required locks.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment