Revision c2e984e2

b/lib/cmdlib/cluster.py
916 916
            raise errors.OpPrereqError("Cannot enable DRBD without a"
917 917
                                       " DRBD usermode helper set.")
918 918

  
919
  def _CheckInstancesOfDisabledDiskTemplates(
920
      self, disabled_disk_templates):
921
    """Check whether we try to a disk template that is in use.
922

  
923
    @type disabled_disk_templates: list of string
924
    @param disabled_disk_templates: list of disk templates that are going to
925
      be disabled by this operation
926

  
927
    """
928
    for disk_template in disabled_disk_templates:
929
      if self.cfg.HasAnyDiskOfType(disk_template):
930
        raise errors.OpPrereqError(
931
            "Cannot disable disk template '%s', because there is at least one"
932
            " instance using it." % disk_template)
933

  
919 934
  def CheckPrereq(self):
920 935
    """Check prerequisites.
921 936

  

Also available in: Unified diff