Revision b7b8ff87

b/lib/constants.py
423 423
MAX_TAGS_PER_OBJ = _constants.MAX_TAGS_PER_OBJ
424 424

  
425 425
# others
426
DEFAULT_BRIDGE = "xen-br0"
427
DEFAULT_OVS = "switch1"
428
CLASSIC_DRBD_SYNC_SPEED = 60 * 1024  # 60 MiB, expressed in KiB
429
IP4_ADDRESS_LOCALHOST = "127.0.0.1"
430
IP4_ADDRESS_ANY = "0.0.0.0"
431
IP6_ADDRESS_LOCALHOST = "::1"
432
IP6_ADDRESS_ANY = "::"
433
IP4_VERSION = 4
434
IP6_VERSION = 6
435
VALID_IP_VERSIONS = compat.UniqueFrozenset([IP4_VERSION, IP6_VERSION])
426
DEFAULT_BRIDGE = _constants.DEFAULT_BRIDGE
427
DEFAULT_OVS = _constants.DEFAULT_OVS
428
CLASSIC_DRBD_SYNC_SPEED = _constants.CLASSIC_DRBD_SYNC_SPEED
429
IP4_ADDRESS_LOCALHOST = _constants.IP4_ADDRESS_LOCALHOST
430
IP4_ADDRESS_ANY = _constants.IP4_ADDRESS_ANY
431
IP6_ADDRESS_LOCALHOST = _constants.IP6_ADDRESS_LOCALHOST
432
IP6_ADDRESS_ANY = _constants.IP6_ADDRESS_ANY
433
IP4_VERSION = _constants.IP4_VERSION
434
IP6_VERSION = _constants.IP6_VERSION
435
VALID_IP_VERSIONS = _constants.VALID_IP_VERSIONS
436 436
# for export to htools
437 437
IP4_FAMILY = socket.AF_INET
438 438
IP6_FAMILY = socket.AF_INET6
439 439

  
440
TCP_PING_TIMEOUT = 10
441
DEFAULT_VG = "xenvg"
442
DEFAULT_DRBD_HELPER = "/bin/true"
443
MIN_VG_SIZE = 20480
444
DEFAULT_MAC_PREFIX = "aa:00:00"
445
# default maximum instance wait time, in seconds.
446
DEFAULT_SHUTDOWN_TIMEOUT = 120
440
TCP_PING_TIMEOUT = _constants.TCP_PING_TIMEOUT
441
DEFAULT_VG = _constants.DEFAULT_VG
442
DEFAULT_DRBD_HELPER = _constants.DEFAULT_DRBD_HELPER
443
MIN_VG_SIZE = _constants.MIN_VG_SIZE
444
DEFAULT_MAC_PREFIX = _constants.DEFAULT_MAC_PREFIX
445
DEFAULT_SHUTDOWN_TIMEOUT = _constants.DEFAULT_SHUTDOWN_TIMEOUT
447 446
NODE_MAX_CLOCK_SKEW = _constants.NODE_MAX_CLOCK_SKEW
448 447
# Time for an intra-cluster disk transfer to wait for a connection
449 448
DISK_TRANSFER_CONNECT_TIMEOUT = 60
b/src/Ganeti/HsConstants.hs
1075 1075
maxTagsPerObj :: Int
1076 1076
maxTagsPerObj = 4096
1077 1077

  
1078
-- * Others
1079

  
1080
defaultBridge :: String
1081
defaultBridge = "xen-br0"
1082

  
1083
defaultOvs :: String
1084
defaultOvs = "switch1"
1085

  
1086
-- | 60 MiB, expressed in KiB
1087
classicDrbdSyncSpeed :: Int
1088
classicDrbdSyncSpeed = 60 * 1024
1089

  
1090
ip4AddressAny :: String
1091
ip4AddressAny = "0.0.0.0"
1092

  
1093
ip4AddressLocalhost :: String
1094
ip4AddressLocalhost = "127.0.0.1"
1095

  
1096
ip6AddressAny :: String
1097
ip6AddressAny = "::"
1098

  
1099
ip6AddressLocalhost :: String
1100
ip6AddressLocalhost = "::1"
1101

  
1102
ip4Version :: Int
1103
ip4Version = 4
1104

  
1105
ip6Version :: Int
1106
ip6Version = 6
1107

  
1108
validIpVersions :: FrozenSet Int
1109
validIpVersions = ConstantUtils.mkSet [ip4Version, ip6Version]
1110

  
1111
tcpPingTimeout :: Int
1112
tcpPingTimeout = 10
1113

  
1114
defaultVg :: String
1115
defaultVg = "xenvg"
1116

  
1117
defaultDrbdHelper :: String
1118
defaultDrbdHelper = "/bin/true"
1119

  
1120
minVgSize :: Int
1121
minVgSize = 20480
1122

  
1123
defaultMacPrefix :: String
1124
defaultMacPrefix = "aa:00:00"
1125

  
1126
-- | Default maximum instance wait time, in seconds.
1127
defaultShutdownTimeout :: Int
1128
defaultShutdownTimeout = 120
1129

  
1078 1130
-- | Node clock skew in seconds
1079 1131
nodeMaxClockSkew :: Int
1080 1132
nodeMaxClockSkew = 150

Also available in: Unified diff