Revision bfbffd55 lib/cmdlib/common.py

b/lib/cmdlib/common.py
1079 1079

  
1080 1080
  """
1081 1081
  assert disk_template is not None
1082
  assert disk_template in constants.DISK_TEMPLATES
1082
  if disk_template not in constants.DISK_TEMPLATES:
1083
    raise errors.OpPrereqError("'%s' is not a valid disk template."
1084
                               " Valid disk templates are: %s" %
1085
                               (disk_template,
1086
                                ",".join(constants.DISK_TEMPLATES)))
1083 1087
  if not disk_template in cluster.enabled_disk_templates:
1084 1088
    raise errors.OpPrereqError("Disk template '%s' is not enabled in cluster."
1085 1089
                               " Enabled disk templates are: %s" %

Also available in: Unified diff