Statistics
| Branch: | Tag: | Revision:

root / lib / ht.py @ b6e88032

History | View | Annotate | Download (8.6 kB)

# Date Author Comment
7fc548e9 07/12/2011 06:22 pm Michael Hanselmann

ht.WithDesc: Work around pylint warning

Explicitely defining “__call__” silences a pylint warning when wrapped
type check functions are used directly. I had no idea pylint is this
intelligent.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

b795a775 07/11/2011 05:53 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    ht: Add new check for numbers
    Fix off-by-one bug in job serial generation
    Shorten some unbreakable lines in man pages
    Correct some spelling mistakes
    Fix bug in recreate-disks for DRBD instances
    Fix a lint warning...
697f49d5 07/11/2011 05:28 pm Michael Hanselmann

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 the
aforementioned opcode and verifying query results.

Signed-off-by: Michael Hanselmann <>...

b99b607f 05/30/2011 02:08 pm Michael Hanselmann

ht: Accept both int and long as integers

This fixes a unittest failure on 32 bit systems. A recently added
unittest for ht.TJobId uses a rather large number (2347625220). On 64
bit systems it is stored as “int”. On 32 bit systems however, Python
uses “long”. The two types can be intermixed in Python as the...

8620f50e 05/27/2011 03:14 pm Michael Hanselmann

ht: Add checks for anything, regexp, job ID, container items

The check for container items is useful for tuples and/or lists with
non-uniform values. The “anything” check can be used when any value
should be accepted for an item.

The job ID check, which uses the regexp check, will be used for...

a464ce71 05/17/2011 06:05 pm Michael Hanselmann

ht: Add strict check for dictionaries

This allows checking specific dictionary items, unlike TDict
or TDictOf.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

beff3779 03/09/2011 11:39 am René Nussbaumer

OpOobCommand: Adding power on delay

This delays the invocation of the power on of the next node. So if you
power on a bunch of nodes it will not blow the fuse.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

8c9ee749 02/04/2011 07:05 pm Michael Hanselmann

ht: Add descriptive text representations

This patch adds text descriptions to all T* checks. Converting to a
string (e.g. str(ht.TNone)) will produce a user-readable text. This
will be used for Opcode parameter documentation.

Signed-off-by: Michael Hanselmann <>...

5f074973 01/25/2011 07:00 pm Michael Hanselmann

ht: Add TMaybeDict check

This replaces a number of equal “ht.TOr(ht.TDict, ht.TNone)” checks.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

8568de9e 01/04/2011 05:10 pm Michael Hanselmann

ht.TInt: Exclude boolean values

See inline comment.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

62e0e880 10/13/2010 02:44 pm Iustin Pop

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 <>
Reviewed-by: Michael Hanselmann <>