Revision 8cb2b4f4

b/tools/cfgupgrade
62 62
# (mapping differing old LD_* constants to new DT_* constants)
63 63
DEV_TYPE_OLD_NEW = {"lvm": constants.DT_PLAIN, "drbd8": constants.DT_DRBD8}
64 64
# (mapping differing new DT_* constants to old LD_* constants)
65
DEV_TYPE_NEW_OLD = {v:k for k,v in DEV_TYPE_OLD_NEW.items()}
65
DEV_TYPE_NEW_OLD = dict((v, k) for k, v in DEV_TYPE_OLD_NEW.items())
66 66

  
67 67

  
68 68
class Error(Exception):
......
387 387
  """Downgrades the disks' device type."""
388 388
  ChangeDiskDevType(disk, DEV_TYPE_NEW_OLD)
389 389

  
390

  
390 391
def DowngradeDisks(disks, owner):
391 392
  for disk in disks:
392 393
    # Remove spindles to downgrade to 2.8

Also available in: Unified diff