Commit 509bec87 authored by Iustin Pop's avatar Iustin Pop
Browse files

iallocator: fix incomplete refactoring

Commit fdbe29ee

 changed the iallocator modes from 'r'/'w' to
'ro'/'rw', but forgot one check in LUTestAllocator. This patch just
completes the replacements.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent b7a1c816
......@@ -12489,10 +12489,10 @@ class LUTestAllocator(NoHooksLU):
errors.ECODE_INVAL)
for row in self.op.disks:
if (not isinstance(row, dict) or
"size" not in row or
not isinstance(row["size"], int) or
"mode" not in row or
row["mode"] not in ['r', 'w']):
constants.IDISK_SIZE not in row or
not isinstance(row[constants.IDISK_SIZE], int) or
constants.IDISK_MODE not in row or
row[constants.IDISK_MODE] not in constants.DISK_ACCESS_SET):
raise errors.OpPrereqError("Invalid contents of the 'disks'"
" parameter", errors.ECODE_INVAL)
if self.op.hypervisor is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment