History | View | Annotate | Download (8.6 kB)
ht.WithDesc: Work around pylint warning
Explicitely defining “__call__” silences a pylint warning when wrappedtype check functions are used directly. I had no idea pylint is thisintelligent.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge branch 'devel-2.4'
ht: Add new check for numbers
Places which receive floats can usually also deal with integers, e.g.OpTestDelay. Tests are added and the new check function is used for theaforementioned opcode and verifying query results.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
ht: Accept both int and long as integers
This fixes a unittest failure on 32 bit systems. A recently addedunittest for ht.TJobId uses a rather large number (2347625220). On 64bit systems it is stored as “int”. On 32 bit systems however, Pythonuses “long”. The two types can be intermixed in Python as the...
ht: Add checks for anything, regexp, job ID, container items
The check for container items is useful for tuples and/or lists withnon-uniform values. The “anything” check can be used when any valueshould be accepted for an item.
The job ID check, which uses the regexp check, will be used for...
ht: Add strict check for dictionaries
This allows checking specific dictionary items, unlike TDictor TDictOf.
OpOobCommand: Adding power on delay
This delays the invocation of the power on of the next node. So if youpower on a bunch of nodes it will not blow the fuse.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
ht: Add descriptive text representations
This patch adds text descriptions to all T* checks. Converting to astring (e.g. str(ht.TNone)) will produce a user-readable text. Thiswill be used for Opcode parameter documentation.
ht: Add TMaybeDict check
This replaces a number of equal “ht.TOr(ht.TDict, ht.TNone)” checks.
ht.TInt: Exclude boolean values
See inline comment.
Move the parameter types to their own module
This is for cleanup, and for later reuse in other parts of the code(outside of LUs).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>