Commit f68cc544 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rpc: Fix issue with “test_delay”'s timeout

I passed the timeout calculation function in the wrong field of the
definition. A small change is also needed in “build-rpc” to not abort
when writing the docstring.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent d9da5065
......@@ -77,7 +77,7 @@ def _WriteDocstring(sw, name, timeout, kind, args, desc):
note = ["This is a %s call" % kind]
if timeout:
if timeout and not callable(timeout):
note.append(" with a timeout of %s" % utils.FormatSeconds(timeout))
sw.Write("@note: %s", "".join(note))
......@@ -463,9 +463,9 @@ _MISC_CALLS = [
("name", None, "Iallocator name"),
("idata", None, "JSON-encoded input string"),
], None, "Call an iallocator on a remote node"),
("test_delay", MULTI, None, [
("test_delay", MULTI, _TestDelayTimeout, [
("duration", None, None),
], _TestDelayTimeout, "Sleep for a fixed time on given node(s)"),
], None, "Sleep for a fixed time on given node(s)"),
("hypervisor_validate_params", MULTI, TMO_NORMAL, [
("hvname", None, "Hypervisor name"),
("hvfull", None, "Parameters to be validated"),
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