Revision 8eb80cb3 lib/constants.py

b/lib/constants.py
697 697
DSS_PARAMETERS = _constants.DSS_PARAMETERS
698 698
DS_VALID_TYPES = _constants.DS_VALID_TYPES
699 699

  
700
BE_MEMORY = _constants.BE_MEMORY
701
BE_MAXMEM = _constants.BE_MAXMEM
702
BE_MINMEM = _constants.BE_MINMEM
703
BE_VCPUS = _constants.BE_VCPUS
704
BE_AUTO_BALANCE = _constants.BE_AUTO_BALANCE
705
BE_ALWAYS_FAILOVER = _constants.BE_ALWAYS_FAILOVER
706
BE_SPINDLE_USE = _constants.BE_SPINDLE_USE
707
BES_PARAMETER_TYPES = _constants.BES_PARAMETER_TYPES
708
BES_PARAMETER_TITLES = _constants.BES_PARAMETER_TITLES
709
BES_PARAMETER_COMPAT = _constants.BES_PARAMETER_COMPAT
710
BES_PARAMETERS = _constants.BES_PARAMETERS
711

  
700 712
ISPEC_MEM_SIZE = _constants.ISPEC_MEM_SIZE
701 713
ISPEC_CPU_COUNT = _constants.ISPEC_CPU_COUNT
702 714
ISPEC_DISK_COUNT = _constants.ISPEC_DISK_COUNT
......
728 740
NDS_PARAMETERS = _constants.NDS_PARAMETERS
729 741
NDS_PARAMETER_TITLES = _constants.NDS_PARAMETER_TITLES
730 742

  
731

  
732
# Backend parameter names
733
BE_MEMORY = "memory" # deprecated and replaced by max and min mem
734
BE_MAXMEM = "maxmem"
735
BE_MINMEM = "minmem"
736
BE_VCPUS = "vcpus"
737
BE_AUTO_BALANCE = "auto_balance"
738
BE_ALWAYS_FAILOVER = "always_failover"
739
BE_SPINDLE_USE = "spindle_use"
740

  
741
BES_PARAMETER_TYPES = {
742
  BE_MAXMEM: VTYPE_SIZE,
743
  BE_MINMEM: VTYPE_SIZE,
744
  BE_VCPUS: VTYPE_INT,
745
  BE_AUTO_BALANCE: VTYPE_BOOL,
746
  BE_ALWAYS_FAILOVER: VTYPE_BOOL,
747
  BE_SPINDLE_USE: VTYPE_INT,
748
  }
749

  
750
BES_PARAMETER_TITLES = {
751
  BE_AUTO_BALANCE: "Auto_balance",
752
  BE_MAXMEM: "ConfigMaxMem",
753
  BE_MINMEM: "ConfigMinMem",
754
  BE_VCPUS: "ConfigVCPUs",
755
  }
756

  
757
BES_PARAMETER_COMPAT = {
758
  BE_MEMORY: VTYPE_SIZE,
759
  }
760
BES_PARAMETER_COMPAT.update(BES_PARAMETER_TYPES)
761

  
762
BES_PARAMETERS = frozenset(BES_PARAMETER_TYPES.keys())
763

  
764
# Logical Disks parameters
765
LDP_RESYNC_RATE = "resync-rate"
766
LDP_STRIPES = "stripes"
767
LDP_BARRIERS = "disabled-barriers"
768
LDP_NO_META_FLUSH = "disable-meta-flush"
769
LDP_DEFAULT_METAVG = "default-metavg"
770
LDP_DISK_CUSTOM = "disk-custom"
771
LDP_NET_CUSTOM = "net-custom"
772
LDP_PROTOCOL = "protocol"
773
LDP_DYNAMIC_RESYNC = "dynamic-resync"
774
LDP_PLAN_AHEAD = "c-plan-ahead"
775
LDP_FILL_TARGET = "c-fill-target"
776
LDP_DELAY_TARGET = "c-delay-target"
777
LDP_MAX_RATE = "c-max-rate"
778
LDP_MIN_RATE = "c-min-rate"
779
LDP_POOL = "pool"
780
LDP_ACCESS = "access"
781
DISK_LD_TYPES = {
782
  LDP_RESYNC_RATE: VTYPE_INT,
783
  LDP_STRIPES: VTYPE_INT,
784
  LDP_BARRIERS: VTYPE_STRING,
785
  LDP_NO_META_FLUSH: VTYPE_BOOL,
786
  LDP_DEFAULT_METAVG: VTYPE_STRING,
787
  LDP_DISK_CUSTOM: VTYPE_STRING,
788
  LDP_NET_CUSTOM: VTYPE_STRING,
789
  LDP_PROTOCOL: VTYPE_STRING,
790
  LDP_DYNAMIC_RESYNC: VTYPE_BOOL,
791
  LDP_PLAN_AHEAD: VTYPE_INT,
792
  LDP_FILL_TARGET: VTYPE_INT,
793
  LDP_DELAY_TARGET: VTYPE_INT,
794
  LDP_MAX_RATE: VTYPE_INT,
795
  LDP_MIN_RATE: VTYPE_INT,
796
  LDP_POOL: VTYPE_STRING,
797
  LDP_ACCESS: VTYPE_STRING,
798
  }
799
DISK_LD_PARAMETERS = frozenset(DISK_LD_TYPES.keys())
743
LDP_RESYNC_RATE = _constants.LDP_RESYNC_RATE
744
LDP_STRIPES = _constants.LDP_STRIPES
745
LDP_BARRIERS = _constants.LDP_BARRIERS
746
LDP_NO_META_FLUSH = _constants.LDP_NO_META_FLUSH
747
LDP_DEFAULT_METAVG = _constants.LDP_DEFAULT_METAVG
748
LDP_DISK_CUSTOM = _constants.LDP_DISK_CUSTOM
749
LDP_NET_CUSTOM = _constants.LDP_NET_CUSTOM
750
LDP_PROTOCOL = _constants.LDP_PROTOCOL
751
LDP_DYNAMIC_RESYNC = _constants.LDP_DYNAMIC_RESYNC
752
LDP_PLAN_AHEAD = _constants.LDP_PLAN_AHEAD
753
LDP_FILL_TARGET = _constants.LDP_FILL_TARGET
754
LDP_DELAY_TARGET = _constants.LDP_DELAY_TARGET
755
LDP_MAX_RATE = _constants.LDP_MAX_RATE
756
LDP_MIN_RATE = _constants.LDP_MIN_RATE
757
LDP_POOL = _constants.LDP_POOL
758
LDP_ACCESS = _constants.LDP_ACCESS
759
DISK_LD_TYPES = _constants.DISK_LD_TYPES
760
DISK_LD_PARAMETERS = _constants.DISK_LD_PARAMETERS
800 761

  
801 762
# Disk template parameters (can be set/changed by the user via gnt-cluster and
802 763
# gnt-group)

Also available in: Unified diff