Revision 509bec87 lib/cmdlib.py

b/lib/cmdlib.py
12489 12489
                                   errors.ECODE_INVAL)
12490 12490
      for row in self.op.disks:
12491 12491
        if (not isinstance(row, dict) or
12492
            "size" not in row or
12493
            not isinstance(row["size"], int) or
12494
            "mode" not in row or
12495
            row["mode"] not in ['r', 'w']):
12492
            constants.IDISK_SIZE not in row or
12493
            not isinstance(row[constants.IDISK_SIZE], int) or
12494
            constants.IDISK_MODE not in row or
12495
            row[constants.IDISK_MODE] not in constants.DISK_ACCESS_SET):
12496 12496
          raise errors.OpPrereqError("Invalid contents of the 'disks'"
12497 12497
                                     " parameter", errors.ECODE_INVAL)
12498 12498
      if self.op.hypervisor is None:

Also available in: Unified diff