projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add new spindle_count node parameter
[ganeti-local]
/
lib
/
ht.py
diff --git
a/lib/ht.py
b/lib/ht.py
index
c28ff1a
..
06ea165
100644
(file)
--- a/
lib/ht.py
+++ b/
lib/ht.py
@@
-360,6
+360,9
@@
def TListOf(my_type):
return desc(TAnd(TList, lambda lst: compat.all(my_type(v) for v in lst)))
+TMaybeListOf = lambda item_type: TOr(TNone, TListOf(item_type))
+
+
def TDictOf(key_type, val_type):
"""Checks a dict type for the type of its key/values.