Revision e04ec58e lib/cmdlib.py

b/lib/cmdlib.py
10154 10154
    for nic in self.op.nics:
10155 10155
      utils.ForceDictType(nic, constants.INIC_PARAMS_TYPES)
10156 10156

  
10157
    cluster = self.cfg.GetClusterInfo()
10158
    if not self.op.disk_template in cluster.enabled_disk_templates:
10159
      raise errors.OpPrereqError("Cannot create an instance with disk template"
10160
                                 " '%s', because it is not enabled in the"
10161
                                 " cluster. Enabled disk templates are: %s." %
10162
                                 (self.op.disk_template,
10163
                                  ",".join(cluster.enabled_disk_templates)))
10164

  
10157 10165
    # check disks. parameter names and consistent adopt/no-adopt strategy
10158 10166
    has_adopt = has_no_adopt = False
10159 10167
    for disk in self.op.disks:

Also available in: Unified diff