Revision 42c161cf lib/client/gnt_debug.py
b/lib/client/gnt_debug.py | ||
---|---|---|
159 | 159 |
op = opcodes.OpTestAllocator(mode=opts.mode, |
160 | 160 |
name=args[0], |
161 | 161 |
evac_nodes=args, |
162 |
instances=args, |
|
162 | 163 |
mem_size=opts.mem, |
163 | 164 |
disks=disks, |
164 | 165 |
disk_template=opts.disk_template, |
... | ... | |
168 | 169 |
tags=opts.tags, |
169 | 170 |
direction=opts.direction, |
170 | 171 |
allocator=opts.iallocator, |
171 |
) |
|
172 |
reloc_mode=opts.reloc_mode, |
|
173 |
target_groups=opts.target_groups) |
|
172 | 174 |
result = SubmitOpCode(op, opts=opts) |
173 | 175 |
ToStdout("%s" % result) |
174 | 176 |
return 0 |
... | ... | |
559 | 561 |
" results (out)"), |
560 | 562 |
IALLOCATOR_OPT, |
561 | 563 |
cli_option("-m", "--mode", default="relocate", |
562 |
choices=["relocate", "allocate", "multi-evacuate"], |
|
563 |
help="Request mode, either allocate or relocate"), |
|
564 |
choices=list(constants.VALID_IALLOCATOR_MODES), |
|
565 |
help=("Request mode (one of %s)" % |
|
566 |
utils.CommaJoin(constants.VALID_IALLOCATOR_MODES))), |
|
564 | 567 |
cli_option("--mem", default=128, type="unit", |
565 | 568 |
help="Memory size for the instance (MiB)"), |
566 | 569 |
cli_option("--disks", default="4096,4096", |
... | ... | |
575 | 578 |
help="Select number of VCPUs for the instance"), |
576 | 579 |
cli_option("--tags", default=None, |
577 | 580 |
help="Comma separated list of tags"), |
581 |
cli_option("--reloc-mode", default=constants.IALLOCATOR_MRELOC_ANY, |
|
582 |
choices=list(constants.IALLOCATOR_MRELOC_MODES), |
|
583 |
help=("Instance relocation mode (one of %s)" % |
|
584 |
utils.CommaJoin(constants.IALLOCATOR_MRELOC_MODES))), |
|
585 |
cli_option("--target-groups", help="Target groups for relocation"), |
|
578 | 586 |
DRY_RUN_OPT, PRIORITY_OPT, |
579 | 587 |
], |
580 | 588 |
"{opts...} <instance>", "Executes a TestAllocator OpCode"), |
Also available in: Unified diff