Revision f7d9b3aa lib/rpc_defs.py
b/lib/rpc_defs.py | ||
---|---|---|
24 | 24 |
|
25 | 25 |
- Name as string |
26 | 26 |
- L{SINGLE} for single-node calls, L{MULTI} for multi-node |
27 |
- Timeout (e.g. L{TMO_NORMAL}) |
|
27 |
- Timeout (e.g. L{TMO_NORMAL}), or callback receiving all arguments in a |
|
28 |
tuple to calculate timeout |
|
28 | 29 |
- List of arguments as tuples |
29 | 30 |
|
30 | 31 |
- Name as string |
... | ... | |
149 | 150 |
return result |
150 | 151 |
|
151 | 152 |
|
153 |
def _TestDelayTimeout((duration, )): |
|
154 |
"""Calculate timeout for "test_delay" RPC. |
|
155 |
|
|
156 |
""" |
|
157 |
return int(duration + 5) |
|
158 |
|
|
159 |
|
|
152 | 160 |
_FILE_STORAGE_CALLS = [ |
153 | 161 |
("file_storage_dir_create", SINGLE, TMO_FAST, [ |
154 | 162 |
("file_storage_dir", None, "File storage directory"), |
... | ... | |
457 | 465 |
], None, "Call an iallocator on a remote node"), |
458 | 466 |
("test_delay", MULTI, None, [ |
459 | 467 |
("duration", None, None), |
460 |
], None, "Sleep for a fixed time on given node(s)"),
|
|
468 |
], _TestDelayTimeout, "Sleep for a fixed time on given node(s)"),
|
|
461 | 469 |
("hypervisor_validate_params", MULTI, TMO_NORMAL, [ |
462 | 470 |
("hvname", None, "Hypervisor name"), |
463 | 471 |
("hvfull", None, "Parameters to be validated"), |
Also available in: Unified diff