Revision b844311b lib/rpc.py

b/lib/rpc.py
634 634
    default_space_info = space_info[0]
635 635

  
636 636
  if require_vg_info:
637
    if no_defaults or not default_space_info["type"] == constants.ST_LVM_VG:
637
    # if lvm storage is required, ignore the actual default and look for LVM
638
    lvm_info_found = False
639
    for space_entry in space_info:
640
      if space_entry["type"] == constants.ST_LVM_VG:
641
        default_space_info = space_entry
642
        lvm_info_found = True
643
        continue
644
    if not lvm_info_found:
638 645
      raise errors.OpExecError("LVM volume group info required, but not"
639 646
                               " provided.")
640 647

  

Also available in: Unified diff