Revision 06009e27 lib/opcodes.py
b/lib/opcodes.py | ||
---|---|---|
310 | 310 |
"""Remove a list of tags from a given object.""" |
311 | 311 |
OP_ID = "OP_TAGS_DEL" |
312 | 312 |
__slots__ = ["kind", "name", "tags"] |
313 |
|
|
314 |
|
|
315 |
# Test opcodes |
|
316 |
class OpTestDelay(OpCode): |
|
317 |
"""Sleeps for a configured amount of time. |
|
318 |
|
|
319 |
This is used just for debugging and testing. |
|
320 |
|
|
321 |
Parameters: |
|
322 |
- duration: the time to sleep |
|
323 |
- on_master: if true, sleep on the master |
|
324 |
- on_nodes: list of nodes in which to sleep |
|
325 |
|
|
326 |
If the on_master parameter is true, it will execute a sleep on the |
|
327 |
master (before any node sleep). |
|
328 |
|
|
329 |
If the on_nodes list is not empty, it will sleep on those nodes |
|
330 |
(after the sleep on the master, if that is enabled). |
|
331 |
|
|
332 |
As an additional feature, the case of duration < 0 will be reported |
|
333 |
as an execution error, so this opcode can be used as a failure |
|
334 |
generator. The case of duration == 0 will not be treated specially. |
|
335 |
|
|
336 |
""" |
|
337 |
OP_ID = "OP_TEST_DELAY" |
|
338 |
__slots__ = ["duration", "on_master", "on_nodes"] |
Also available in: Unified diff