vcpus=opts.vcpus,
tags=opts.tags,
direction=opts.direction,
- allocator=opts.iallocator,
+ iallocator=opts.iallocator,
evac_mode=opts.evac_mode,
target_groups=target_groups,
spindle_use=opts.spindle_use,
self.op.mode, errors.ECODE_INVAL)
if self.op.direction == constants.IALLOCATOR_DIR_OUT:
- if self.op.allocator is None:
+ if self.op.iallocator is None:
raise errors.OpPrereqError("Missing allocator name",
errors.ECODE_INVAL)
elif self.op.direction != constants.IALLOCATOR_DIR_IN:
if self.op.direction == constants.IALLOCATOR_DIR_IN:
result = ial.in_text
else:
- ial.Run(self.op.allocator, validate=False)
+ ial.Run(self.op.iallocator, validate=False)
result = ial.out_text
return result
return the allocator output (direction 'out')
"""
- OP_DSC_FIELD = "allocator"
+ OP_DSC_FIELD = "iallocator"
OP_PARAMS = [
("direction", ht.NoDefault,
ht.TElemOf(constants.VALID_IALLOCATOR_DIRECTIONS), None),
None),
("disks", ht.NoDefault, ht.TMaybe(ht.TList), None),
("hypervisor", None, ht.TMaybeString, None),
- ("allocator", None, ht.TMaybeString, None),
+ _PIAllocFromDesc(None),
("tags", ht.EmptyList, ht.TListOf(ht.TNonEmptyString), None),
("memory", None, ht.TMaybe(ht.TNonNegativeInt), None),
("vcpus", None, ht.TMaybe(ht.TNonNegativeInt), None),