Revision ec321549
b/lib/constants.py | ||
---|---|---|
759 | 759 |
DISK_LD_TYPES = _constants.DISK_LD_TYPES |
760 | 760 |
DISK_LD_PARAMETERS = _constants.DISK_LD_PARAMETERS |
761 | 761 |
|
762 |
# Disk template parameters (can be set/changed by the user via gnt-cluster and |
|
763 |
# gnt-group) |
|
764 |
DRBD_RESYNC_RATE = "resync-rate" |
|
765 |
DRBD_DATA_STRIPES = "data-stripes" |
|
766 |
DRBD_META_STRIPES = "meta-stripes" |
|
767 |
DRBD_DISK_BARRIERS = "disk-barriers" |
|
768 |
DRBD_META_BARRIERS = "meta-barriers" |
|
769 |
DRBD_DEFAULT_METAVG = "metavg" |
|
770 |
DRBD_DISK_CUSTOM = "disk-custom" |
|
771 |
DRBD_NET_CUSTOM = "net-custom" |
|
772 |
DRBD_PROTOCOL = "protocol" |
|
773 |
DRBD_DYNAMIC_RESYNC = "dynamic-resync" |
|
774 |
DRBD_PLAN_AHEAD = "c-plan-ahead" |
|
775 |
DRBD_FILL_TARGET = "c-fill-target" |
|
776 |
DRBD_DELAY_TARGET = "c-delay-target" |
|
777 |
DRBD_MAX_RATE = "c-max-rate" |
|
778 |
DRBD_MIN_RATE = "c-min-rate" |
|
779 |
LV_STRIPES = "stripes" |
|
780 |
RBD_POOL = "pool" |
|
781 |
RBD_ACCESS = "access" |
|
782 |
DISK_DT_TYPES = { |
|
783 |
DRBD_RESYNC_RATE: VTYPE_INT, |
|
784 |
DRBD_DATA_STRIPES: VTYPE_INT, |
|
785 |
DRBD_META_STRIPES: VTYPE_INT, |
|
786 |
DRBD_DISK_BARRIERS: VTYPE_STRING, |
|
787 |
DRBD_META_BARRIERS: VTYPE_BOOL, |
|
788 |
DRBD_DEFAULT_METAVG: VTYPE_STRING, |
|
789 |
DRBD_DISK_CUSTOM: VTYPE_STRING, |
|
790 |
DRBD_NET_CUSTOM: VTYPE_STRING, |
|
791 |
DRBD_PROTOCOL: VTYPE_STRING, |
|
792 |
DRBD_DYNAMIC_RESYNC: VTYPE_BOOL, |
|
793 |
DRBD_PLAN_AHEAD: VTYPE_INT, |
|
794 |
DRBD_FILL_TARGET: VTYPE_INT, |
|
795 |
DRBD_DELAY_TARGET: VTYPE_INT, |
|
796 |
DRBD_MAX_RATE: VTYPE_INT, |
|
797 |
DRBD_MIN_RATE: VTYPE_INT, |
|
798 |
LV_STRIPES: VTYPE_INT, |
|
799 |
RBD_POOL: VTYPE_STRING, |
|
800 |
RBD_ACCESS: VTYPE_STRING, |
|
801 |
} |
|
802 |
|
|
803 |
DISK_DT_PARAMETERS = frozenset(DISK_DT_TYPES.keys()) |
|
804 |
|
|
805 |
# dynamic disk parameters |
|
806 |
DDP_LOCAL_IP = "local-ip" |
|
807 |
DDP_REMOTE_IP = "remote-ip" |
|
808 |
DDP_PORT = "port" |
|
809 |
DDP_LOCAL_MINOR = "local-minor" |
|
810 |
DDP_REMOTE_MINOR = "remote-minor" |
|
762 |
DRBD_RESYNC_RATE = _constants.DRBD_RESYNC_RATE |
|
763 |
DRBD_DATA_STRIPES = _constants.DRBD_DATA_STRIPES |
|
764 |
DRBD_META_STRIPES = _constants.DRBD_META_STRIPES |
|
765 |
DRBD_DISK_BARRIERS = _constants.DRBD_DISK_BARRIERS |
|
766 |
DRBD_META_BARRIERS = _constants.DRBD_META_BARRIERS |
|
767 |
DRBD_DEFAULT_METAVG = _constants.DRBD_DEFAULT_METAVG |
|
768 |
DRBD_DISK_CUSTOM = _constants.DRBD_DISK_CUSTOM |
|
769 |
DRBD_NET_CUSTOM = _constants.DRBD_NET_CUSTOM |
|
770 |
DRBD_PROTOCOL = _constants.DRBD_PROTOCOL |
|
771 |
DRBD_DYNAMIC_RESYNC = _constants.DRBD_DYNAMIC_RESYNC |
|
772 |
DRBD_PLAN_AHEAD = _constants.DRBD_PLAN_AHEAD |
|
773 |
DRBD_FILL_TARGET = _constants.DRBD_FILL_TARGET |
|
774 |
DRBD_DELAY_TARGET = _constants.DRBD_DELAY_TARGET |
|
775 |
DRBD_MAX_RATE = _constants.DRBD_MAX_RATE |
|
776 |
DRBD_MIN_RATE = _constants.DRBD_MIN_RATE |
|
777 |
LV_STRIPES = _constants.LV_STRIPES |
|
778 |
RBD_ACCESS = _constants.RBD_ACCESS |
|
779 |
RBD_POOL = _constants.RBD_POOL |
|
780 |
DISK_DT_TYPES = _constants.DISK_DT_TYPES |
|
781 |
DISK_DT_PARAMETERS = _constants.DISK_DT_PARAMETERS |
|
782 |
|
|
783 |
DDP_LOCAL_IP = _constants.DDP_LOCAL_IP |
|
784 |
DDP_REMOTE_IP = _constants.DDP_REMOTE_IP |
|
785 |
DDP_PORT = _constants.DDP_PORT |
|
786 |
DDP_LOCAL_MINOR = _constants.DDP_LOCAL_MINOR |
|
787 |
DDP_REMOTE_MINOR = _constants.DDP_REMOTE_MINOR |
|
811 | 788 |
|
812 | 789 |
# OOB supported commands |
813 | 790 |
OOB_POWER_ON = _constants.OOB_POWER_ON |
b/src/Ganeti/HsConstants.hs | ||
---|---|---|
1950 | 1950 |
diskLdParameters :: FrozenSet String |
1951 | 1951 |
diskLdParameters = ConstantUtils.mkSet (Map.keys diskLdTypes) |
1952 | 1952 |
|
1953 |
-- * Disk template parameters |
|
1954 |
-- |
|
1955 |
-- Disk template parameters can be set/changed by the user via |
|
1956 |
-- gnt-cluster and gnt-group) |
|
1957 |
|
|
1958 |
drbdResyncRate :: String |
|
1959 |
drbdResyncRate = "resync-rate" |
|
1960 |
|
|
1961 |
drbdDataStripes :: String |
|
1962 |
drbdDataStripes = "data-stripes" |
|
1963 |
|
|
1964 |
drbdMetaStripes :: String |
|
1965 |
drbdMetaStripes = "meta-stripes" |
|
1966 |
|
|
1967 |
drbdDiskBarriers :: String |
|
1968 |
drbdDiskBarriers = "disk-barriers" |
|
1969 |
|
|
1970 |
drbdMetaBarriers :: String |
|
1971 |
drbdMetaBarriers = "meta-barriers" |
|
1972 |
|
|
1973 |
drbdDefaultMetavg :: String |
|
1974 |
drbdDefaultMetavg = "metavg" |
|
1975 |
|
|
1976 |
drbdDiskCustom :: String |
|
1977 |
drbdDiskCustom = "disk-custom" |
|
1978 |
|
|
1979 |
drbdNetCustom :: String |
|
1980 |
drbdNetCustom = "net-custom" |
|
1981 |
|
|
1982 |
drbdProtocol :: String |
|
1983 |
drbdProtocol = "protocol" |
|
1984 |
|
|
1985 |
drbdDynamicResync :: String |
|
1986 |
drbdDynamicResync = "dynamic-resync" |
|
1987 |
|
|
1988 |
drbdPlanAhead :: String |
|
1989 |
drbdPlanAhead = "c-plan-ahead" |
|
1990 |
|
|
1991 |
drbdFillTarget :: String |
|
1992 |
drbdFillTarget = "c-fill-target" |
|
1993 |
|
|
1994 |
drbdDelayTarget :: String |
|
1995 |
drbdDelayTarget = "c-delay-target" |
|
1996 |
|
|
1997 |
drbdMaxRate :: String |
|
1998 |
drbdMaxRate = "c-max-rate" |
|
1999 |
|
|
2000 |
drbdMinRate :: String |
|
2001 |
drbdMinRate = "c-min-rate" |
|
2002 |
|
|
2003 |
lvStripes :: String |
|
2004 |
lvStripes = "stripes" |
|
2005 |
|
|
2006 |
rbdAccess :: String |
|
2007 |
rbdAccess = "access" |
|
2008 |
|
|
2009 |
rbdPool :: String |
|
2010 |
rbdPool = "pool" |
|
2011 |
|
|
2012 |
diskDtTypes :: Map String VType |
|
2013 |
diskDtTypes = |
|
2014 |
Map.fromList [(drbdResyncRate, VTypeInt), |
|
2015 |
(drbdDataStripes, VTypeInt), |
|
2016 |
(drbdMetaStripes, VTypeInt), |
|
2017 |
(drbdDiskBarriers, VTypeString), |
|
2018 |
(drbdMetaBarriers, VTypeBool), |
|
2019 |
(drbdDefaultMetavg, VTypeString), |
|
2020 |
(drbdDiskCustom, VTypeString), |
|
2021 |
(drbdNetCustom, VTypeString), |
|
2022 |
(drbdProtocol, VTypeString), |
|
2023 |
(drbdDynamicResync, VTypeBool), |
|
2024 |
(drbdPlanAhead, VTypeInt), |
|
2025 |
(drbdFillTarget, VTypeInt), |
|
2026 |
(drbdDelayTarget, VTypeInt), |
|
2027 |
(drbdMaxRate, VTypeInt), |
|
2028 |
(drbdMinRate, VTypeInt), |
|
2029 |
(lvStripes, VTypeInt), |
|
2030 |
(rbdAccess, VTypeString), |
|
2031 |
(rbdPool, VTypeString)] |
|
2032 |
|
|
2033 |
diskDtParameters :: FrozenSet String |
|
2034 |
diskDtParameters = ConstantUtils.mkSet (Map.keys diskDtTypes) |
|
2035 |
|
|
2036 |
-- * Dynamic disk parameters |
|
2037 |
|
|
2038 |
ddpLocalIp :: String |
|
2039 |
ddpLocalIp = "local-ip" |
|
2040 |
|
|
2041 |
ddpRemoteIp :: String |
|
2042 |
ddpRemoteIp = "remote-ip" |
|
2043 |
|
|
2044 |
ddpPort :: String |
|
2045 |
ddpPort = "port" |
|
2046 |
|
|
2047 |
ddpLocalMinor :: String |
|
2048 |
ddpLocalMinor = "local-minor" |
|
2049 |
|
|
2050 |
ddpRemoteMinor :: String |
|
2051 |
ddpRemoteMinor = "remote-minor" |
|
2052 |
|
|
1953 | 2053 |
-- * OOB supported commands |
1954 | 2054 |
|
1955 | 2055 |
oobPowerOn :: String |
Also available in: Unified diff