Statistics
| Branch: | Tag: | Revision:

root / lib / constants.py @ c506f986

History | View | Annotate | Download (55.7 kB)

1
#
2
#
3

    
4
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
5
#
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
# General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
# 02110-1301, USA.
20

    
21

    
22
"""Module holding different constants."""
23

    
24
import re
25
import socket
26

    
27
from ganeti import _constants
28
from ganeti import _vcsversion
29
from ganeti import compat
30
from ganeti import pathutils
31

    
32

    
33
# various versions
34
RELEASE_VERSION = _constants.RELEASE_VERSION
35
OS_API_V10 = _constants.OS_API_V10
36
OS_API_V15 = _constants.OS_API_V15
37
OS_API_V20 = _constants.OS_API_V20
38
OS_API_VERSIONS = _constants.OS_API_VERSIONS
39
VCS_VERSION = _vcsversion.VCS_VERSION
40
EXPORT_VERSION = _constants.EXPORT_VERSION
41
RAPI_VERSION = _constants.RAPI_VERSION
42

    
43
VERSION_MAJOR = _constants.VERSION_MAJOR
44
VERSION_MINOR = _constants.VERSION_MINOR
45
VERSION_REVISION = _constants.VERSION_REVISION
46

    
47
DIR_VERSION = _constants.DIR_VERSION
48

    
49
CONFIG_MAJOR = _constants.CONFIG_MAJOR
50
CONFIG_MINOR = _constants.CONFIG_MINOR
51
CONFIG_REVISION = _constants.CONFIG_REVISION
52
CONFIG_VERSION = _constants.CONFIG_VERSION
53

    
54
PROTOCOL_VERSION = _constants.PROTOCOL_VERSION
55

    
56
DAEMONS_GROUP = _constants.DAEMONS_GROUP
57
ADMIN_GROUP = _constants.ADMIN_GROUP
58
MASTERD_USER = _constants.MASTERD_USER
59
MASTERD_GROUP = _constants.MASTERD_GROUP
60
RAPI_USER = _constants.RAPI_USER
61
RAPI_GROUP = _constants.RAPI_GROUP
62
CONFD_USER = _constants.CONFD_USER
63
CONFD_GROUP = _constants.CONFD_GROUP
64
LUXID_USER = _constants.LUXID_USER
65
LUXID_GROUP = _constants.LUXID_GROUP
66
NODED_USER = _constants.NODED_USER
67
NODED_GROUP = _constants.NODED_GROUP
68
MOND_USER = _constants.MOND_USER
69
MOND_GROUP = _constants.MOND_GROUP
70
SSH_LOGIN_USER = _constants.SSH_LOGIN_USER
71
SSH_CONSOLE_USER = _constants.SSH_CONSOLE_USER
72

    
73
CPU_PINNING_SEP = _constants.CPU_PINNING_SEP
74
CPU_PINNING_ALL = _constants.CPU_PINNING_ALL
75
CPU_PINNING_ALL_VAL = _constants.CPU_PINNING_ALL_VAL
76
CPU_PINNING_OFF = _constants.CPU_PINNING_OFF
77

    
78
CPU_PINNING_ALL_XEN = _constants.CPU_PINNING_ALL_XEN
79

    
80
CPU_PINNING_ALL_KVM = _constants.CPU_PINNING_ALL_KVM
81

    
82
DD_CMD = _constants.DD_CMD
83
MAX_WIPE_CHUNK = _constants.MAX_WIPE_CHUNK
84
MIN_WIPE_CHUNK_PERCENT = _constants.MIN_WIPE_CHUNK_PERCENT
85

    
86
RUN_DIRS_MODE = _constants.RUN_DIRS_MODE
87
SECURE_DIR_MODE = _constants.SECURE_DIR_MODE
88
SECURE_FILE_MODE = _constants.SECURE_FILE_MODE
89
ADOPTABLE_BLOCKDEV_ROOT = _constants.ADOPTABLE_BLOCKDEV_ROOT
90
ENABLE_CONFD = _constants.ENABLE_CONFD
91
ENABLE_MOND = _constants.ENABLE_MOND
92
ENABLE_SPLIT_QUERY = _constants.ENABLE_SPLIT_QUERY
93
ENABLE_RESTRICTED_COMMANDS = _constants.ENABLE_RESTRICTED_COMMANDS
94

    
95
SSH = _constants.SSH
96
SCP = _constants.SCP
97

    
98
NODED = _constants.NODED
99
CONFD = _constants.CONFD
100
LUXID = _constants.LUXID
101
RAPI = _constants.RAPI
102
MASTERD = _constants.MASTERD
103
MOND = _constants.MOND
104

    
105
DAEMONS = _constants.DAEMONS
106

    
107
DAEMONS_PORTS = _constants.DAEMONS_PORTS
108

    
109
DEFAULT_NODED_PORT = _constants.DEFAULT_NODED_PORT
110
DEFAULT_CONFD_PORT = _constants.DEFAULT_CONFD_PORT
111
DEFAULT_MOND_PORT = _constants.DEFAULT_MOND_PORT
112
DEFAULT_RAPI_PORT = _constants.DEFAULT_RAPI_PORT
113

    
114
FIRST_DRBD_PORT = _constants.FIRST_DRBD_PORT
115
LAST_DRBD_PORT = _constants.LAST_DRBD_PORT
116

    
117
DAEMONS_LOGBASE = _constants.DAEMONS_LOGBASE
118

    
119
DAEMONS_LOGFILES = \
120
    dict((daemon, pathutils.GetLogFilename(DAEMONS_LOGBASE[daemon]))
121
         for daemon in DAEMONS_LOGBASE)
122

    
123
# Some daemons might require more than one logfile.
124
# Specifically, right now only the Haskell http library "snap", used by the
125
# monitoring daemon, requires multiple log files.
126

    
127
# These are the only valid reasons for having an extra logfile
128
EXTRA_LOGREASON_ACCESS = "access"
129
EXTRA_LOGREASON_ERROR = "error"
130

    
131
# These are the extra logfiles, grouped by daemon
132
DAEMONS_EXTRA_LOGBASE = {
133
  MOND: {
134
    EXTRA_LOGREASON_ACCESS: _constants.EXTRA_LOGREASON_ACCESS,
135
    EXTRA_LOGREASON_ERROR: _constants.EXTRA_LOGREASON_ERROR,
136
    }
137
  }
138

    
139
DAEMONS_EXTRA_LOGFILES = \
140
  dict((daemon, dict((extra,
141
       pathutils.GetLogFilename(DAEMONS_EXTRA_LOGBASE[daemon][extra]))
142
       for extra in DAEMONS_EXTRA_LOGBASE[daemon]))
143
         for daemon in DAEMONS_EXTRA_LOGBASE)
144

    
145
DEV_CONSOLE = _constants.DEV_CONSOLE
146

    
147
PROC_MOUNTS = _constants.PROC_MOUNTS
148

    
149
LUXI_EOM = _constants.LUXI_EOM
150
LUXI_VERSION = _constants.LUXI_VERSION
151
LUXI_OVERRIDE = _constants.LUXI_OVERRIDE
152
LUXI_OVERRIDE_MASTER = _constants.LUXI_OVERRIDE_MASTER
153
LUXI_OVERRIDE_QUERY = _constants.LUXI_OVERRIDE_QUERY
154

    
155
SYSLOG_USAGE = _constants.SYSLOG_USAGE
156
SYSLOG_NO = _constants.SYSLOG_NO
157
SYSLOG_YES = _constants.SYSLOG_YES
158
SYSLOG_ONLY = _constants.SYSLOG_ONLY
159
SYSLOG_SOCKET = _constants.SYSLOG_SOCKET
160

    
161
EXPORT_CONF_FILE = _constants.EXPORT_CONF_FILE
162

    
163
XEN_BOOTLOADER = _constants.XEN_BOOTLOADER
164
XEN_KERNEL = _constants.XEN_KERNEL
165
XEN_INITRD = _constants.XEN_INITRD
166
XEN_CMD_XM = _constants.XEN_CMD_XM
167
XEN_CMD_XL = _constants.XEN_CMD_XL
168
KNOWN_XEN_COMMANDS = _constants.KNOWN_XEN_COMMANDS
169

    
170
# When the Xen toolstack used is "xl", live migration requires the source host
171
# to connect to the target host via ssh (xl runs this command). We need to pass
172
# the command xl runs some extra info so that it can use Ganeti's key
173
# verification and not fail. Note that this string is incomplete: it must be
174
# filled with the cluster name before being used.
175
XL_SSH_CMD = ("ssh -l %s -oGlobalKnownHostsFile=%s"
176
              " -oUserKnownHostsFile=/dev/null"
177
              " -oCheckHostIp=no -oStrictHostKeyChecking=yes"
178
              " -oHostKeyAlias=%%s") % (SSH_LOGIN_USER,
179
                                        pathutils.SSH_KNOWN_HOSTS_FILE)
180

    
181
KVM_PATH = _constants.KVM_PATH
182
KVM_KERNEL = _constants.KVM_KERNEL
183
SOCAT_PATH = _constants.SOCAT_PATH
184
SOCAT_USE_ESCAPE = _constants.SOCAT_USE_ESCAPE
185
SOCAT_USE_COMPRESS = _constants.SOCAT_USE_COMPRESS
186
SOCAT_ESCAPE_CODE = _constants.SOCAT_ESCAPE_CODE
187

    
188

    
189
CONS_SSH = _constants.CONS_SSH
190
CONS_VNC = _constants.CONS_VNC
191
CONS_SPICE = _constants.CONS_SPICE
192
CONS_MESSAGE = _constants.CONS_MESSAGE
193
CONS_ALL = _constants.CONS_ALL
194

    
195
RSA_KEY_BITS = _constants.RSA_KEY_BITS
196
OPENSSL_CIPHERS = _constants.OPENSSL_CIPHERS
197

    
198
X509_CERT_SIGN_DIGEST = _constants.X509_CERT_SIGN_DIGEST
199
X509_CERT_DEFAULT_VALIDITY = _constants.X509_CERT_DEFAULT_VALIDITY
200
X509_CERT_CN = _constants.X509_CERT_CN
201
X509_CERT_SIGNATURE_HEADER = _constants.X509_CERT_SIGNATURE_HEADER
202

    
203
# Import/export daemon mode
204
IEM_IMPORT = _constants.IEM_IMPORT
205
IEM_EXPORT = _constants.IEM_EXPORT
206

    
207
# Import/export transport compression
208
IEC_NONE = _constants.IEC_NONE
209
IEC_GZIP = _constants.IEC_GZIP
210
IEC_ALL = _constants.IEC_ALL
211

    
212
IE_CUSTOM_SIZE = _constants.IE_CUSTOM_SIZE
213

    
214
IE_MAGIC_RE = re.compile(r"^[-_.a-zA-Z0-9]{5,100}$")
215

    
216
IEIO_FILE = _constants.IEIO_FILE
217
IEIO_RAW_DISK = _constants.IEIO_RAW_DISK
218
IEIO_SCRIPT = _constants.IEIO_SCRIPT
219

    
220
VALUE_DEFAULT = "default"
221
VALUE_AUTO = "auto"
222
VALUE_GENERATE = "generate"
223
VALUE_NONE = "none"
224
VALUE_TRUE = "true"
225
VALUE_FALSE = "false"
226
VALUE_HS_NOTHING = {"Nothing": None}
227

    
228

    
229
# External script validation mask
230
EXT_PLUGIN_MASK = re.compile("^[a-zA-Z0-9_-]+$")
231

    
232
HOOKS_PHASE_PRE = _constants.HOOKS_PHASE_PRE
233
HOOKS_PHASE_POST = _constants.HOOKS_PHASE_POST
234
HOOKS_NAME_CFGUPDATE = _constants.HOOKS_NAME_CFGUPDATE
235
HOOKS_NAME_WATCHER = _constants.HOOKS_NAME_WATCHER
236
HOOKS_VERSION = _constants.HOOKS_VERSION
237
HOOKS_PATH = _constants.HOOKS_PATH
238

    
239
HTYPE_CLUSTER = _constants.HTYPE_CLUSTER
240
HTYPE_NODE = _constants.HTYPE_NODE
241
HTYPE_GROUP = _constants.HTYPE_GROUP
242
HTYPE_INSTANCE = _constants.HTYPE_INSTANCE
243
HTYPE_NETWORK = _constants.HTYPE_NETWORK
244

    
245
HKR_SKIP = _constants.HKR_SKIP
246
HKR_FAIL = _constants.HKR_FAIL
247
HKR_SUCCESS = _constants.HKR_SUCCESS
248

    
249
ST_BLOCK = _constants.ST_BLOCK
250
ST_DISKLESS = _constants.ST_DISKLESS
251
ST_EXT = _constants.ST_EXT
252
ST_FILE = _constants.ST_FILE
253
ST_LVM_PV = _constants.ST_LVM_PV
254
ST_LVM_VG = _constants.ST_LVM_VG
255
ST_RADOS = _constants.ST_RADOS
256
STORAGE_TYPES = _constants.STORAGE_TYPES
257
STS_REPORT = _constants.STS_REPORT
258

    
259
# Storage fields
260
# first two are valid in LU context only, not passed to backend
261
SF_NODE = _constants.SF_NODE
262
SF_TYPE = _constants.SF_TYPE
263
# and the rest are valid in backend
264
SF_NAME = _constants.SF_NAME
265
SF_SIZE = _constants.SF_SIZE
266
SF_FREE = _constants.SF_FREE
267
SF_USED = _constants.SF_USED
268
SF_ALLOCATABLE = _constants.SF_ALLOCATABLE
269
VALID_STORAGE_FIELDS = _constants.VALID_STORAGE_FIELDS
270
MODIFIABLE_STORAGE_FIELDS = _constants.MODIFIABLE_STORAGE_FIELDS
271

    
272
SO_FIX_CONSISTENCY = _constants.SO_FIX_CONSISTENCY
273
VALID_STORAGE_OPERATIONS = _constants.VALID_STORAGE_OPERATIONS
274

    
275
VF_DEV = _constants.VF_DEV
276
VF_INSTANCE = _constants.VF_INSTANCE
277
VF_NAME = _constants.VF_NAME
278
VF_NODE = _constants.VF_NODE
279
VF_PHYS = _constants.VF_PHYS
280
VF_SIZE = _constants.VF_SIZE
281
VF_VG = _constants.VF_VG
282

    
283
LDS_OKAY = _constants.LDS_OKAY
284
LDS_UNKNOWN = _constants.LDS_UNKNOWN
285
LDS_FAULTY = _constants.LDS_FAULTY
286
LDS_NAMES = _constants.LDS_NAMES
287

    
288
DT_BLOCK = _constants.DT_BLOCK
289
DT_DISKLESS = _constants.DT_DISKLESS
290
DT_DRBD8 = _constants.DT_DRBD8
291
DT_EXT = _constants.DT_EXT
292
DT_FILE = _constants.DT_FILE
293
DT_PLAIN = _constants.DT_PLAIN
294
DT_RBD = _constants.DT_RBD
295
DT_SHARED_FILE = _constants.DT_SHARED_FILE
296
DISK_TEMPLATE_PREFERENCE = _constants.DISK_TEMPLATE_PREFERENCE
297
DISK_TEMPLATES = _constants.DISK_TEMPLATES
298
DEFAULT_ENABLED_DISK_TEMPLATES = _constants.DEFAULT_ENABLED_DISK_TEMPLATES
299

    
300
MAP_DISK_TEMPLATE_STORAGE_TYPE = _constants.MAP_DISK_TEMPLATE_STORAGE_TYPE
301

    
302
DTS_INT_MIRROR = _constants.DTS_INT_MIRROR
303
DTS_EXT_MIRROR = _constants.DTS_EXT_MIRROR
304
DTS_NOT_LVM = _constants.DTS_NOT_LVM
305
DTS_GROWABLE = _constants.DTS_GROWABLE
306
DTS_MAY_ADOPT = _constants.DTS_MAY_ADOPT
307
DTS_MUST_ADOPT = _constants.DTS_MUST_ADOPT
308
DTS_MIRRORED = _constants.DTS_MIRRORED
309
DTS_FILEBASED = _constants.DTS_FILEBASED
310
DTS_COPYABLE = _constants.DTS_COPYABLE
311
DTS_EXCL_STORAGE = _constants.DTS_EXCL_STORAGE
312
DTS_NO_FREE_SPACE_CHECK = _constants.DTS_NO_FREE_SPACE_CHECK
313
DTS_BLOCK = _constants.DTS_BLOCK
314

    
315
DTS_DRBD = _constants.DTS_DRBD
316

    
317
DRBD_HMAC_ALG = _constants.DRBD_HMAC_ALG
318
DRBD_DEFAULT_NET_PROTOCOL = _constants.DRBD_DEFAULT_NET_PROTOCOL
319
DRBD_MIGRATION_NET_PROTOCOL = _constants.DRBD_MIGRATION_NET_PROTOCOL
320
DRBD_STATUS_FILE = _constants.DRBD_STATUS_FILE
321
DRBD_META_SIZE = _constants.DRBD_META_SIZE
322

    
323
DRBD_B_NONE = _constants.DRBD_B_NONE
324
DRBD_B_DISK_BARRIERS = _constants.DRBD_B_DISK_BARRIERS
325
DRBD_B_DISK_DRAIN = _constants.DRBD_B_DISK_DRAIN
326
DRBD_B_DISK_FLUSH = _constants.DRBD_B_DISK_FLUSH
327

    
328
# the set of lvm-based disk templates
329
DTS_LVM = DISK_TEMPLATES - DTS_NOT_LVM
330

    
331
# Valid barrier combinations: "n" or any non-null subset of "bfd"
332
DRBD_VALID_BARRIER_OPT = compat.UniqueFrozenset([
333
  frozenset([DRBD_B_NONE]),
334
  frozenset([DRBD_B_DISK_BARRIERS]),
335
  frozenset([DRBD_B_DISK_DRAIN]),
336
  frozenset([DRBD_B_DISK_FLUSH]),
337
  frozenset([DRBD_B_DISK_DRAIN, DRBD_B_DISK_FLUSH]),
338
  frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_DRAIN]),
339
  frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH]),
340
  frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH, DRBD_B_DISK_DRAIN]),
341
  ])
342

    
343
RBD_CMD = _constants.RBD_CMD
344

    
345
FD_BLKTAP = _constants.FD_BLKTAP
346
FD_LOOP = _constants.FD_LOOP
347
FILE_DRIVER = _constants.FILE_DRIVER
348

    
349
DISK_RDONLY = _constants.DISK_RDONLY
350
DISK_RDWR = _constants.DISK_RDWR
351
DISK_ACCESS_SET = _constants.DISK_ACCESS_SET
352
DISK_USERSPACE = _constants.DISK_USERSPACE
353
DISK_KERNELSPACE = _constants.DISK_KERNELSPACE
354
DISK_VALID_ACCESS_MODES = _constants.DISK_VALID_ACCESS_MODES
355

    
356
REPLACE_DISK_PRI = _constants.REPLACE_DISK_PRI
357
REPLACE_DISK_SEC = _constants.REPLACE_DISK_SEC
358
REPLACE_DISK_CHG = _constants.REPLACE_DISK_CHG
359
REPLACE_DISK_AUTO = _constants.REPLACE_DISK_AUTO
360
REPLACE_MODES = _constants.REPLACE_MODES
361

    
362
EXPORT_MODE_LOCAL = _constants.EXPORT_MODE_LOCAL
363
EXPORT_MODE_REMOTE = _constants.EXPORT_MODE_REMOTE
364
EXPORT_MODES = _constants.EXPORT_MODES
365

    
366
INSTANCE_CREATE = _constants.INSTANCE_CREATE
367
INSTANCE_IMPORT = _constants.INSTANCE_IMPORT
368
INSTANCE_REMOTE_IMPORT = _constants.INSTANCE_REMOTE_IMPORT
369
INSTANCE_CREATE_MODES = _constants.INSTANCE_CREATE_MODES
370

    
371
RIE_VERSION = _constants.RIE_VERSION
372
RIE_HANDSHAKE = _constants.RIE_HANDSHAKE
373
RIE_CERT_VALIDITY = _constants.RIE_CERT_VALIDITY
374
RIE_CONNECT_TIMEOUT = _constants.RIE_CONNECT_TIMEOUT
375
RIE_CONNECT_ATTEMPT_TIMEOUT = _constants.RIE_CONNECT_ATTEMPT_TIMEOUT
376
RIE_CONNECT_RETRIES = _constants.RIE_CONNECT_RETRIES
377
CHILD_LINGER_TIMEOUT = _constants.CHILD_LINGER_TIMEOUT
378

    
379
INISECT_EXP = _constants.INISECT_EXP
380
INISECT_INS = _constants.INISECT_INS
381
INISECT_HYP = _constants.INISECT_HYP
382
INISECT_BEP = _constants.INISECT_BEP
383
INISECT_OSP = _constants.INISECT_OSP
384

    
385
DDM_ADD = _constants.DDM_ADD
386
DDM_MODIFY = _constants.DDM_MODIFY
387
DDM_REMOVE = _constants.DDM_REMOVE
388
DDMS_VALUES = _constants.DDMS_VALUES
389
DDMS_VALUES_WITH_MODIFY = _constants.DDMS_VALUES_WITH_MODIFY
390

    
391
# common exit codes
392
EXIT_SUCCESS = _constants.EXIT_SUCCESS
393
EXIT_FAILURE = _constants.EXIT_FAILURE
394
EXIT_NOTCLUSTER = _constants.EXIT_NOTCLUSTER
395
EXIT_NOTMASTER = _constants.EXIT_NOTMASTER
396
EXIT_NODESETUP_ERROR = _constants.EXIT_NODESETUP_ERROR
397
EXIT_CONFIRMATION = _constants.EXIT_CONFIRMATION
398
EXIT_UNKNOWN_FIELD = _constants.EXIT_UNKNOWN_FIELD
399

    
400
TAG_CLUSTER = _constants.TAG_CLUSTER
401
TAG_NODEGROUP = _constants.TAG_NODEGROUP
402
TAG_NODE = _constants.TAG_NODE
403
TAG_INSTANCE = _constants.TAG_INSTANCE
404
TAG_NETWORK = _constants.TAG_NETWORK
405
VALID_TAG_TYPES = _constants.VALID_TAG_TYPES
406

    
407
MAX_TAG_LEN = _constants.MAX_TAG_LEN
408
MAX_TAGS_PER_OBJ = _constants.MAX_TAGS_PER_OBJ
409

    
410
# others
411
DEFAULT_BRIDGE = _constants.DEFAULT_BRIDGE
412
DEFAULT_OVS = _constants.DEFAULT_OVS
413
CLASSIC_DRBD_SYNC_SPEED = _constants.CLASSIC_DRBD_SYNC_SPEED
414
IP4_ADDRESS_LOCALHOST = _constants.IP4_ADDRESS_LOCALHOST
415
IP4_ADDRESS_ANY = _constants.IP4_ADDRESS_ANY
416
IP6_ADDRESS_LOCALHOST = _constants.IP6_ADDRESS_LOCALHOST
417
IP6_ADDRESS_ANY = _constants.IP6_ADDRESS_ANY
418
IP4_VERSION = _constants.IP4_VERSION
419
IP6_VERSION = _constants.IP6_VERSION
420
VALID_IP_VERSIONS = _constants.VALID_IP_VERSIONS
421
# for export to htools
422
IP4_FAMILY = socket.AF_INET
423
IP6_FAMILY = socket.AF_INET6
424

    
425
TCP_PING_TIMEOUT = _constants.TCP_PING_TIMEOUT
426
DEFAULT_VG = _constants.DEFAULT_VG
427
DEFAULT_DRBD_HELPER = _constants.DEFAULT_DRBD_HELPER
428
MIN_VG_SIZE = _constants.MIN_VG_SIZE
429
DEFAULT_MAC_PREFIX = _constants.DEFAULT_MAC_PREFIX
430
DEFAULT_SHUTDOWN_TIMEOUT = _constants.DEFAULT_SHUTDOWN_TIMEOUT
431
NODE_MAX_CLOCK_SKEW = _constants.NODE_MAX_CLOCK_SKEW
432
DISK_TRANSFER_CONNECT_TIMEOUT = _constants.DISK_TRANSFER_CONNECT_TIMEOUT
433
DISK_SEPARATOR = _constants.DISK_SEPARATOR
434
IP_COMMAND_PATH = _constants.IP_COMMAND_PATH
435
JOB_IDS_KEY = _constants.JOB_IDS_KEY
436

    
437
RUNPARTS_SKIP = _constants.RUNPARTS_SKIP
438
RUNPARTS_RUN = _constants.RUNPARTS_RUN
439
RUNPARTS_ERR = _constants.RUNPARTS_ERR
440
RUNPARTS_STATUS = _constants.RUNPARTS_STATUS
441

    
442
RPC_ENCODING_NONE = _constants.RPC_ENCODING_NONE
443
RPC_ENCODING_ZLIB_BASE64 = _constants.RPC_ENCODING_ZLIB_BASE64
444

    
445
RPC_TMO_URGENT = _constants.RPC_TMO_URGENT
446
RPC_TMO_FAST = _constants.RPC_TMO_FAST
447
RPC_TMO_NORMAL = _constants.RPC_TMO_NORMAL
448
RPC_TMO_SLOW = _constants.RPC_TMO_SLOW
449
RPC_TMO_4HRS = _constants.RPC_TMO_4HRS
450
RPC_TMO_1DAY = _constants.RPC_TMO_1DAY
451
RPC_CONNECT_TIMEOUT = _constants.RPC_CONNECT_TIMEOUT
452

    
453
OS_SCRIPT_CREATE = _constants.OS_SCRIPT_CREATE
454
OS_SCRIPT_IMPORT = _constants.OS_SCRIPT_IMPORT
455
OS_SCRIPT_EXPORT = _constants.OS_SCRIPT_EXPORT
456
OS_SCRIPT_RENAME = _constants.OS_SCRIPT_RENAME
457
OS_SCRIPT_VERIFY = _constants.OS_SCRIPT_VERIFY
458
OS_SCRIPTS = _constants.OS_SCRIPTS
459

    
460
OS_API_FILE = _constants.OS_API_FILE
461
OS_VARIANTS_FILE = _constants.OS_VARIANTS_FILE
462
OS_PARAMETERS_FILE = _constants.OS_PARAMETERS_FILE
463

    
464
OS_VALIDATE_PARAMETERS = _constants.OS_VALIDATE_PARAMETERS
465
OS_VALIDATE_CALLS = _constants.OS_VALIDATE_CALLS
466

    
467
ES_ACTION_CREATE = _constants.ES_ACTION_CREATE
468
ES_ACTION_REMOVE = _constants.ES_ACTION_REMOVE
469
ES_ACTION_GROW = _constants.ES_ACTION_GROW
470
ES_ACTION_ATTACH = _constants.ES_ACTION_ATTACH
471
ES_ACTION_DETACH = _constants.ES_ACTION_DETACH
472
ES_ACTION_SETINFO = _constants.ES_ACTION_SETINFO
473
ES_ACTION_VERIFY = _constants.ES_ACTION_VERIFY
474

    
475
ES_SCRIPT_CREATE = _constants.ES_SCRIPT_CREATE
476
ES_SCRIPT_REMOVE = _constants.ES_SCRIPT_REMOVE
477
ES_SCRIPT_GROW = _constants.ES_SCRIPT_GROW
478
ES_SCRIPT_ATTACH = _constants.ES_SCRIPT_ATTACH
479
ES_SCRIPT_DETACH = _constants.ES_SCRIPT_DETACH
480
ES_SCRIPT_SETINFO = _constants.ES_SCRIPT_SETINFO
481
ES_SCRIPT_VERIFY = _constants.ES_SCRIPT_VERIFY
482
ES_SCRIPTS = _constants.ES_SCRIPTS
483

    
484
ES_PARAMETERS_FILE = _constants.ES_PARAMETERS_FILE
485

    
486
INSTANCE_REBOOT_SOFT = _constants.INSTANCE_REBOOT_SOFT
487
INSTANCE_REBOOT_HARD = _constants.INSTANCE_REBOOT_HARD
488
INSTANCE_REBOOT_FULL = _constants.INSTANCE_REBOOT_FULL
489
REBOOT_TYPES = _constants.REBOOT_TYPES
490

    
491
INSTANCE_REBOOT_ALLOWED = _constants.INSTANCE_REBOOT_ALLOWED
492
INSTANCE_REBOOT_EXIT = _constants.INSTANCE_REBOOT_EXIT
493
REBOOT_BEHAVIORS = _constants.REBOOT_BEHAVIORS
494

    
495
VTYPE_STRING = _constants.VTYPE_STRING
496
VTYPE_MAYBE_STRING = _constants.VTYPE_MAYBE_STRING
497
VTYPE_BOOL = _constants.VTYPE_BOOL
498
VTYPE_SIZE = _constants.VTYPE_SIZE
499
VTYPE_INT = _constants.VTYPE_INT
500
ENFORCEABLE_TYPES = _constants.ENFORCEABLE_TYPES
501

    
502
IFACE_NO_IP_VERSION_SPECIFIED = _constants.IFACE_NO_IP_VERSION_SPECIFIED
503

    
504
VALID_SERIAL_SPEEDS = _constants.VALID_SERIAL_SPEEDS
505

    
506
HV_BOOT_ORDER = _constants.HV_BOOT_ORDER
507
HV_CDROM_IMAGE_PATH = _constants.HV_CDROM_IMAGE_PATH
508
HV_KVM_CDROM2_IMAGE_PATH = _constants.HV_KVM_CDROM2_IMAGE_PATH
509
HV_KVM_FLOPPY_IMAGE_PATH = _constants.HV_KVM_FLOPPY_IMAGE_PATH
510
HV_NIC_TYPE = _constants.HV_NIC_TYPE
511
HV_DISK_TYPE = _constants.HV_DISK_TYPE
512
HV_KVM_CDROM_DISK_TYPE = _constants.HV_KVM_CDROM_DISK_TYPE
513
HV_VNC_BIND_ADDRESS = _constants.HV_VNC_BIND_ADDRESS
514
HV_VNC_PASSWORD_FILE = _constants.HV_VNC_PASSWORD_FILE
515
HV_VNC_TLS = _constants.HV_VNC_TLS
516
HV_VNC_X509 = _constants.HV_VNC_X509
517
HV_VNC_X509_VERIFY = _constants.HV_VNC_X509_VERIFY
518
HV_KVM_SPICE_BIND = _constants.HV_KVM_SPICE_BIND
519
HV_KVM_SPICE_IP_VERSION = _constants.HV_KVM_SPICE_IP_VERSION
520
HV_KVM_SPICE_PASSWORD_FILE = _constants.HV_KVM_SPICE_PASSWORD_FILE
521
HV_KVM_SPICE_LOSSLESS_IMG_COMPR = _constants.HV_KVM_SPICE_LOSSLESS_IMG_COMPR
522
HV_KVM_SPICE_JPEG_IMG_COMPR = _constants.HV_KVM_SPICE_JPEG_IMG_COMPR
523
HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR = _constants.HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR
524
HV_KVM_SPICE_STREAMING_VIDEO_DETECTION = \
525
  _constants.HV_KVM_SPICE_STREAMING_VIDEO_DETECTION
526
HV_KVM_SPICE_AUDIO_COMPR = _constants.HV_KVM_SPICE_AUDIO_COMPR
527
HV_KVM_SPICE_USE_TLS = _constants.HV_KVM_SPICE_USE_TLS
528
HV_KVM_SPICE_TLS_CIPHERS = _constants.HV_KVM_SPICE_TLS_CIPHERS
529
HV_KVM_SPICE_USE_VDAGENT = _constants.HV_KVM_SPICE_USE_VDAGENT
530
HV_ACPI = _constants.HV_ACPI
531
HV_PAE = _constants.HV_PAE
532
HV_USE_BOOTLOADER = _constants.HV_USE_BOOTLOADER
533
HV_BOOTLOADER_ARGS = _constants.HV_BOOTLOADER_ARGS
534
HV_BOOTLOADER_PATH = _constants.HV_BOOTLOADER_PATH
535
HV_KERNEL_ARGS = _constants.HV_KERNEL_ARGS
536
HV_KERNEL_PATH = _constants.HV_KERNEL_PATH
537
HV_INITRD_PATH = _constants.HV_INITRD_PATH
538
HV_ROOT_PATH = _constants.HV_ROOT_PATH
539
HV_SERIAL_CONSOLE = _constants.HV_SERIAL_CONSOLE
540
HV_SERIAL_SPEED = _constants.HV_SERIAL_SPEED
541
HV_USB_MOUSE = _constants.HV_USB_MOUSE
542
HV_KEYMAP = _constants.HV_KEYMAP
543
HV_DEVICE_MODEL = _constants.HV_DEVICE_MODEL
544
HV_INIT_SCRIPT = _constants.HV_INIT_SCRIPT
545
HV_MIGRATION_PORT = _constants.HV_MIGRATION_PORT
546
HV_MIGRATION_BANDWIDTH = _constants.HV_MIGRATION_BANDWIDTH
547
HV_MIGRATION_DOWNTIME = _constants.HV_MIGRATION_DOWNTIME
548
HV_MIGRATION_MODE = _constants.HV_MIGRATION_MODE
549
HV_USE_LOCALTIME = _constants.HV_USE_LOCALTIME
550
HV_DISK_CACHE = _constants.HV_DISK_CACHE
551
HV_SECURITY_MODEL = _constants.HV_SECURITY_MODEL
552
HV_SECURITY_DOMAIN = _constants.HV_SECURITY_DOMAIN
553
HV_KVM_FLAG = _constants.HV_KVM_FLAG
554
HV_VHOST_NET = _constants.HV_VHOST_NET
555
HV_KVM_USE_CHROOT = _constants.HV_KVM_USE_CHROOT
556
HV_CPU_MASK = _constants.HV_CPU_MASK
557
HV_MEM_PATH = _constants.HV_MEM_PATH
558
HV_PASSTHROUGH = _constants.HV_PASSTHROUGH
559
HV_BLOCKDEV_PREFIX = _constants.HV_BLOCKDEV_PREFIX
560
HV_REBOOT_BEHAVIOR = _constants.HV_REBOOT_BEHAVIOR
561
HV_CPU_TYPE = _constants.HV_CPU_TYPE
562
HV_CPU_CAP = _constants.HV_CPU_CAP
563
HV_CPU_WEIGHT = _constants.HV_CPU_WEIGHT
564
HV_CPU_CORES = _constants.HV_CPU_CORES
565
HV_CPU_THREADS = _constants.HV_CPU_THREADS
566
HV_CPU_SOCKETS = _constants.HV_CPU_SOCKETS
567
HV_SOUNDHW = _constants.HV_SOUNDHW
568
HV_USB_DEVICES = _constants.HV_USB_DEVICES
569
HV_VGA = _constants.HV_VGA
570
HV_KVM_EXTRA = _constants.HV_KVM_EXTRA
571
HV_KVM_MACHINE_VERSION = _constants.HV_KVM_MACHINE_VERSION
572
HV_KVM_PATH = _constants.HV_KVM_PATH
573
HV_VIF_TYPE = _constants.HV_VIF_TYPE
574
HV_VIF_SCRIPT = _constants.HV_VIF_SCRIPT
575
HV_XEN_CMD = _constants.HV_XEN_CMD
576
HV_XEN_CPUID = _constants.HV_XEN_CPUID
577
HV_VNET_HDR = _constants.HV_VNET_HDR
578
HV_VIRIDIAN = _constants.HV_VIRIDIAN
579

    
580
HVS_PARAMETER_TYPES = {
581
  HV_KVM_PATH: VTYPE_STRING,
582
  HV_BOOT_ORDER: VTYPE_STRING,
583
  HV_KVM_FLOPPY_IMAGE_PATH: VTYPE_STRING,
584
  HV_CDROM_IMAGE_PATH: VTYPE_STRING,
585
  HV_KVM_CDROM2_IMAGE_PATH: VTYPE_STRING,
586
  HV_NIC_TYPE: VTYPE_STRING,
587
  HV_DISK_TYPE: VTYPE_STRING,
588
  HV_KVM_CDROM_DISK_TYPE: VTYPE_STRING,
589
  HV_VNC_PASSWORD_FILE: VTYPE_STRING,
590
  HV_VNC_BIND_ADDRESS: VTYPE_STRING,
591
  HV_VNC_TLS: VTYPE_BOOL,
592
  HV_VNC_X509: VTYPE_STRING,
593
  HV_VNC_X509_VERIFY: VTYPE_BOOL,
594
  HV_KVM_SPICE_BIND: VTYPE_STRING,
595
  HV_KVM_SPICE_IP_VERSION: VTYPE_INT,
596
  HV_KVM_SPICE_PASSWORD_FILE: VTYPE_STRING,
597
  HV_KVM_SPICE_LOSSLESS_IMG_COMPR: VTYPE_STRING,
598
  HV_KVM_SPICE_JPEG_IMG_COMPR: VTYPE_STRING,
599
  HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: VTYPE_STRING,
600
  HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: VTYPE_STRING,
601
  HV_KVM_SPICE_AUDIO_COMPR: VTYPE_BOOL,
602
  HV_KVM_SPICE_USE_TLS: VTYPE_BOOL,
603
  HV_KVM_SPICE_TLS_CIPHERS: VTYPE_STRING,
604
  HV_KVM_SPICE_USE_VDAGENT: VTYPE_BOOL,
605
  HV_ACPI: VTYPE_BOOL,
606
  HV_PAE: VTYPE_BOOL,
607
  HV_USE_BOOTLOADER: VTYPE_BOOL,
608
  HV_BOOTLOADER_PATH: VTYPE_STRING,
609
  HV_BOOTLOADER_ARGS: VTYPE_STRING,
610
  HV_KERNEL_PATH: VTYPE_STRING,
611
  HV_KERNEL_ARGS: VTYPE_STRING,
612
  HV_INITRD_PATH: VTYPE_STRING,
613
  HV_ROOT_PATH: VTYPE_MAYBE_STRING,
614
  HV_SERIAL_CONSOLE: VTYPE_BOOL,
615
  HV_SERIAL_SPEED: VTYPE_INT,
616
  HV_USB_MOUSE: VTYPE_STRING,
617
  HV_KEYMAP: VTYPE_STRING,
618
  HV_DEVICE_MODEL: VTYPE_STRING,
619
  HV_INIT_SCRIPT: VTYPE_STRING,
620
  HV_MIGRATION_PORT: VTYPE_INT,
621
  HV_MIGRATION_BANDWIDTH: VTYPE_INT,
622
  HV_MIGRATION_DOWNTIME: VTYPE_INT,
623
  HV_MIGRATION_MODE: VTYPE_STRING,
624
  HV_USE_LOCALTIME: VTYPE_BOOL,
625
  HV_DISK_CACHE: VTYPE_STRING,
626
  HV_SECURITY_MODEL: VTYPE_STRING,
627
  HV_SECURITY_DOMAIN: VTYPE_STRING,
628
  HV_KVM_FLAG: VTYPE_STRING,
629
  HV_VHOST_NET: VTYPE_BOOL,
630
  HV_KVM_USE_CHROOT: VTYPE_BOOL,
631
  HV_CPU_MASK: VTYPE_STRING,
632
  HV_MEM_PATH: VTYPE_STRING,
633
  HV_PASSTHROUGH: VTYPE_STRING,
634
  HV_BLOCKDEV_PREFIX: VTYPE_STRING,
635
  HV_REBOOT_BEHAVIOR: VTYPE_STRING,
636
  HV_CPU_TYPE: VTYPE_STRING,
637
  HV_CPU_CAP: VTYPE_INT,
638
  HV_CPU_WEIGHT: VTYPE_INT,
639
  HV_CPU_CORES: VTYPE_INT,
640
  HV_CPU_THREADS: VTYPE_INT,
641
  HV_CPU_SOCKETS: VTYPE_INT,
642
  HV_SOUNDHW: VTYPE_STRING,
643
  HV_USB_DEVICES: VTYPE_STRING,
644
  HV_VGA: VTYPE_STRING,
645
  HV_KVM_EXTRA: VTYPE_STRING,
646
  HV_KVM_MACHINE_VERSION: VTYPE_STRING,
647
  HV_VIF_TYPE: VTYPE_STRING,
648
  HV_VIF_SCRIPT: VTYPE_STRING,
649
  HV_XEN_CMD: VTYPE_STRING,
650
  HV_XEN_CPUID: VTYPE_STRING,
651
  HV_VNET_HDR: VTYPE_BOOL,
652
  HV_VIRIDIAN: VTYPE_BOOL,
653
  }
654

    
655
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
656

    
657
HVS_PARAMETER_TITLES = _constants.HVS_PARAMETER_TITLES
658

    
659
HV_MIGRATION_COMPLETED = _constants.HV_MIGRATION_COMPLETED
660
HV_MIGRATION_ACTIVE = _constants.HV_MIGRATION_ACTIVE
661
HV_MIGRATION_FAILED = _constants.HV_MIGRATION_FAILED
662
HV_MIGRATION_CANCELLED = _constants.HV_MIGRATION_CANCELLED
663
HV_MIGRATION_VALID_STATUSES = _constants.HV_MIGRATION_VALID_STATUSES
664
HV_MIGRATION_FAILED_STATUSES = _constants.HV_MIGRATION_FAILED_STATUSES
665
HV_KVM_MIGRATION_VALID_STATUSES = _constants.HV_KVM_MIGRATION_VALID_STATUSES
666

    
667
HV_NODEINFO_KEY_VERSION = _constants.HV_NODEINFO_KEY_VERSION
668

    
669
HVST_MEMORY_TOTAL = _constants.HVST_MEMORY_TOTAL
670
HVST_MEMORY_NODE = _constants.HVST_MEMORY_NODE
671
HVST_MEMORY_HV = _constants.HVST_MEMORY_HV
672
HVST_CPU_TOTAL = _constants.HVST_CPU_TOTAL
673
HVST_CPU_NODE = _constants.HVST_CPU_NODE
674
HVSTS_PARAMETERS = _constants.HVSTS_PARAMETERS
675
HVST_DEFAULTS = _constants.HVST_DEFAULTS
676
HVSTS_PARAMETER_TYPES = _constants.HVSTS_PARAMETER_TYPES
677

    
678
DS_DISK_TOTAL = _constants.DS_DISK_TOTAL
679
DS_DISK_RESERVED = _constants.DS_DISK_RESERVED
680
DS_DISK_OVERHEAD = _constants.DS_DISK_OVERHEAD
681
DS_DEFAULTS = _constants.DS_DEFAULTS
682
DSS_PARAMETER_TYPES = _constants.DSS_PARAMETER_TYPES
683
DSS_PARAMETERS = _constants.DSS_PARAMETERS
684
DS_VALID_TYPES = _constants.DS_VALID_TYPES
685

    
686
BE_MEMORY = _constants.BE_MEMORY
687
BE_MAXMEM = _constants.BE_MAXMEM
688
BE_MINMEM = _constants.BE_MINMEM
689
BE_VCPUS = _constants.BE_VCPUS
690
BE_AUTO_BALANCE = _constants.BE_AUTO_BALANCE
691
BE_ALWAYS_FAILOVER = _constants.BE_ALWAYS_FAILOVER
692
BE_SPINDLE_USE = _constants.BE_SPINDLE_USE
693
BES_PARAMETER_TYPES = _constants.BES_PARAMETER_TYPES
694
BES_PARAMETER_TITLES = _constants.BES_PARAMETER_TITLES
695
BES_PARAMETER_COMPAT = _constants.BES_PARAMETER_COMPAT
696
BES_PARAMETERS = _constants.BES_PARAMETERS
697

    
698
ISPEC_MEM_SIZE = _constants.ISPEC_MEM_SIZE
699
ISPEC_CPU_COUNT = _constants.ISPEC_CPU_COUNT
700
ISPEC_DISK_COUNT = _constants.ISPEC_DISK_COUNT
701
ISPEC_DISK_SIZE = _constants.ISPEC_DISK_SIZE
702
ISPEC_NIC_COUNT = _constants.ISPEC_NIC_COUNT
703
ISPEC_SPINDLE_USE = _constants.ISPEC_SPINDLE_USE
704
ISPECS_PARAMETER_TYPES = _constants.ISPECS_PARAMETER_TYPES
705
ISPECS_PARAMETERS = _constants.ISPECS_PARAMETERS
706

    
707
ISPECS_MINMAX = _constants.ISPECS_MINMAX
708
ISPECS_MIN = _constants.ISPECS_MIN
709
ISPECS_MAX = _constants.ISPECS_MAX
710
ISPECS_STD = _constants.ISPECS_STD
711
IPOLICY_DTS = _constants.IPOLICY_DTS
712
IPOLICY_VCPU_RATIO = _constants.IPOLICY_VCPU_RATIO
713
IPOLICY_SPINDLE_RATIO = _constants.IPOLICY_SPINDLE_RATIO
714
ISPECS_MINMAX_KEYS = _constants.ISPECS_MINMAX_KEYS
715
IPOLICY_PARAMETERS = _constants.IPOLICY_PARAMETERS
716
IPOLICY_ALL_KEYS = _constants.IPOLICY_ALL_KEYS
717

    
718
ND_OOB_PROGRAM = _constants.ND_OOB_PROGRAM
719
ND_SPINDLE_COUNT = _constants.ND_SPINDLE_COUNT
720
ND_EXCLUSIVE_STORAGE = _constants.ND_EXCLUSIVE_STORAGE
721
ND_OVS = _constants.ND_OVS
722
ND_OVS_NAME = _constants.ND_OVS_NAME
723
ND_OVS_LINK = _constants.ND_OVS_LINK
724

    
725
NDS_PARAMETER_TYPES = _constants.NDS_PARAMETER_TYPES
726
NDS_PARAMETERS = _constants.NDS_PARAMETERS
727
NDS_PARAMETER_TITLES = _constants.NDS_PARAMETER_TITLES
728

    
729
LDP_RESYNC_RATE = _constants.LDP_RESYNC_RATE
730
LDP_STRIPES = _constants.LDP_STRIPES
731
LDP_BARRIERS = _constants.LDP_BARRIERS
732
LDP_NO_META_FLUSH = _constants.LDP_NO_META_FLUSH
733
LDP_DEFAULT_METAVG = _constants.LDP_DEFAULT_METAVG
734
LDP_DISK_CUSTOM = _constants.LDP_DISK_CUSTOM
735
LDP_NET_CUSTOM = _constants.LDP_NET_CUSTOM
736
LDP_PROTOCOL = _constants.LDP_PROTOCOL
737
LDP_DYNAMIC_RESYNC = _constants.LDP_DYNAMIC_RESYNC
738
LDP_PLAN_AHEAD = _constants.LDP_PLAN_AHEAD
739
LDP_FILL_TARGET = _constants.LDP_FILL_TARGET
740
LDP_DELAY_TARGET = _constants.LDP_DELAY_TARGET
741
LDP_MAX_RATE = _constants.LDP_MAX_RATE
742
LDP_MIN_RATE = _constants.LDP_MIN_RATE
743
LDP_POOL = _constants.LDP_POOL
744
LDP_ACCESS = _constants.LDP_ACCESS
745
DISK_LD_TYPES = _constants.DISK_LD_TYPES
746
DISK_LD_PARAMETERS = _constants.DISK_LD_PARAMETERS
747

    
748
DRBD_RESYNC_RATE = _constants.DRBD_RESYNC_RATE
749
DRBD_DATA_STRIPES = _constants.DRBD_DATA_STRIPES
750
DRBD_META_STRIPES = _constants.DRBD_META_STRIPES
751
DRBD_DISK_BARRIERS = _constants.DRBD_DISK_BARRIERS
752
DRBD_META_BARRIERS = _constants.DRBD_META_BARRIERS
753
DRBD_DEFAULT_METAVG = _constants.DRBD_DEFAULT_METAVG
754
DRBD_DISK_CUSTOM = _constants.DRBD_DISK_CUSTOM
755
DRBD_NET_CUSTOM = _constants.DRBD_NET_CUSTOM
756
DRBD_PROTOCOL = _constants.DRBD_PROTOCOL
757
DRBD_DYNAMIC_RESYNC = _constants.DRBD_DYNAMIC_RESYNC
758
DRBD_PLAN_AHEAD = _constants.DRBD_PLAN_AHEAD
759
DRBD_FILL_TARGET = _constants.DRBD_FILL_TARGET
760
DRBD_DELAY_TARGET = _constants.DRBD_DELAY_TARGET
761
DRBD_MAX_RATE = _constants.DRBD_MAX_RATE
762
DRBD_MIN_RATE = _constants.DRBD_MIN_RATE
763
LV_STRIPES = _constants.LV_STRIPES
764
RBD_ACCESS = _constants.RBD_ACCESS
765
RBD_POOL = _constants.RBD_POOL
766
DISK_DT_TYPES = _constants.DISK_DT_TYPES
767
DISK_DT_PARAMETERS = _constants.DISK_DT_PARAMETERS
768

    
769
DDP_LOCAL_IP = _constants.DDP_LOCAL_IP
770
DDP_REMOTE_IP = _constants.DDP_REMOTE_IP
771
DDP_PORT = _constants.DDP_PORT
772
DDP_LOCAL_MINOR = _constants.DDP_LOCAL_MINOR
773
DDP_REMOTE_MINOR = _constants.DDP_REMOTE_MINOR
774

    
775
OOB_POWER_ON = _constants.OOB_POWER_ON
776
OOB_POWER_OFF = _constants.OOB_POWER_OFF
777
OOB_POWER_CYCLE = _constants.OOB_POWER_CYCLE
778
OOB_POWER_STATUS = _constants.OOB_POWER_STATUS
779
OOB_HEALTH = _constants.OOB_HEALTH
780
OOB_COMMANDS = _constants.OOB_COMMANDS
781

    
782
OOB_POWER_STATUS_POWERED = _constants.OOB_POWER_STATUS_POWERED
783

    
784
OOB_TIMEOUT = _constants.OOB_TIMEOUT
785
OOB_POWER_DELAY = _constants.OOB_POWER_DELAY
786

    
787
OOB_STATUS_OK = _constants.OOB_STATUS_OK
788
OOB_STATUS_WARNING = _constants.OOB_STATUS_WARNING
789
OOB_STATUS_CRITICAL = _constants.OOB_STATUS_CRITICAL
790
OOB_STATUS_UNKNOWN = _constants.OOB_STATUS_UNKNOWN
791
OOB_STATUSES = _constants.OOB_STATUSES
792

    
793
PP_DEFAULT = _constants.PP_DEFAULT
794

    
795
NIC_MODE = _constants.NIC_MODE
796
NIC_LINK = _constants.NIC_LINK
797
NIC_VLAN = _constants.NIC_VLAN
798
NICS_PARAMETER_TYPES = _constants.NICS_PARAMETER_TYPES
799
NICS_PARAMETERS = _constants.NICS_PARAMETERS
800

    
801
NIC_MODE_BRIDGED = _constants.NIC_MODE_BRIDGED
802
NIC_MODE_ROUTED = _constants.NIC_MODE_ROUTED
803
NIC_MODE_OVS = _constants.NIC_MODE_OVS
804
NIC_IP_POOL = _constants.NIC_IP_POOL
805
NIC_VALID_MODES = _constants.NIC_VALID_MODES
806

    
807
RESERVE_ACTION = _constants.RESERVE_ACTION
808
RELEASE_ACTION = _constants.RELEASE_ACTION
809

    
810
IDISK_SIZE = _constants.IDISK_SIZE
811
IDISK_SPINDLES = _constants.IDISK_SPINDLES
812
IDISK_MODE = _constants.IDISK_MODE
813
IDISK_ADOPT = _constants.IDISK_ADOPT
814
IDISK_VG = _constants.IDISK_VG
815
IDISK_METAVG = _constants.IDISK_METAVG
816
IDISK_PROVIDER = _constants.IDISK_PROVIDER
817
IDISK_NAME = _constants.IDISK_NAME
818
IDISK_PARAMS_TYPES = _constants.IDISK_PARAMS_TYPES
819
IDISK_PARAMS = _constants.IDISK_PARAMS
820

    
821
INIC_MAC = _constants.INIC_MAC
822
INIC_IP = _constants.INIC_IP
823
INIC_MODE = _constants.INIC_MODE
824
INIC_LINK = _constants.INIC_LINK
825
INIC_NETWORK = _constants.INIC_NETWORK
826
INIC_NAME = _constants.INIC_NAME
827
INIC_VLAN = _constants.INIC_VLAN
828
INIC_BRIDGE = _constants.INIC_BRIDGE
829
INIC_PARAMS_TYPES = _constants.INIC_PARAMS_TYPES
830
INIC_PARAMS = _constants.INIC_PARAMS
831

    
832
HT_XEN_PVM = _constants.HT_XEN_PVM
833
HT_FAKE = _constants.HT_FAKE
834
HT_XEN_HVM = _constants.HT_XEN_HVM
835
HT_KVM = _constants.HT_KVM
836
HT_CHROOT = _constants.HT_CHROOT
837
HT_LXC = _constants.HT_LXC
838
HYPER_TYPES = _constants.HYPER_TYPES
839
HTS_REQ_PORT = _constants.HTS_REQ_PORT
840

    
841
VNC_BASE_PORT = _constants.VNC_BASE_PORT
842
VNC_DEFAULT_BIND_ADDRESS = _constants.VNC_DEFAULT_BIND_ADDRESS
843

    
844
HT_NIC_RTL8139 = _constants.HT_NIC_RTL8139
845
HT_NIC_NE2K_PCI = _constants.HT_NIC_NE2K_PCI
846
HT_NIC_NE2K_ISA = _constants.HT_NIC_NE2K_ISA
847
HT_NIC_I82551 = _constants.HT_NIC_I82551
848
HT_NIC_I85557B = _constants.HT_NIC_I85557B
849
HT_NIC_I8259ER = _constants.HT_NIC_I8259ER
850
HT_NIC_PCNET = _constants.HT_NIC_PCNET
851
HT_NIC_E1000 = _constants.HT_NIC_E1000
852
HT_NIC_PARAVIRTUAL = _constants.HT_NIC_PARAVIRTUAL
853
HT_HVM_VALID_NIC_TYPES = _constants.HT_HVM_VALID_NIC_TYPES
854
HT_KVM_VALID_NIC_TYPES = _constants.HT_KVM_VALID_NIC_TYPES
855

    
856
HT_HVM_VIF_IOEMU = _constants.HT_HVM_VIF_IOEMU
857
HT_HVM_VIF_VIF = _constants.HT_HVM_VIF_VIF
858
HT_HVM_VALID_VIF_TYPES = _constants.HT_HVM_VALID_VIF_TYPES
859

    
860
HT_DISK_IOEMU = _constants.HT_DISK_IOEMU
861
HT_DISK_IDE = _constants.HT_DISK_IDE
862
HT_DISK_SCSI = _constants.HT_DISK_SCSI
863
HT_DISK_SD = _constants.HT_DISK_SD
864
HT_DISK_MTD = _constants.HT_DISK_MTD
865
HT_DISK_PFLASH = _constants.HT_DISK_PFLASH
866
HT_DISK_PARAVIRTUAL = _constants.HT_DISK_PARAVIRTUAL
867
HT_HVM_VALID_DISK_TYPES = _constants.HT_HVM_VALID_DISK_TYPES
868
HT_KVM_VALID_DISK_TYPES = _constants.HT_KVM_VALID_DISK_TYPES
869

    
870
HT_CACHE_DEFAULT = _constants.HT_CACHE_DEFAULT
871
HT_CACHE_NONE = _constants.HT_CACHE_NONE
872
HT_CACHE_WTHROUGH = _constants.HT_CACHE_WTHROUGH
873
HT_CACHE_WBACK = _constants.HT_CACHE_WBACK
874
HT_VALID_CACHE_TYPES = _constants.HT_VALID_CACHE_TYPES
875

    
876
HT_MOUSE_MOUSE = _constants.HT_MOUSE_MOUSE
877
HT_MOUSE_TABLET = _constants.HT_MOUSE_TABLET
878
HT_KVM_VALID_MOUSE_TYPES = _constants.HT_KVM_VALID_MOUSE_TYPES
879

    
880
HT_BO_FLOPPY = _constants.HT_BO_FLOPPY
881
HT_BO_CDROM = _constants.HT_BO_CDROM
882
HT_BO_DISK = _constants.HT_BO_DISK
883
HT_BO_NETWORK = _constants.HT_BO_NETWORK
884
HT_KVM_VALID_BO_TYPES = _constants.HT_KVM_VALID_BO_TYPES
885

    
886
HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ = \
887
  _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ
888
HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ = \
889
  _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ
890
HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC = \
891
  _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC
892
HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ = \
893
  _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ
894
HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ = \
895
  _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ
896
HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF = \
897
  _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF
898
HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS = \
899
  _constants.HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS
900

    
901
HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO = _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO
902
HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER = \
903
  _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER
904
HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS = \
905
  _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS
906

    
907
HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS = \
908
  _constants.HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS
909

    
910
HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF = \
911
  _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF
912
HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL = \
913
  _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL
914
HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER = \
915
  _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER
916
HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS = \
917
  _constants.HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS
918

    
919
HT_SM_NONE = _constants.HT_SM_NONE
920
HT_SM_USER = _constants.HT_SM_USER
921
HT_SM_POOL = _constants.HT_SM_POOL
922
HT_KVM_VALID_SM_TYPES = _constants.HT_KVM_VALID_SM_TYPES
923

    
924
HT_KVM_ENABLED = _constants.HT_KVM_ENABLED
925
HT_KVM_DISABLED = _constants.HT_KVM_DISABLED
926
HT_KVM_FLAG_VALUES = _constants.HT_KVM_FLAG_VALUES
927

    
928
HT_MIGRATION_LIVE = _constants.HT_MIGRATION_LIVE
929
HT_MIGRATION_NONLIVE = _constants.HT_MIGRATION_NONLIVE
930
HT_MIGRATION_MODES = _constants.HT_MIGRATION_MODES
931

    
932
VERIFY_NPLUSONE_MEM = _constants.VERIFY_NPLUSONE_MEM
933
VERIFY_OPTIONAL_CHECKS = _constants.VERIFY_OPTIONAL_CHECKS
934

    
935
CV_TCLUSTER = _constants.CV_TCLUSTER
936
CV_TGROUP = _constants.CV_TGROUP
937
CV_TNODE = _constants.CV_TNODE
938
CV_TINSTANCE = _constants.CV_TINSTANCE
939

    
940
CV_ECLUSTERCFG = _constants.CV_ECLUSTERCFG
941
CV_ECLUSTERCERT = _constants.CV_ECLUSTERCERT
942
CV_ECLUSTERFILECHECK = _constants.CV_ECLUSTERFILECHECK
943
CV_ECLUSTERDANGLINGNODES = _constants.CV_ECLUSTERDANGLINGNODES
944
CV_ECLUSTERDANGLINGINST = _constants.CV_ECLUSTERDANGLINGINST
945
CV_EGROUPDIFFERENTPVSIZE = _constants.CV_EGROUPDIFFERENTPVSIZE
946
CV_EINSTANCEBADNODE = _constants.CV_EINSTANCEBADNODE
947
CV_EINSTANCEDOWN = _constants.CV_EINSTANCEDOWN
948
CV_EINSTANCELAYOUT = _constants.CV_EINSTANCELAYOUT
949
CV_EINSTANCEMISSINGDISK = _constants.CV_EINSTANCEMISSINGDISK
950
CV_EINSTANCEFAULTYDISK = _constants.CV_EINSTANCEFAULTYDISK
951
CV_EINSTANCEWRONGNODE = _constants.CV_EINSTANCEWRONGNODE
952
CV_EINSTANCESPLITGROUPS = _constants.CV_EINSTANCESPLITGROUPS
953
CV_EINSTANCEPOLICY = _constants.CV_EINSTANCEPOLICY
954
CV_EINSTANCEUNSUITABLENODE = _constants.CV_EINSTANCEUNSUITABLENODE
955
CV_EINSTANCEMISSINGCFGPARAMETER = _constants.CV_EINSTANCEMISSINGCFGPARAMETER
956
CV_ENODEDRBD = _constants.CV_ENODEDRBD
957
CV_ENODEDRBDVERSION = _constants.CV_ENODEDRBDVERSION
958
CV_ENODEDRBDHELPER = _constants.CV_ENODEDRBDHELPER
959
CV_ENODEFILECHECK = _constants.CV_ENODEFILECHECK
960
CV_ENODEHOOKS = _constants.CV_ENODEHOOKS
961
CV_ENODEHV = _constants.CV_ENODEHV
962
CV_ENODELVM = _constants.CV_ENODELVM
963
CV_ENODEN1 = _constants.CV_ENODEN1
964
CV_ENODENET = _constants.CV_ENODENET
965
CV_ENODEOS = _constants.CV_ENODEOS
966
CV_ENODEORPHANINSTANCE = _constants.CV_ENODEORPHANINSTANCE
967
CV_ENODEORPHANLV = _constants.CV_ENODEORPHANLV
968
CV_ENODERPC = _constants.CV_ENODERPC
969
CV_ENODESSH = _constants.CV_ENODESSH
970
CV_ENODEVERSION = _constants.CV_ENODEVERSION
971
CV_ENODESETUP = _constants.CV_ENODESETUP
972
CV_ENODETIME = _constants.CV_ENODETIME
973
CV_ENODEOOBPATH = _constants.CV_ENODEOOBPATH
974
CV_ENODEUSERSCRIPTS = _constants.CV_ENODEUSERSCRIPTS
975
CV_ENODEFILESTORAGEPATHS = _constants.CV_ENODEFILESTORAGEPATHS
976
CV_ENODEFILESTORAGEPATHUNUSABLE = _constants.CV_ENODEFILESTORAGEPATHUNUSABLE
977
CV_ENODESHAREDFILESTORAGEPATHUNUSABLE = \
978
  _constants.CV_ENODESHAREDFILESTORAGEPATHUNUSABLE
979

    
980
CV_ALL_ECODES = _constants.CV_ALL_ECODES
981
CV_ALL_ECODES_STRINGS = _constants.CV_ALL_ECODES_STRINGS
982

    
983
NV_BRIDGES = _constants.NV_BRIDGES
984
NV_DRBDHELPER = _constants.NV_DRBDHELPER
985
NV_DRBDVERSION = _constants.NV_DRBDVERSION
986
NV_DRBDLIST = _constants.NV_DRBDLIST
987
NV_EXCLUSIVEPVS = _constants.NV_EXCLUSIVEPVS
988
NV_FILELIST = _constants.NV_FILELIST
989
NV_ACCEPTED_STORAGE_PATHS = _constants.NV_ACCEPTED_STORAGE_PATHS
990
NV_FILE_STORAGE_PATH = _constants.NV_FILE_STORAGE_PATH
991
NV_SHARED_FILE_STORAGE_PATH = _constants.NV_SHARED_FILE_STORAGE_PATH
992
NV_HVINFO = _constants.NV_HVINFO
993
NV_HVPARAMS = _constants.NV_HVPARAMS
994
NV_HYPERVISOR = _constants.NV_HYPERVISOR
995
NV_INSTANCELIST = _constants.NV_INSTANCELIST
996
NV_LVLIST = _constants.NV_LVLIST
997
NV_MASTERIP = _constants.NV_MASTERIP
998
NV_NODELIST = _constants.NV_NODELIST
999
NV_NODENETTEST = _constants.NV_NODENETTEST
1000
NV_NODESETUP = _constants.NV_NODESETUP
1001
NV_OOB_PATHS = _constants.NV_OOB_PATHS
1002
NV_OSLIST = _constants.NV_OSLIST
1003
NV_PVLIST = _constants.NV_PVLIST
1004
NV_TIME = _constants.NV_TIME
1005
NV_USERSCRIPTS = _constants.NV_USERSCRIPTS
1006
NV_VERSION = _constants.NV_VERSION
1007
NV_VGLIST = _constants.NV_VGLIST
1008
NV_VMNODES = _constants.NV_VMNODES
1009

    
1010
INSTST_RUNNING = _constants.INSTST_RUNNING
1011
INSTST_ADMINDOWN = _constants.INSTST_ADMINDOWN
1012
INSTST_ADMINOFFLINE = _constants.INSTST_ADMINOFFLINE
1013
INSTST_NODEOFFLINE = _constants.INSTST_NODEOFFLINE
1014
INSTST_NODEDOWN = _constants.INSTST_NODEDOWN
1015
INSTST_WRONGNODE = _constants.INSTST_WRONGNODE
1016
INSTST_ERRORUP = _constants.INSTST_ERRORUP
1017
INSTST_ERRORDOWN = _constants.INSTST_ERRORDOWN
1018
INSTST_ALL = _constants.INSTST_ALL
1019

    
1020
ADMINST_UP = _constants.ADMINST_UP
1021
ADMINST_DOWN = _constants.ADMINST_DOWN
1022
ADMINST_OFFLINE = _constants.ADMINST_OFFLINE
1023
ADMINST_ALL = _constants.ADMINST_ALL
1024

    
1025
NR_REGULAR = _constants.NR_REGULAR
1026
NR_MASTER = _constants.NR_MASTER
1027
NR_MCANDIDATE = _constants.NR_MCANDIDATE
1028
NR_DRAINED = _constants.NR_DRAINED
1029
NR_OFFLINE = _constants.NR_OFFLINE
1030
NR_ALL = _constants.NR_ALL
1031

    
1032
SSL_CERT_EXPIRATION_WARN = _constants.SSL_CERT_EXPIRATION_WARN
1033
SSL_CERT_EXPIRATION_ERROR = _constants.SSL_CERT_EXPIRATION_ERROR
1034

    
1035
IALLOCATOR_VERSION = _constants.IALLOCATOR_VERSION
1036
IALLOCATOR_DIR_IN = _constants.IALLOCATOR_DIR_IN
1037
IALLOCATOR_DIR_OUT = _constants.IALLOCATOR_DIR_OUT
1038
VALID_IALLOCATOR_DIRECTIONS = _constants.VALID_IALLOCATOR_DIRECTIONS
1039

    
1040
IALLOCATOR_MODE_ALLOC = _constants.IALLOCATOR_MODE_ALLOC
1041
IALLOCATOR_MODE_RELOC = _constants.IALLOCATOR_MODE_RELOC
1042
IALLOCATOR_MODE_CHG_GROUP = _constants.IALLOCATOR_MODE_CHG_GROUP
1043
IALLOCATOR_MODE_NODE_EVAC = _constants.IALLOCATOR_MODE_NODE_EVAC
1044
IALLOCATOR_MODE_MULTI_ALLOC = _constants.IALLOCATOR_MODE_MULTI_ALLOC
1045
VALID_IALLOCATOR_MODES = _constants.VALID_IALLOCATOR_MODES
1046

    
1047
IALLOCATOR_SEARCH_PATH = _constants.IALLOCATOR_SEARCH_PATH
1048
DEFAULT_IALLOCATOR_SHORTCUT = _constants.DEFAULT_IALLOCATOR_SHORTCUT
1049

    
1050
NODE_EVAC_PRI = _constants.NODE_EVAC_PRI
1051
NODE_EVAC_SEC = _constants.NODE_EVAC_SEC
1052
NODE_EVAC_ALL = _constants.NODE_EVAC_ALL
1053
NODE_EVAC_MODES = _constants.NODE_EVAC_MODES
1054

    
1055
JOB_QUEUE_VERSION = _constants.JOB_QUEUE_VERSION
1056
JOB_QUEUE_SIZE_HARD_LIMIT = _constants.JOB_QUEUE_SIZE_HARD_LIMIT
1057
JOB_QUEUE_FILES_PERMS = _constants.JOB_QUEUE_FILES_PERMS
1058

    
1059
JOB_ID_TEMPLATE = r"\d+"
1060
JOB_FILE_RE = re.compile(r"^job-(%s)$" % JOB_ID_TEMPLATE)
1061

    
1062
JOB_NOTCHANGED = _constants.JOB_NOTCHANGED
1063

    
1064
JOB_STATUS_QUEUED = _constants.JOB_STATUS_QUEUED
1065
JOB_STATUS_WAITING = _constants.JOB_STATUS_WAITING
1066
JOB_STATUS_CANCELING = _constants.JOB_STATUS_CANCELING
1067
JOB_STATUS_RUNNING = _constants.JOB_STATUS_RUNNING
1068
JOB_STATUS_CANCELED = _constants.JOB_STATUS_CANCELED
1069
JOB_STATUS_SUCCESS = _constants.JOB_STATUS_SUCCESS
1070
JOB_STATUS_ERROR = _constants.JOB_STATUS_ERROR
1071
JOBS_PENDING = _constants.JOBS_PENDING
1072
JOBS_FINALIZED = _constants.JOBS_FINALIZED
1073
JOB_STATUS_ALL = _constants.JOB_STATUS_ALL
1074

    
1075
OP_STATUS_QUEUED = _constants.OP_STATUS_QUEUED
1076
OP_STATUS_WAITING = _constants.OP_STATUS_WAITING
1077
OP_STATUS_CANCELING = _constants.OP_STATUS_CANCELING
1078
OP_STATUS_RUNNING = _constants.OP_STATUS_RUNNING
1079
OP_STATUS_CANCELED = _constants.OP_STATUS_CANCELED
1080
OP_STATUS_SUCCESS = _constants.OP_STATUS_SUCCESS
1081
OP_STATUS_ERROR = _constants.OP_STATUS_ERROR
1082
OPS_FINALIZED = _constants.OPS_FINALIZED
1083

    
1084
OP_PRIO_LOWEST = _constants.OP_PRIO_LOWEST
1085
OP_PRIO_HIGHEST = _constants.OP_PRIO_HIGHEST
1086
OP_PRIO_LOW = _constants.OP_PRIO_LOW
1087
OP_PRIO_NORMAL = _constants.OP_PRIO_NORMAL
1088
OP_PRIO_HIGH = _constants.OP_PRIO_HIGH
1089
OP_PRIO_SUBMIT_VALID = _constants.OP_PRIO_SUBMIT_VALID
1090
OP_PRIO_DEFAULT = _constants.OP_PRIO_DEFAULT
1091

    
1092
LOCKS_REPLACE = _constants.LOCKS_REPLACE
1093
LOCKS_APPEND = _constants.LOCKS_APPEND
1094

    
1095
LOCK_ATTEMPTS_TIMEOUT = _constants.LOCK_ATTEMPTS_TIMEOUT
1096
LOCK_ATTEMPTS_MAXWAIT = _constants.LOCK_ATTEMPTS_MAXWAIT
1097
LOCK_ATTEMPTS_MINWAIT = _constants.LOCK_ATTEMPTS_MINWAIT
1098

    
1099
ELOG_MESSAGE = _constants.ELOG_MESSAGE
1100
ELOG_REMOTE_IMPORT = _constants.ELOG_REMOTE_IMPORT
1101
ELOG_JQUEUE_TEST = _constants.ELOG_JQUEUE_TEST
1102

    
1103
ETC_HOSTS_ADD = _constants.ETC_HOSTS_ADD
1104
ETC_HOSTS_REMOVE = _constants.ETC_HOSTS_REMOVE
1105

    
1106
JQT_MSGPREFIX = _constants.JQT_MSGPREFIX
1107
JQT_EXPANDNAMES = _constants.JQT_EXPANDNAMES
1108
JQT_EXEC = _constants.JQT_EXEC
1109
JQT_LOGMSG = _constants.JQT_LOGMSG
1110
JQT_STARTMSG = _constants.JQT_STARTMSG
1111
JQT_ALL = _constants.JQT_ALL
1112

    
1113
QR_CLUSTER = _constants.QR_CLUSTER
1114
QR_INSTANCE = _constants.QR_INSTANCE
1115
QR_NODE = _constants.QR_NODE
1116
QR_LOCK = _constants.QR_LOCK
1117
QR_GROUP = _constants.QR_GROUP
1118
QR_OS = _constants.QR_OS
1119
QR_JOB = _constants.QR_JOB
1120
QR_EXPORT = _constants.QR_EXPORT
1121
QR_NETWORK = _constants.QR_NETWORK
1122
QR_EXTSTORAGE = _constants.QR_EXTSTORAGE
1123
QR_VIA_OP = _constants.QR_VIA_OP
1124
QR_VIA_LUXI = _constants.QR_VIA_LUXI
1125
QR_VIA_RAPI = _constants.QR_VIA_RAPI
1126

    
1127
QFT_UNKNOWN = _constants.QFT_UNKNOWN
1128
QFT_TEXT = _constants.QFT_TEXT
1129
QFT_BOOL = _constants.QFT_BOOL
1130
QFT_NUMBER = _constants.QFT_NUMBER
1131
QFT_UNIT = _constants.QFT_UNIT
1132
QFT_TIMESTAMP = _constants.QFT_TIMESTAMP
1133
QFT_OTHER = _constants.QFT_OTHER
1134
QFT_ALL = _constants.QFT_ALL
1135

    
1136
RS_NORMAL = _constants.RS_NORMAL
1137
RS_UNKNOWN = _constants.RS_UNKNOWN
1138
RS_NODATA = _constants.RS_NODATA
1139
RS_UNAVAIL = _constants.RS_UNAVAIL
1140
RS_OFFLINE = _constants.RS_OFFLINE
1141
RS_ALL = _constants.RS_ALL
1142
RSS_DESCRIPTION = _constants.RSS_DESCRIPTION
1143

    
1144
MAX_NICS = _constants.MAX_NICS
1145
MAX_DISKS = _constants.MAX_DISKS
1146

    
1147
SSCONF_FILEPREFIX = _constants.SSCONF_FILEPREFIX
1148

    
1149
SS_CLUSTER_NAME = _constants.SS_CLUSTER_NAME
1150
SS_CLUSTER_TAGS = _constants.SS_CLUSTER_TAGS
1151
SS_FILE_STORAGE_DIR = _constants.SS_FILE_STORAGE_DIR
1152
SS_SHARED_FILE_STORAGE_DIR = _constants.SS_SHARED_FILE_STORAGE_DIR
1153
SS_MASTER_CANDIDATES = _constants.SS_MASTER_CANDIDATES
1154
SS_MASTER_CANDIDATES_IPS = _constants.SS_MASTER_CANDIDATES_IPS
1155
SS_MASTER_IP = _constants.SS_MASTER_IP
1156
SS_MASTER_NETDEV = _constants.SS_MASTER_NETDEV
1157
SS_MASTER_NETMASK = _constants.SS_MASTER_NETMASK
1158
SS_MASTER_NODE = _constants.SS_MASTER_NODE
1159
SS_NODE_LIST = _constants.SS_NODE_LIST
1160
SS_NODE_PRIMARY_IPS = _constants.SS_NODE_PRIMARY_IPS
1161
SS_NODE_SECONDARY_IPS = _constants.SS_NODE_SECONDARY_IPS
1162
SS_OFFLINE_NODES = _constants.SS_OFFLINE_NODES
1163
SS_ONLINE_NODES = _constants.SS_ONLINE_NODES
1164
SS_PRIMARY_IP_FAMILY = _constants.SS_PRIMARY_IP_FAMILY
1165
SS_INSTANCE_LIST = _constants.SS_INSTANCE_LIST
1166
SS_RELEASE_VERSION = _constants.SS_RELEASE_VERSION
1167
SS_HYPERVISOR_LIST = _constants.SS_HYPERVISOR_LIST
1168
SS_MAINTAIN_NODE_HEALTH = _constants.SS_MAINTAIN_NODE_HEALTH
1169
SS_UID_POOL = _constants.SS_UID_POOL
1170
SS_NODEGROUPS = _constants.SS_NODEGROUPS
1171
SS_NETWORKS = _constants.SS_NETWORKS
1172

    
1173
SS_HVPARAMS_PREF = _constants.SS_HVPARAMS_PREF
1174

    
1175
SS_HVPARAMS_XEN_PVM = _constants.SS_HVPARAMS_XEN_PVM
1176
SS_HVPARAMS_XEN_FAKE = _constants.SS_HVPARAMS_XEN_FAKE
1177
SS_HVPARAMS_XEN_HVM = _constants.SS_HVPARAMS_XEN_HVM
1178
SS_HVPARAMS_XEN_KVM = _constants.SS_HVPARAMS_XEN_KVM
1179
SS_HVPARAMS_XEN_CHROOT = _constants.SS_HVPARAMS_XEN_CHROOT
1180
SS_HVPARAMS_XEN_LXC = _constants.SS_HVPARAMS_XEN_LXC
1181
VALID_SS_HVPARAMS_KEYS = _constants.VALID_SS_HVPARAMS_KEYS
1182

    
1183
SS_FILE_PERMS = _constants.SS_FILE_PERMS
1184

    
1185
DEFAULT_ENABLED_HYPERVISOR = _constants.DEFAULT_ENABLED_HYPERVISOR
1186

    
1187
HVC_DEFAULTS = {
1188
  HT_XEN_PVM: {
1189
    HV_USE_BOOTLOADER: False,
1190
    HV_BOOTLOADER_PATH: XEN_BOOTLOADER,
1191
    HV_BOOTLOADER_ARGS: "",
1192
    HV_KERNEL_PATH: XEN_KERNEL,
1193
    HV_INITRD_PATH: "",
1194
    HV_ROOT_PATH: "/dev/xvda1",
1195
    HV_KERNEL_ARGS: "ro",
1196
    HV_MIGRATION_PORT: 8002,
1197
    HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1198
    HV_BLOCKDEV_PREFIX: "sd",
1199
    HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1200
    HV_CPU_MASK: CPU_PINNING_ALL,
1201
    HV_CPU_CAP: 0,
1202
    HV_CPU_WEIGHT: 256,
1203
    HV_VIF_SCRIPT: "",
1204
    HV_XEN_CMD: XEN_CMD_XM,
1205
    HV_XEN_CPUID: "",
1206
    HV_SOUNDHW: "",
1207
    },
1208
  HT_XEN_HVM: {
1209
    HV_BOOT_ORDER: "cd",
1210
    HV_CDROM_IMAGE_PATH: "",
1211
    HV_NIC_TYPE: HT_NIC_RTL8139,
1212
    HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
1213
    HV_VNC_BIND_ADDRESS: IP4_ADDRESS_ANY,
1214
    HV_VNC_PASSWORD_FILE: pathutils.VNC_PASSWORD_FILE,
1215
    HV_ACPI: True,
1216
    HV_PAE: True,
1217
    HV_KERNEL_PATH: "/usr/lib/xen/boot/hvmloader",
1218
    HV_DEVICE_MODEL: "/usr/lib/xen/bin/qemu-dm",
1219
    HV_MIGRATION_PORT: 8002,
1220
    HV_MIGRATION_MODE: HT_MIGRATION_NONLIVE,
1221
    HV_USE_LOCALTIME: False,
1222
    HV_BLOCKDEV_PREFIX: "hd",
1223
    HV_PASSTHROUGH: "",
1224
    HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1225
    HV_CPU_MASK: CPU_PINNING_ALL,
1226
    HV_CPU_CAP: 0,
1227
    HV_CPU_WEIGHT: 256,
1228
    HV_VIF_TYPE: HT_HVM_VIF_IOEMU,
1229
    HV_VIF_SCRIPT: "",
1230
    HV_VIRIDIAN: False,
1231
    HV_XEN_CMD: XEN_CMD_XM,
1232
    HV_XEN_CPUID: "",
1233
    HV_SOUNDHW: "",
1234
    },
1235
  HT_KVM: {
1236
    HV_KVM_PATH: KVM_PATH,
1237
    HV_KERNEL_PATH: KVM_KERNEL,
1238
    HV_INITRD_PATH: "",
1239
    HV_KERNEL_ARGS: "ro",
1240
    HV_ROOT_PATH: "/dev/vda1",
1241
    HV_ACPI: True,
1242
    HV_SERIAL_CONSOLE: True,
1243
    HV_SERIAL_SPEED: 38400,
1244
    HV_VNC_BIND_ADDRESS: "",
1245
    HV_VNC_TLS: False,
1246
    HV_VNC_X509: "",
1247
    HV_VNC_X509_VERIFY: False,
1248
    HV_VNC_PASSWORD_FILE: "",
1249
    HV_KVM_SPICE_BIND: "",
1250
    HV_KVM_SPICE_IP_VERSION: IFACE_NO_IP_VERSION_SPECIFIED,
1251
    HV_KVM_SPICE_PASSWORD_FILE: "",
1252
    HV_KVM_SPICE_LOSSLESS_IMG_COMPR: "",
1253
    HV_KVM_SPICE_JPEG_IMG_COMPR: "",
1254
    HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: "",
1255
    HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: "",
1256
    HV_KVM_SPICE_AUDIO_COMPR: True,
1257
    HV_KVM_SPICE_USE_TLS: False,
1258
    HV_KVM_SPICE_TLS_CIPHERS: OPENSSL_CIPHERS,
1259
    HV_KVM_SPICE_USE_VDAGENT: True,
1260
    HV_KVM_FLOPPY_IMAGE_PATH: "",
1261
    HV_CDROM_IMAGE_PATH: "",
1262
    HV_KVM_CDROM2_IMAGE_PATH: "",
1263
    HV_BOOT_ORDER: HT_BO_DISK,
1264
    HV_NIC_TYPE: HT_NIC_PARAVIRTUAL,
1265
    HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
1266
    HV_KVM_CDROM_DISK_TYPE: "",
1267
    HV_USB_MOUSE: "",
1268
    HV_KEYMAP: "",
1269
    HV_MIGRATION_PORT: 8102,
1270
    HV_MIGRATION_BANDWIDTH: 32, # MiB/s
1271
    HV_MIGRATION_DOWNTIME: 30,  # ms
1272
    HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1273
    HV_USE_LOCALTIME: False,
1274
    HV_DISK_CACHE: HT_CACHE_DEFAULT,
1275
    HV_SECURITY_MODEL: HT_SM_NONE,
1276
    HV_SECURITY_DOMAIN: "",
1277
    HV_KVM_FLAG: "",
1278
    HV_VHOST_NET: False,
1279
    HV_KVM_USE_CHROOT: False,
1280
    HV_MEM_PATH: "",
1281
    HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1282
    HV_CPU_MASK: CPU_PINNING_ALL,
1283
    HV_CPU_TYPE: "",
1284
    HV_CPU_CORES: 0,
1285
    HV_CPU_THREADS: 0,
1286
    HV_CPU_SOCKETS: 0,
1287
    HV_SOUNDHW: "",
1288
    HV_USB_DEVICES: "",
1289
    HV_VGA: "",
1290
    HV_KVM_EXTRA: "",
1291
    HV_KVM_MACHINE_VERSION: "",
1292
    HV_VNET_HDR: True,
1293
    },
1294
  HT_FAKE: {
1295
    HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1296
  },
1297
  HT_CHROOT: {
1298
    HV_INIT_SCRIPT: "/ganeti-chroot",
1299
    },
1300
  HT_LXC: {
1301
    HV_CPU_MASK: "",
1302
    },
1303
  }
1304

    
1305
HVC_GLOBALS = _constants.HVC_GLOBALS
1306

    
1307
BEC_DEFAULTS = {
1308
  BE_MINMEM: 128,
1309
  BE_MAXMEM: 128,
1310
  BE_VCPUS: 1,
1311
  BE_AUTO_BALANCE: True,
1312
  BE_ALWAYS_FAILOVER: False,
1313
  BE_SPINDLE_USE: 1,
1314
  }
1315

    
1316
NDC_DEFAULTS = {
1317
  ND_OOB_PROGRAM: "",
1318
  ND_SPINDLE_COUNT: 1,
1319
  ND_EXCLUSIVE_STORAGE: False,
1320
  ND_OVS: False,
1321
  ND_OVS_NAME: DEFAULT_OVS,
1322
  ND_OVS_LINK: ""
1323
  }
1324

    
1325
NDC_GLOBALS = _constants.NDC_GLOBALS
1326

    
1327
DISK_LD_DEFAULTS = {
1328
  DT_DRBD8: {
1329
    LDP_RESYNC_RATE: CLASSIC_DRBD_SYNC_SPEED,
1330
    LDP_BARRIERS: _constants.DRBD_BARRIERS,
1331
    LDP_NO_META_FLUSH: _constants.DRBD_NO_META_FLUSH,
1332
    LDP_DEFAULT_METAVG: DEFAULT_VG,
1333
    LDP_DISK_CUSTOM: "",
1334
    LDP_NET_CUSTOM: "",
1335
    LDP_PROTOCOL: DRBD_DEFAULT_NET_PROTOCOL,
1336
    LDP_DYNAMIC_RESYNC: False,
1337

    
1338
    # The default values for the DRBD dynamic resync speed algorithm
1339
    # are taken from the drbsetup 8.3.11 man page, except for
1340
    # c-plan-ahead (that we don't need to set to 0, because we have a
1341
    # separate option to enable it) and for c-max-rate, that we cap to
1342
    # the default value for the static resync rate.
1343
    LDP_PLAN_AHEAD: 20, # ds
1344
    LDP_FILL_TARGET: 0, # sectors
1345
    LDP_DELAY_TARGET: 1, # ds
1346
    LDP_MAX_RATE: CLASSIC_DRBD_SYNC_SPEED, # KiB/s
1347
    LDP_MIN_RATE: 4 * 1024, # KiB/s
1348
    },
1349
  DT_PLAIN: {
1350
    LDP_STRIPES: _constants.LVM_STRIPECOUNT
1351
    },
1352
  DT_FILE: {},
1353
  DT_SHARED_FILE: {},
1354
  DT_BLOCK: {},
1355
  DT_RBD: {
1356
    LDP_POOL: "rbd",
1357
    LDP_ACCESS: DISK_KERNELSPACE,
1358
    },
1359
  DT_EXT: {},
1360
  }
1361

    
1362
# readability shortcuts
1363
_LV_DEFAULTS = DISK_LD_DEFAULTS[DT_PLAIN]
1364
_DRBD_DEFAULTS = DISK_LD_DEFAULTS[DT_DRBD8]
1365

    
1366
DISK_DT_DEFAULTS = {
1367
  DT_PLAIN: {
1368
    LV_STRIPES: DISK_LD_DEFAULTS[DT_PLAIN][LDP_STRIPES],
1369
    },
1370
  DT_DRBD8: {
1371
    DRBD_RESYNC_RATE: _DRBD_DEFAULTS[LDP_RESYNC_RATE],
1372
    DRBD_DATA_STRIPES: _LV_DEFAULTS[LDP_STRIPES],
1373
    DRBD_META_STRIPES: _LV_DEFAULTS[LDP_STRIPES],
1374
    DRBD_DISK_BARRIERS: _DRBD_DEFAULTS[LDP_BARRIERS],
1375
    DRBD_META_BARRIERS: _DRBD_DEFAULTS[LDP_NO_META_FLUSH],
1376
    DRBD_DEFAULT_METAVG: _DRBD_DEFAULTS[LDP_DEFAULT_METAVG],
1377
    DRBD_DISK_CUSTOM: _DRBD_DEFAULTS[LDP_DISK_CUSTOM],
1378
    DRBD_NET_CUSTOM: _DRBD_DEFAULTS[LDP_NET_CUSTOM],
1379
    DRBD_PROTOCOL: _DRBD_DEFAULTS[LDP_PROTOCOL],
1380
    DRBD_DYNAMIC_RESYNC: _DRBD_DEFAULTS[LDP_DYNAMIC_RESYNC],
1381
    DRBD_PLAN_AHEAD: _DRBD_DEFAULTS[LDP_PLAN_AHEAD],
1382
    DRBD_FILL_TARGET: _DRBD_DEFAULTS[LDP_FILL_TARGET],
1383
    DRBD_DELAY_TARGET: _DRBD_DEFAULTS[LDP_DELAY_TARGET],
1384
    DRBD_MAX_RATE: _DRBD_DEFAULTS[LDP_MAX_RATE],
1385
    DRBD_MIN_RATE: _DRBD_DEFAULTS[LDP_MIN_RATE],
1386
    },
1387
  DT_DISKLESS: {},
1388
  DT_FILE: {},
1389
  DT_SHARED_FILE: {},
1390
  DT_BLOCK: {},
1391
  DT_RBD: {
1392
    RBD_POOL: DISK_LD_DEFAULTS[DT_RBD][LDP_POOL],
1393
    RBD_ACCESS: DISK_LD_DEFAULTS[DT_RBD][LDP_ACCESS],
1394
    },
1395
  DT_EXT: {},
1396
  }
1397

    
1398
# we don't want to export the shortcuts
1399
del _LV_DEFAULTS, _DRBD_DEFAULTS
1400

    
1401
NICC_DEFAULTS = {
1402
  NIC_MODE: NIC_MODE_BRIDGED,
1403
  NIC_LINK: DEFAULT_BRIDGE,
1404
  NIC_VLAN: VALUE_HS_NOTHING,
1405
  }
1406

    
1407
ISPECS_MINMAX_DEFAULTS = _constants.ISPECS_MINMAX_DEFAULTS
1408

    
1409
IPOLICY_DEFAULTS = {
1410
  ISPECS_MINMAX: [ISPECS_MINMAX_DEFAULTS],
1411
  ISPECS_STD: {
1412
    ISPEC_MEM_SIZE: 128,
1413
    ISPEC_CPU_COUNT: 1,
1414
    ISPEC_DISK_COUNT: 1,
1415
    ISPEC_DISK_SIZE: 1024,
1416
    ISPEC_NIC_COUNT: 1,
1417
    ISPEC_SPINDLE_USE: 1,
1418
    },
1419
  IPOLICY_DTS: list(DISK_TEMPLATES),
1420
  IPOLICY_VCPU_RATIO: 4.0,
1421
  IPOLICY_SPINDLE_RATIO: 32.0,
1422
  }
1423

    
1424
MASTER_POOL_SIZE_DEFAULT = _constants.MASTER_POOL_SIZE_DEFAULT
1425

    
1426
PART_MARGIN = _constants.PART_MARGIN
1427
PART_RESERVED = _constants.PART_RESERVED
1428

    
1429
CONFD_PROTOCOL_VERSION = _constants.CONFD_PROTOCOL_VERSION
1430

    
1431
CONFD_REQ_PING = _constants.CONFD_REQ_PING
1432
CONFD_REQ_NODE_ROLE_BYNAME = _constants.CONFD_REQ_NODE_ROLE_BYNAME
1433
CONFD_REQ_NODE_PIP_BY_INSTANCE_IP = _constants.CONFD_REQ_NODE_PIP_BY_INSTANCE_IP
1434
CONFD_REQ_CLUSTER_MASTER = _constants.CONFD_REQ_CLUSTER_MASTER
1435
CONFD_REQ_NODE_PIP_LIST = _constants.CONFD_REQ_NODE_PIP_LIST
1436
CONFD_REQ_MC_PIP_LIST = _constants.CONFD_REQ_MC_PIP_LIST
1437
CONFD_REQ_INSTANCES_IPS_LIST = _constants.CONFD_REQ_INSTANCES_IPS_LIST
1438
CONFD_REQ_NODE_DRBD = _constants.CONFD_REQ_NODE_DRBD
1439
CONFD_REQ_NODE_INSTANCES = _constants.CONFD_REQ_NODE_INSTANCES
1440
CONFD_REQS = _constants.CONFD_REQS
1441

    
1442
CONFD_REQQ_LINK = _constants.CONFD_REQQ_LINK
1443
CONFD_REQQ_IP = _constants.CONFD_REQQ_IP
1444
CONFD_REQQ_IPLIST = _constants.CONFD_REQQ_IPLIST
1445
CONFD_REQQ_FIELDS = _constants.CONFD_REQQ_FIELDS
1446

    
1447
# FIXME: perhaps update code that uses these constants to deal with
1448
# integers instead of strings
1449
CONFD_REQFIELD_NAME = str(_constants.CONFD_REQFIELD_NAME)
1450
CONFD_REQFIELD_IP = str(_constants.CONFD_REQFIELD_IP)
1451
CONFD_REQFIELD_MNODE_PIP = str(_constants.CONFD_REQFIELD_MNODE_PIP)
1452

    
1453
CONFD_REPL_STATUS_OK = _constants.CONFD_REPL_STATUS_OK
1454
CONFD_REPL_STATUS_ERROR = _constants.CONFD_REPL_STATUS_ERROR
1455
CONFD_REPL_STATUS_NOTIMPLEMENTED = _constants.CONFD_REPL_STATUS_NOTIMPLEMENTED
1456
CONFD_REPL_STATUSES = _constants.CONFD_REPL_STATUSES
1457

    
1458
CONFD_NODE_ROLE_MASTER = _constants.CONFD_NODE_ROLE_MASTER
1459
CONFD_NODE_ROLE_CANDIDATE = _constants.CONFD_NODE_ROLE_CANDIDATE
1460
CONFD_NODE_ROLE_OFFLINE = _constants.CONFD_NODE_ROLE_OFFLINE
1461
CONFD_NODE_ROLE_DRAINED = _constants.CONFD_NODE_ROLE_DRAINED
1462
CONFD_NODE_ROLE_REGULAR = _constants.CONFD_NODE_ROLE_REGULAR
1463

    
1464
CONFD_ERROR_UNKNOWN_ENTRY = _constants.CONFD_ERROR_UNKNOWN_ENTRY
1465
CONFD_ERROR_INTERNAL = _constants.CONFD_ERROR_INTERNAL
1466
CONFD_ERROR_ARGUMENT = _constants.CONFD_ERROR_ARGUMENT
1467

    
1468
CONFD_MAX_CLOCK_SKEW = _constants.CONFD_MAX_CLOCK_SKEW
1469

    
1470
CONFD_CONFIG_RELOAD_TIMEOUT = _constants.CONFD_CONFIG_RELOAD_TIMEOUT
1471
CONFD_CONFIG_RELOAD_RATELIMIT = _constants.CONFD_CONFIG_RELOAD_RATELIMIT
1472

    
1473
CONFD_MAGIC_FOURCC = _constants.CONFD_MAGIC_FOURCC
1474

    
1475
CONFD_DEFAULT_REQ_COVERAGE = _constants.CONFD_DEFAULT_REQ_COVERAGE
1476

    
1477
CONFD_CLIENT_EXPIRE_TIMEOUT = _constants.CONFD_CLIENT_EXPIRE_TIMEOUT
1478

    
1479
MAX_UDP_DATA_SIZE = _constants.MAX_UDP_DATA_SIZE
1480

    
1481
UIDPOOL_UID_MIN = _constants.UIDPOOL_UID_MIN
1482
UIDPOOL_UID_MAX = _constants.UIDPOOL_UID_MAX
1483

    
1484
PGREP = _constants.PGREP
1485

    
1486
INITIAL_NODE_GROUP_NAME = _constants.INITIAL_NODE_GROUP_NAME
1487

    
1488
ALLOC_POLICY_PREFERRED = _constants.ALLOC_POLICY_PREFERRED
1489
ALLOC_POLICY_LAST_RESORT = _constants.ALLOC_POLICY_LAST_RESORT
1490
ALLOC_POLICY_UNALLOCABLE = _constants.ALLOC_POLICY_UNALLOCABLE
1491
VALID_ALLOC_POLICIES = _constants.VALID_ALLOC_POLICIES
1492

    
1493
BLOCKDEV_DRIVER_MANUAL = _constants.BLOCKDEV_DRIVER_MANUAL
1494

    
1495
QEMUIMG_PATH = _constants.QEMUIMG_PATH
1496

    
1497
HTOOLS = _constants.HTOOLS
1498
IALLOC_HAIL = _constants.IALLOC_HAIL
1499

    
1500
FAKE_OP_MASTER_TURNUP = _constants.FAKE_OP_MASTER_TURNUP
1501
FAKE_OP_MASTER_TURNDOWN = _constants.FAKE_OP_MASTER_TURNDOWN
1502

    
1503
SSHK_RSA = _constants.SSHK_RSA
1504
SSHK_DSA = _constants.SSHK_DSA
1505
SSHK_ALL = _constants.SSHK_ALL
1506

    
1507
SSHAK_RSA = _constants.SSHAK_RSA
1508
SSHAK_DSS = _constants.SSHAK_DSS
1509
SSHAK_ALL = _constants.SSHAK_ALL
1510

    
1511
SSHS_CLUSTER_NAME = _constants.SSHS_CLUSTER_NAME
1512
SSHS_SSH_HOST_KEY = _constants.SSHS_SSH_HOST_KEY
1513
SSHS_SSH_ROOT_KEY = _constants.SSHS_SSH_ROOT_KEY
1514
SSHS_NODE_DAEMON_CERTIFICATE = _constants.SSHS_NODE_DAEMON_CERTIFICATE
1515

    
1516
SSH_DAEMON_KEYFILES = {
1517
  SSHK_RSA: (pathutils.SSH_HOST_RSA_PRIV, pathutils.SSH_HOST_RSA_PUB),
1518
  SSHK_DSA: (pathutils.SSH_HOST_DSA_PRIV, pathutils.SSH_HOST_DSA_PUB),
1519
  }
1520

    
1521
NDS_CLUSTER_NAME = _constants.NDS_CLUSTER_NAME
1522
NDS_NODE_DAEMON_CERTIFICATE = _constants.NDS_NODE_DAEMON_CERTIFICATE
1523
NDS_SSCONF = _constants.NDS_SSCONF
1524
NDS_START_NODE_DAEMON = _constants.NDS_START_NODE_DAEMON
1525

    
1526
RANDOM_UUID_FILE = _constants.RANDOM_UUID_FILE
1527

    
1528
# Regex string for verifying a UUID
1529
UUID_REGEX = "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
1530

    
1531
AUTO_REPAIR_TAG_PREFIX = _constants.AUTO_REPAIR_TAG_PREFIX
1532
AUTO_REPAIR_TAG_ENABLED = _constants.AUTO_REPAIR_TAG_ENABLED
1533
AUTO_REPAIR_TAG_SUSPENDED = _constants.AUTO_REPAIR_TAG_SUSPENDED
1534
AUTO_REPAIR_TAG_PENDING = _constants.AUTO_REPAIR_TAG_PENDING
1535
AUTO_REPAIR_TAG_RESULT = _constants.AUTO_REPAIR_TAG_RESULT
1536

    
1537
AUTO_REPAIR_FIX_STORAGE = _constants.AUTO_REPAIR_FIX_STORAGE
1538
AUTO_REPAIR_MIGRATE = _constants.AUTO_REPAIR_MIGRATE
1539
AUTO_REPAIR_FAILOVER = _constants.AUTO_REPAIR_FAILOVER
1540
AUTO_REPAIR_REINSTALL = _constants.AUTO_REPAIR_REINSTALL
1541
AUTO_REPAIR_ALL_TYPES = _constants.AUTO_REPAIR_ALL_TYPES
1542

    
1543
AUTO_REPAIR_SUCCESS = _constants.AUTO_REPAIR_SUCCESS
1544
AUTO_REPAIR_FAILURE = _constants.AUTO_REPAIR_FAILURE
1545
AUTO_REPAIR_ENOPERM = _constants.AUTO_REPAIR_ENOPERM
1546
AUTO_REPAIR_ALL_RESULTS = _constants.AUTO_REPAIR_ALL_RESULTS
1547

    
1548
BUILTIN_DATA_COLLECTOR_VERSION = _constants.BUILTIN_DATA_COLLECTOR_VERSION
1549

    
1550
OPCODE_REASON = _constants.OPCODE_REASON
1551

    
1552
OPCODE_REASON_SRC_CLIENT = _constants.OPCODE_REASON_SRC_CLIENT
1553
OPCODE_REASON_SRC_NODED = _constants.OPCODE_REASON_SRC_NODED
1554
OPCODE_REASON_SRC_OPCODE = _constants.OPCODE_REASON_SRC_OPCODE
1555
OPCODE_REASON_SRC_RLIB2 = _constants.OPCODE_REASON_SRC_RLIB2
1556
OPCODE_REASON_SRC_USER = _constants.OPCODE_REASON_SRC_USER
1557
OPCODE_REASON_SOURCES = _constants.OPCODE_REASON_SOURCES
1558

    
1559
DISKSTATS_FILE = _constants.DISKSTATS_FILE
1560

    
1561
STAT_FILE = _constants.STAT_FILE
1562
CPUAVGLOAD_BUFFER_SIZE = _constants.CPUAVGLOAD_BUFFER_SIZE
1563
CPUAVGLOAD_WINDOW_SIZE = _constants.CPUAVGLOAD_WINDOW_SIZE
1564

    
1565
MOND_TIME_INTERVAL = _constants.MOND_TIME_INTERVAL
1566

    
1567
# MonD's latest API version
1568
MOND_LATEST_API_VERSION = 1
1569

    
1570
# Timeouts for upgrades
1571

    
1572
UPGRADE_QUEUE_DRAIN_TIMEOUT = _constants.UPGRADE_QUEUE_DRAIN_TIMEOUT
1573
UPGRADE_QUEUE_POLL_INTERVAL = _constants.UPGRADE_QUEUE_POLL_INTERVAL
1574

    
1575
# device types to hotplug
1576
HOTPLUG_TARGET_DISK = _constants.HOTPLUG_TARGET_DISK
1577
HOTPLUG_TARGET_NIC = _constants.HOTPLUG_TARGET_NIC
1578
HOTPLUG_ALL_TARGETS = _constants.HOTPLUG_ALL_TARGETS
1579

    
1580
# hotplug actions
1581
HOTPLUG_ACTION_ADD = _constants.HOTPLUG_ACTION_ADD
1582
HOTPLUG_ACTION_REMOVE = _constants.HOTPLUG_ACTION_REMOVE
1583
HOTPLUG_ACTION_MODIFY = _constants.HOTPLUG_ACTION_MODIFY
1584
HOTPLUG_ALL_ACTIONS = _constants.HOTPLUG_ALL_ACTIONS
1585

    
1586
# other constants
1587

    
1588
HAS_GNU_LN = _constants.HAS_GNU_LN
1589

    
1590
# Do not re-export imported modules
1591
del re, _vcsversion, _constants, socket, pathutils, compat
1592

    
1593

    
1594
ALLOCATABLE_KEY = "allocatable"
1595
FAILED_KEY = "failed"