Revision 4c1275f9 lib/constants.py

b/lib/constants.py
392 392
  DT_SHARED_FILE: ST_FILE,
393 393
  }
394 394

  
395
# the set of network-mirrored disk templates
396
DTS_INT_MIRROR = compat.UniqueFrozenset([DT_DRBD8])
397

  
398
# the set of externally-mirrored disk templates (e.g. SAN, NAS)
399
DTS_EXT_MIRROR = compat.UniqueFrozenset([
400
  DT_DISKLESS, # 'trivially' externally mirrored
401
  DT_SHARED_FILE,
402
  DT_BLOCK,
403
  DT_RBD,
404
  DT_EXT,
405
  ])
406

  
407
# the set of non-lvm-based disk templates
408
DTS_NOT_LVM = compat.UniqueFrozenset([
409
  DT_DISKLESS,
410
  DT_FILE,
411
  DT_SHARED_FILE,
412
  DT_BLOCK,
413
  DT_RBD,
414
  DT_EXT,
415
  ])
416

  
417
# the set of disk templates which can be grown
418
DTS_GROWABLE = compat.UniqueFrozenset([
419
  DT_PLAIN,
420
  DT_DRBD8,
421
  DT_FILE,
422
  DT_SHARED_FILE,
423
  DT_RBD,
424
  DT_EXT,
425
  ])
426

  
427
# the set of disk templates that allow adoption
428
DTS_MAY_ADOPT = compat.UniqueFrozenset([
429
  DT_PLAIN,
430
  DT_BLOCK,
431
  ])
432

  
433
# the set of disk templates that *must* use adoption
434
DTS_MUST_ADOPT = compat.UniqueFrozenset([DT_BLOCK])
435

  
436
# the set of disk templates that allow migrations
437
DTS_MIRRORED = frozenset.union(DTS_INT_MIRROR, DTS_EXT_MIRROR)
438

  
439
# the set of file based disk templates
440
DTS_FILEBASED = compat.UniqueFrozenset([
441
  DT_FILE,
442
  DT_SHARED_FILE,
443
  ])
444

  
445
# the set of disk templates that can be moved by copying
446
# Note: a requirement is that they're not accessed externally or shared between
447
# nodes; in particular, sharedfile is not suitable.
448
DTS_COPYABLE = compat.UniqueFrozenset([
449
  DT_FILE,
450
  DT_PLAIN,
451
  ])
452

  
453
# the set of disk templates that are supported by exclusive_storage
454
DTS_EXCL_STORAGE = compat.UniqueFrozenset([DT_PLAIN])
455

  
456
# templates for which we don't perform checks on free space
457
DTS_NO_FREE_SPACE_CHECK = compat.UniqueFrozenset([
458
  DT_FILE,
459
  DT_SHARED_FILE,
460
  DT_RBD,
461
  DT_EXT,
462
  ])
463

  
464
DTS_BLOCK = compat.UniqueFrozenset([
465
  DT_PLAIN,
466
  DT_DRBD8,
467
  DT_BLOCK,
468
  DT_RBD,
469
  DT_EXT,
470
  ])
471 395

  
472 396
# drbd constants
473 397
DRBD_HMAC_ALG = "md5"
......
478 402
#: Size of DRBD meta block device
479 403
DRBD_META_SIZE = 128
480 404

  
405
DTS_INT_MIRROR = _constants.DTS_INT_MIRROR
406
DTS_EXT_MIRROR = _constants.DTS_EXT_MIRROR
407
DTS_NOT_LVM = _constants.DTS_NOT_LVM
408
DTS_GROWABLE = _constants.DTS_GROWABLE
409
DTS_MAY_ADOPT = _constants.DTS_MAY_ADOPT
410
DTS_MUST_ADOPT = _constants.DTS_MUST_ADOPT
411
DTS_MIRRORED = _constants.DTS_MIRRORED
412
DTS_FILEBASED = _constants.DTS_FILEBASED
413
DTS_COPYABLE = _constants.DTS_COPYABLE
414
DTS_EXCL_STORAGE = _constants.DTS_EXCL_STORAGE
415
DTS_NO_FREE_SPACE_CHECK = _constants.DTS_NO_FREE_SPACE_CHECK
416
DTS_BLOCK = _constants.DTS_BLOCK
481 417
# drbd barrier types
482 418
DRBD_B_NONE = "n"
483 419
DRBD_B_DISK_BARRIERS = "b"

Also available in: Unified diff