Revision 3d7d3a12 lib/masterd/iallocator.py
b/lib/masterd/iallocator.py | ||
---|---|---|
57 | 57 |
_NEVAC_RESULT = ht.TAnd(ht.TIsLength(3), |
58 | 58 |
ht.TItems([_NEVAC_MOVED, _NEVAC_FAILED, _JOB_LIST])) |
59 | 59 |
|
60 |
_INST_NAME = ("name", ht.TNonEmptyString) |
|
61 |
|
|
60 | 62 |
|
61 | 63 |
class _AutoReqParam(objectutils.AutoSlots): |
62 | 64 |
"""Meta class for request definitions. |
... | ... | |
141 | 143 |
# pylint: disable=E1101 |
142 | 144 |
MODE = constants.IALLOCATOR_MODE_ALLOC |
143 | 145 |
REQ_PARAMS = [ |
144 |
("name", ht.TString),
|
|
145 |
("memory", ht.TInt), |
|
146 |
("spindle_use", ht.TInt), |
|
146 |
_INST_NAME,
|
|
147 |
("memory", ht.TPositiveInt),
|
|
148 |
("spindle_use", ht.TPositiveInt),
|
|
147 | 149 |
("disks", ht.TListOf(ht.TDict)), |
148 | 150 |
("disk_template", ht.TString), |
149 | 151 |
("os", ht.TString), |
... | ... | |
230 | 232 |
# pylint: disable=E1101 |
231 | 233 |
MODE = constants.IALLOCATOR_MODE_RELOC |
232 | 234 |
REQ_PARAMS = [ |
233 |
("name", ht.TString),
|
|
235 |
_INST_NAME,
|
|
234 | 236 |
("relocate_from", _STRING_LIST), |
235 | 237 |
] |
236 | 238 |
REQ_RESULT = ht.TList |
Also available in: Unified diff