Revision cd3b4ff4 lib/client/gnt_instance.py

b/lib/client/gnt_instance.py
919 919
  """Formats the logical_id of a disk.
920 920

  
921 921
  """
922
  if dev_type == constants.LD_DRBD8:
922
  if dev_type == constants.DT_DRBD8:
923 923
    drbd_info = dev["drbd_info"]
924 924
    data = [
925 925
      ("nodeA", "%s, minor=%s" %
......
933 933
      ("port", str(compat.TryToRoman(drbd_info["port"], convert=roman))),
934 934
      ("auth key", str(drbd_info["secret"])),
935 935
      ]
936
  elif dev_type == constants.LD_LV:
936
  elif dev_type == constants.DT_PLAIN:
937 937
    vg_name, lv_name = dev["logical_id"]
938 938
    data = ["%s/%s" % (vg_name, lv_name)]
939 939
  else:
......
968 968
    """Format one line for physical device status.
969 969

  
970 970
    @type dtype: str
971
    @param dtype: a constant from the L{constants.LDS_BLOCK} set
971
    @param dtype: a constant from the L{constants.DTS_BLOCK} set
972 972
    @type status: tuple
973 973
    @param status: a tuple as returned from L{backend.FindBlockDevice}
974 974
    @return: the string representing the status
......
989 989
      minor_string = str(compat.TryToRoman(minor, convert=roman))
990 990

  
991 991
    txt += ("%s (%s:%s)" % (path, major_string, minor_string))
992
    if dtype in (constants.LD_DRBD8, ):
992
    if dtype in (constants.DT_DRBD8, ):
993 993
      if syncp is not None:
994 994
        sync_text = "*RECOVERING* %5.2f%%," % syncp
995 995
        if estt:
......
1009 1009
      else:
1010 1010
        ldisk_text = ""
1011 1011
      txt += (" %s, status %s%s" % (sync_text, degr_text, ldisk_text))
1012
    elif dtype == constants.LD_LV:
1012
    elif dtype == constants.DT_PLAIN:
1013 1013
      if ldisk_status == constants.LDS_FAULTY:
1014 1014
        ldisk_text = " *FAILED* (failed drive?)"
1015 1015
      else:

Also available in: Unified diff