Revision b8925b86 lib/cmdlib.py

b/lib/cmdlib.py
11932 11932
    self.recalculate_locks[locking.LEVEL_NODE] = constants.LOCKS_REPLACE
11933 11933

  
11934 11934
  def DeclareLocks(self, level):
11935
    # TODO: Acquire group lock in shared mode (disk parameters)
11935 11936
    if level == locking.LEVEL_NODE:
11936 11937
      self._LockInstancesNodes()
11937 11938
      if self.op.disk_template and self.op.remote_node:
......
12030 12031
    else:
12031 12032
      instance_os = instance.os
12032 12033

  
12034
    assert not (self.op.disk_template and self.op.disks), \
12035
      "Can't modify disk template and apply disk changes at the same time"
12036

  
12033 12037
    if self.op.disk_template:
12034 12038
      if instance.disk_template == self.op.disk_template:
12035 12039
        raise errors.OpPrereqError("Instance already has disk template %s" %

Also available in: Unified diff