Revision cd3b4ff4 lib/backend.py

b/lib/backend.py
2845 2845
    if constants.HV_DISK_TYPE in instance.hvparams:
2846 2846
      result["DISK_%d_FRONTEND_TYPE" % idx] = \
2847 2847
        instance.hvparams[constants.HV_DISK_TYPE]
2848
    if disk.dev_type in constants.LDS_BLOCK:
2848
    if disk.dev_type in constants.DTS_BLOCK:
2849 2849
      result["DISK_%d_BACKEND_TYPE" % idx] = "block"
2850
    elif disk.dev_type == constants.LD_FILE:
2850
    elif disk.dev_type in [constants.DT_FILE, constants.DT_SHARED_FILE]:
2851 2851
      result["DISK_%d_BACKEND_TYPE" % idx] = \
2852 2852
        "file:%s" % disk.physical_id[0]
2853 2853

  
......
2969 2969
  @return: snapshot disk ID as (vg, lv)
2970 2970

  
2971 2971
  """
2972
  if disk.dev_type == constants.LD_DRBD8:
2972
  if disk.dev_type == constants.DT_DRBD8:
2973 2973
    if not disk.children:
2974 2974
      _Fail("DRBD device '%s' without backing storage cannot be snapshotted",
2975 2975
            disk.unique_id)
2976 2976
    return BlockdevSnapshot(disk.children[0])
2977
  elif disk.dev_type == constants.LD_LV:
2977
  elif disk.dev_type == constants.DT_PLAIN:
2978 2978
    r_dev = _RecursiveFindBD(disk)
2979 2979
    if r_dev is not None:
2980 2980
      # FIXME: choose a saner value for the snapshot size

Also available in: Unified diff