Revision 8eb80cb3 src/Ganeti/HsConstants.hs

b/src/Ganeti/HsConstants.hs
1705 1705
dsValidTypes :: FrozenSet String
1706 1706
dsValidTypes = ConstantUtils.mkSet [Types.diskTemplateToRaw DTPlain]
1707 1707

  
1708
-- Backend parameter names
1709

  
1710
beAlwaysFailover :: String
1711
beAlwaysFailover = "always_failover"
1712

  
1713
beAutoBalance :: String
1714
beAutoBalance = "auto_balance"
1715

  
1716
beMaxmem :: String
1717
beMaxmem = "maxmem"
1718

  
1719
-- | Deprecated and replaced by max and min mem
1720
beMemory :: String
1721
beMemory = "memory"
1722

  
1723
beMinmem :: String
1724
beMinmem = "minmem"
1725

  
1726
beSpindleUse :: String
1727
beSpindleUse = "spindle_use"
1728

  
1729
beVcpus :: String
1730
beVcpus = "vcpus"
1731

  
1732
besParameterTypes :: Map String VType
1733
besParameterTypes =
1734
  Map.fromList [(beAlwaysFailover, VTypeBool),
1735
                (beAutoBalance, VTypeBool),
1736
                (beMaxmem, VTypeSize),
1737
                (beMinmem, VTypeSize),
1738
                (beSpindleUse, VTypeInt),
1739
                (beVcpus, VTypeInt)]
1740

  
1741
besParameterTitles :: Map String String
1742
besParameterTitles =
1743
  Map.fromList [(beAutoBalance, "Auto_balance"),
1744
                (beMinmem, "ConfigMinMem"),
1745
                (beVcpus, "ConfigVCPUs"),
1746
                (beMaxmem, "ConfigMaxMem")]
1747

  
1748
besParameterCompat :: Map String VType
1749
besParameterCompat = Map.insert beMemory VTypeSize besParameterTypes
1750

  
1751
besParameters :: FrozenSet String
1752
besParameters =
1753
  ConstantUtils.mkSet [beAlwaysFailover,
1754
                       beAutoBalance,
1755
                       beMaxmem,
1756
                       beMinmem,
1757
                       beSpindleUse,
1758
                       beVcpus]
1759

  
1708 1760
-- | Instance specs
1709 1761
--
1710 1762
-- FIXME: these should be associated with 'Ganeti.HTools.Types.ISpec'
......
1825 1877
   (ndOvsName, "OpenvSwitchName"),
1826 1878
   (ndSpindleCount, "SpindleCount")]
1827 1879

  
1880
-- * Logical Disks parameters
1881

  
1882
ldpAccess :: String
1883
ldpAccess = "access"
1884

  
1885
ldpBarriers :: String
1886
ldpBarriers = "disabled-barriers"
1887

  
1888
ldpDefaultMetavg :: String
1889
ldpDefaultMetavg = "default-metavg"
1890

  
1891
ldpDelayTarget :: String
1892
ldpDelayTarget = "c-delay-target"
1893

  
1894
ldpDiskCustom :: String
1895
ldpDiskCustom = "disk-custom"
1896

  
1897
ldpDynamicResync :: String
1898
ldpDynamicResync = "dynamic-resync"
1828 1899

  
1900
ldpFillTarget :: String
1901
ldpFillTarget = "c-fill-target"
1829 1902

  
1903
ldpMaxRate :: String
1904
ldpMaxRate = "c-max-rate"
1830 1905

  
1906
ldpMinRate :: String
1907
ldpMinRate = "c-min-rate"
1831 1908

  
1909
ldpNetCustom :: String
1910
ldpNetCustom = "net-custom"
1832 1911

  
1912
ldpNoMetaFlush :: String
1913
ldpNoMetaFlush = "disable-meta-flush"
1914

  
1915
ldpPlanAhead :: String
1916
ldpPlanAhead = "c-plan-ahead"
1917

  
1918
ldpPool :: String
1919
ldpPool = "pool"
1920

  
1921
ldpProtocol :: String
1922
ldpProtocol = "protocol"
1923

  
1924
ldpResyncRate :: String
1925
ldpResyncRate = "resync-rate"
1926

  
1927
ldpStripes :: String
1928
ldpStripes = "stripes"
1929

  
1930
diskLdTypes :: Map String VType
1931
diskLdTypes =
1932
  Map.fromList
1933
  [(ldpAccess, VTypeString),
1934
   (ldpResyncRate, VTypeInt),
1935
   (ldpStripes, VTypeInt),
1936
   (ldpBarriers, VTypeString),
1937
   (ldpNoMetaFlush, VTypeBool),
1938
   (ldpDefaultMetavg, VTypeString),
1939
   (ldpDiskCustom, VTypeString),
1940
   (ldpNetCustom, VTypeString),
1941
   (ldpProtocol, VTypeString),
1942
   (ldpDynamicResync, VTypeBool),
1943
   (ldpPlanAhead, VTypeInt),
1944
   (ldpFillTarget, VTypeInt),
1945
   (ldpDelayTarget, VTypeInt),
1946
   (ldpMaxRate, VTypeInt),
1947
   (ldpMinRate, VTypeInt),
1948
   (ldpPool, VTypeString)]
1949

  
1950
diskLdParameters :: FrozenSet String
1951
diskLdParameters = ConstantUtils.mkSet (Map.keys diskLdTypes)
1833 1952

  
1834 1953
-- * OOB supported commands
1835 1954

  

Also available in: Unified diff