Revision 294254b1 lib/cmdlib/group.py

b/lib/cmdlib/group.py
39 39
  CheckNodeGroupInstances, GetUpdatedIPolicy, \
40 40
  ComputeNewInstanceViolations, GetDefaultIAllocator, ShareAll, \
41 41
  CheckInstancesNodeGroups, LoadNodeEvacResult, MapInstanceLvsToNodes, \
42
  CheckIpolicyVsDiskTemplates
42
  CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \
43
  CheckDiskAccessModeConsistency
43 44

  
44 45
import ganeti.masterd.instance
45 46

  
......
406 407
      raise errors.OpPrereqError("Please pass at least one modification",
407 408
                                 errors.ECODE_INVAL)
408 409

  
410
    if self.op.diskparams:
411
      CheckDiskAccessModeValidity(self.op.diskparams)
412

  
409 413
  def ExpandNames(self):
410 414
    # This raises errors.OpPrereqError on its own:
411 415
    self.group_uuid = self.cfg.LookupNodeGroup(self.op.group_name)
......
500 504
      # As we've all subdicts of diskparams ready, lets merge the actual
501 505
      # dict with all updated subdicts
502 506
      self.new_diskparams = objects.FillDict(diskparams, new_diskparams)
507

  
503 508
      try:
504 509
        utils.VerifyDictOptions(self.new_diskparams, constants.DISK_DT_DEFAULTS)
510
        CheckDiskAccessModeConsistency(self.new_diskparams, self.cfg,
511
                                       group=self.group)
505 512
      except errors.OpPrereqError, err:
506 513
        raise errors.OpPrereqError("While verify diskparams options: %s" % err,
507 514
                                   errors.ECODE_INVAL)

Also available in: Unified diff